Question
Are there tools out there to help build tiddlers that often have outline-like structures, but do not have a clean, consistent outline format? I’m trying to build this so each section/subsection/sub-subsection has its own URL, so I’m breaking many of them down fairly granularly. But I’m finding it tedious to create them. When I hand it over to a non-TiddlyWiki-savvy user, I would really like this to be cleaner to use.
Background
I’ve been very slowly working on building a wiki to gather together the 150 or so PDF policies for a regional school system (of which I’m a Board member) and covert them into a single wiki. The main goal is simply consolidation into a single file, but an important secondary goal would be to have everything someone might want to point to have its own URL.
But the policies do not have a consistent format. Some are just a few paragraphs, with no further breakdown. Some are full-fledged outlines with sections named, e.g. IV.A.2.c
. But many of them fall in between, with some outline-structured sections, and other unstructured blocks of text. And the numbering for these varies from one policy to another. Sometimes the top-level breakdown is I / II / III / IV
, sometimes it’s A / B / C / D
, and sometimes it’s 1 / 2 / 3 / 4
. For example see Policy 3265 to understand the sorts of structural complexity I must be able to handle.
I think I have a reasonable way to break these down and display them, but I don’t have good tools to help me with that, or to help the eventual maintainer.
Current markup
Right now, the trick is that each outline level includes its own content, and then calls a procedure to display all of its children, and then includes any final direct content. Children know their parents through a parent
field. If they’re in an outline-like section, they also have a marker
field that might contain VIII
or C
or 7
, for instance. (This is probably necessary, since it’s quite possibly that a later revision will remove C
, but not renumber D
- G
; I can’t use the parent’s type to generate a sequential set.)
For instance, Section 2 (my own designation, not in the actual document) of Policy 1520, looks like this:
title: Policy1520(s2)
tags: Policy1520
caption: Guidelines
parent: Policy1520
!!! Outside Funded Athletic Teams
Any athletic team which is funded in whole or in part by any Booster club or other outside
organization for the benefit of Region 8 students must adhere to the following guidelines in
order for the program to be considered a Region 8 athletic program.
<<children list>>
(The tags
in there are for the current TOC. It is duplicative of parent
, and I will probably eventually remove such tags.)
So for this one, there is introductory material and the call <<children list>>
The parameter to children
specifies which of list styles to use. Currently there are six, and I expect a handful more by the time this is completed. list
is one of the most simple of them.
One of its children (#6) looks like this:
title: Policy1520(s2)(6)
tags: Policy1520(s2)
caption: Operational expenses
marker: 6
parent: Policy1520(s2)
All operational expenses as described by the administration will be paid out of student activity fund.
The children
procedure looks pretty much like this:
\procedure children(type)
\procedure definition()
<div class="definition">
<div class="term"><$link>{{!!marker}}. {{!!caption}}</$link>: </div>
<$transclude $mode="block"/>
</div>
\end definition
\procedure outline()
<div class="level">
<div class="heading"><$link><% if [<currentTiddler>has[marker]] %>{{!!marker}}. <% endif %>{{!!caption}}</$link></div>
<$transclude $mode="block"/>
</div>
\end outline
\procedure list()
<div class="list-item">
<div class="marker"><$link>{{!!marker}}</$link>. </div>
<$transclude $mode="block"/>
</div>
\end list
<!-- ... more here ... -->
<$list filter="[parent<currentTiddler>!has[draft.of]sortan[]]" >
<$transclude $variable=<<type>> $mode="block" />
</$list>
\end
Tooling
All that works fine to display a policy broken down into bite-sized, addressable pieces. But it does not make it easy to create or modify one. I’m hoping people have suggestions for tools to look to for inspiration on this. I don’t expect there is a ready-made solution, though. There are several possibilities I can imagine, but they all revolve around adding new subsections to the current section, or as siblings to the current one. It would be really nice if they would allow me to insert into the middle of a list, automatically renumbering the subsequent entries
Streams
The elephant in the room, obviously, is Streams. I’ve never used it before, never really having the need. But I’ve looked at it many times, and I just reviewed it more carefully. I haven’t dug into the implementation yet, and I don’t have any sense of how difficult it would be to adapt to my needs.
What I love
- the inline editing of multiple tiddlers,
- the easy changing of levels,
- the straightforward drag-and-drop.
What I’m missing
- control over list styles and markers
- the edit toolbar (not for me – I really don’t use it – but for eventual maintainers.)
What worries me:
-
I don’t like this style:
- each node that has children, contains their titles in a list in the field
stream-list
- each node that has a parent, contains the parent’s title in the field
parent
I feel we should never do both of these, as they too often lead to conflicts. Of course this is harder for Streams, which doesn’t have much besides that list for sorting. For my case, I have titles and markers that can offer the correct sorting (once I get those pesky Roman Numerals sorted out.)
- each node that has children, contains their titles in a list in the field
-
Most development seems to have stopped three or four years ago. I don’t know if @saqimtiaz is planning on supporting this and making changes.
Overall
There is a lot to be learned from here. But it’s not as though I could simply make a few tweaks to Streams and get the behavior I want.
Other tools
I don’t know of any. Does anyone have suggestions? Again, I’m not looking for exact matches to my requirements (although those suggestions would be extremely welcome!) I’m just looking for wikis that have overlapping ideas that I could steal investigate.