📝TonyM ✅ Is there a functionality - macro, operator, script, message or JavaScript - that determines a list of all fields used in all tiddlers contained in the respective TiddlyWiki ?

65 views
Skip to first unread message

Cd.K

unread,
Oct 8, 2019, 11:53:45 AM10/8/19
to tiddl...@googlegroups.com
For clarification: Each field found should be included once in the list. 

author
core version
created
creator
dependents
description
list
modified
title
type
...

In the TiddlyWiki's HTML file, these fields can be found in the <div> tags.

Now I'm surprised that the field "text" is not explicitly present. The field "text" is implicitly equal to the <pre> tag.
In packed plugin tiddlers, there is an explicit field "text" in the <pre> tag.
These fields should also be listed.

text
module-type
library
...


An additional counter, in how many tiddlers the respective field is used, would be desirable.

Also, a classification, if this field is only used by standard, system, shadow tiddlers and/or combinations of these tiddler types.
 

Regard
Cd.K

 

Mark S.

unread,
Oct 8, 2019, 12:08:52 PM10/8/19
to TiddlyWiki
You can get a field list and counts like this:

<$list filter="[all[tiddlers+shadows]fields[]sort[]]" variable="field">
<$list filter="[all[tiddlers+shadows]has:field<field>count[]]" variable="count">
<<field>> : <<count>> <br/>
</$list>
</$list>

You could add a 3rd nested loop if you wanted a further break down by tiddler type.

Mohammad

unread,
Oct 8, 2019, 12:13:53 PM10/8/19
to TiddlyWiki
Added to TW-Scripts!

Cd.K

unread,
Oct 8, 2019, 12:53:22 PM10/8/19
to tiddl...@googlegroups.com
Hi Mohammad

Mohammad wrote:
 
Added to TW-Scripts!
 

Where can I find "TW-Scripts"?
Do you mean this?

If so, is there documentation on how to use this? 

Do you mind to close this topic?

Thanks
Cd.K

Cd.K

unread,
Oct 8, 2019, 12:57:56 PM10/8/19
to tiddl...@googlegroups.com
Thank you Mark S.

I never expected so many fields.

Birthe C

unread,
Oct 8, 2019, 2:23:46 PM10/8/19
to TiddlyWiki


Birthe

TonyM

unread,
Oct 8, 2019, 6:56:45 PM10/8/19
to TiddlyWiki
Cd. K

I have done more with this myself. 
  • See https://tiddlywiki.com/#TiddlerFields
  • Create a macro containing the default-fields
  • Use some thing like below to list all fields in a tiddler or tiddlers less the default and hidden ones.
...fields[]] -[subfilter<default-fields>]]

Replace the "..." with a filter of tiddlers. to restrict the tiddlers whos fields you see.

This may not make sense to you but I have recently made a tool to identify all the fields used in tiddlers with object-type[name]] and list them (fields) such that I can update my template for that object type, to include those fields used by instances of that object-type (into the object type-template).

I would be happy to give a specific answer to any outstanding questions you have.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages