Looking for orphaned tiddlers but exclude tiddlers which are transcluded

I have a lot of tiddlers which are generated and re-generated data-based building blocks that are never linked to directly, but are transcluded in different ways by other tiddlers.

I’m looking to identify orphans generally for cleanup of old manual tiddlers and potentially also old machine-generated tiddlers which were improperly tagged. But a lot of these are a lot of false positives to wade through using just all[orphans] or is[orphan].

Is there any way to identify that a tiddler is not transcluded anywhere?

You could install the relink plugin. It has a relink:orphans operator which:

Behaves much like [all[orphans]], except that this will look at all possible references, not just hard links.

In addition to what @btheado suggests especially if you now how they were transcluded e; {{ something }} or {{|| something }} you can set up a search to find the titles, then test if each title is an orphan.

  • For this kind of “data cleansing” a lot of methods are available but they need to respond to a detailed review of the data and based on eny information you can glean.
  • If you can share your wiki with someone experienced and discuss what you want, it may be a quicker way to address it.

Thanks, it’s definitely an improvement even thou it takes a very long time to scan all the tiddlers. I’ll need to think on it some more, though, because I forgot we also do a kind of dynamic transclusion in macros, not just generated hardlinks - so those still are orphans.

Background: So like we will have Measurements A, B, C which have main documentation tiddlers A, B, C. The tiddler text of A is just <<measurement()>> - that’s all, a template macro, which inspects the data for A in the fields and renders the body from transcluding other tiddlers. If a Measurement’s data is like:

Name: A
Structure: Heart
Unit: mm, cm

There is a database-generated Tiddler with title A with text <<measurement()>> and fields in the tiddler:
Measurement.Name: A
Measurement.Structure: Left Ventricle
Measurement.Unit: mm, cm

And there is commentary in separate tiddlers which are user edited on demand

Title: $:/DataMart/Text.Measurement.Name.Description:Name=A
Text:

Title: $:/DataMart/Text.Measurement.Structure.Description:Name=A
Text: Only applies to Left Ventricle, also see some other measurement in the Aorta

Title: $:/DataMart/Text.Measurement.Unit.Description:Name=A
Text: mm units are used for pediatric patients, cm units are used for adult patients

And then the measurement() macro builds the whole page transcluding all the building blocks:

A

Some header included from $/DataMart/Text.Measurement.Header:Name=A

A table of each field, its possible values and the editorial discussion about the data:
Name: A
Structure: Left Ventricle - Only applies to Left Ventricle, also see some other measurement in the Aorta
Unit: mm, cm - mm units are used for pediatric patients, cm units are used for adult patients

Some footer included from $/DataMart/Text.Measurement.Footer:Name=A

1 Like