Tagging with Transclusions?

139 views
Skip to first unread message

Alex Olsen

unread,
Apr 9, 2020, 12:02:07 PM4/9/20
to TiddlyWiki
I'm working on a viewed-before-complete Wiki. I'd like to do 2 things with each page before it's complete:

1. Use a Curly-Bracketed Transclusion of a Construction Message Tiddler so anyone looking at an unfinished Tiddler knows it's incomplete at a glance
2. Tag the Tiddlers using this Transclusion with a 'task' tag for easy reference in a separate To-Do Tiddler

Is there a way to do this? or should I bite the bullet and do this tagging manually?

Mat

unread,
Apr 9, 2020, 12:58:59 PM4/9/20
to TiddlyWiki
How does the system know it is an unfinished tiddler (so the transclusion can be applied)? What is the difference between an unfinished and finished tiddler?

2. Tag the Tiddlers using this Transclusion with a 'task' tag for easy reference in a separate To-Do Tiddler

So the transclusion should both show the "unifished" message and some button to tag the current tiddler, right?

<:-) 

Alex Olsen

unread,
Apr 9, 2020, 5:15:41 PM4/9/20
to TiddlyWiki
I've thought of a workaround. Sometimes all a seemingly complex problem needs is a break and fresh eyes to realize it's not as complex as you're making it!
 
How does the system know it is an unfinished tiddler (so the transclusion can be applied)? What is the difference between an unfinished and finished tiddler?

Ideally with a tag. I plan on using 'incomplete' for any tiddler left unfinished. I also wanted an array of in-line messages that were easy to see, all of which would tag anything that transcludes them they same way. These messages would describe the nature of incompleteness. I have no idea what these would include. That's the first sign I'm on the wrong track.

Fundamentally my issue is that I want to have an easy way to organize what I need to finish. That's made difficult by the way I'd like to do it: a very visible manner which automatically updates a list of tiddlers that have the same need for completion.

Moving forward, I'll be applying an incomplete tag to anything as I begin it and remove that tag afterwards. Simple problems require the simplest solutions!

LinOnetwo

unread,
Apr 10, 2020, 12:22:59 AM4/10/20
to TiddlyWiki
I think you can use a macro to do such transclude, while transcluding, you also add some color or side note or a "edit me" button to the side.

I'm now transcluding using <<reuse-tiddler "title">>

with

\define reuse-pane(content)
<div style="display:flex;justify-content:flex-end;">
  <small style="display:inline-block;background-color:lavender;border-left:3px solid slateblue;padding-left:5px;">$content$</small>
</div>
\end

\define get-tiddler-name(title)
<$set name="tid" value="$title$">
  <$list filter="[all[current]title<tid>]">
    <$link to=<<tid>>>
      <$view field="name"><$view field="title"/></$view>
    </$link>
  </$list>
</$set>
\end

\define get-tiddler-source(title)
<pre><$text text={{$title$}} /></pre>
\end

\define get-tiddler-field(title field)
<$set name="fid" value="$field$">
  <$list variable="fid-val" filter="[[$title$]get<fid>]"><<fid-val>></$list>
</$set>
\end

\define reuse-tiddler(title)
<$macrocall $name="reuse-pane" content="""
Edit Source:<<get-tiddler-name "$title$">>
""" />

{{$title$}}

\end

在 2020年4月10日星期五 UTC+8上午5:15:41,Alex Olsen写道:

LinOnetwo

unread,
Apr 10, 2020, 12:23:48 AM4/10/20
to TiddlyWiki
I got this idea from https://wiki.hintsnet.com  @pimgeek

在 2020年4月10日星期五 UTC+8下午12:22:59,LinOnetwo写道:

Lin Onetwo

unread,
Apr 12, 2020, 1:46:56 AM4/12/20
to TiddlyWiki
Macro for Transclusion to view original tiddler source:

\define reuse-pane(content)
<style>
.reuse-pane {
    position: absolute;
    right: 10px;
    width: auto;
    max-width: 4px;
    height: 1.5em;
    overflow: hidden;
    border: 10px solid transparent;
    border-top: 0;
    box-sizing: content-box;
    transition: max-width 0.5s;
}
.reuse-pane:hover {
  max-width: 80vw;
}
.reuse-pane-content {
    display: inline-block;
    background-color: rgba(233, 233, 233, 0.9);
    border-left: 4px solid rgba(0, 0, 0, 0.05);
    padding: 0px 5px;
    padding-bottom: 2px;
}
</style>
<div class="reuse-pane">
  <small class="reuse-pane-content">$content$</small>
</div>
\end

\define reuse-tiddler(title)
<$macrocall $name="reuse-pane" content="""
View Source:[[$title$]]
""" />

{{$title$}}

\end

在 2020年4月10日星期五 UTC+8下午12:23:48,Lin Onetwo写道:

TonyM

unread,
Apr 12, 2020, 2:49:04 AM4/12/20
to TiddlyWiki
Have you considered any tiddler incomplete If not flagged complete. This flag could be a tag but if it were a date field you could stamp it with the date and time it was completed. Thus incomplete would be !has[completed-date]

This makes sense because all tiddlers start as incomplete.

Notes about what to complete can be placed inside comments that you can only read on editing.

Regards
Tony

`
<!--
Completion notes
-->
`

Alex Olsen

unread,
Apr 12, 2020, 3:38:57 PM4/12/20
to tiddl...@googlegroups.com
I might do this! My issue is in trying this it shows all the system tiddlers when I list them and I'm not skilled enough to avoid that yet! Haha

I think I have an idea, but I don't even know where to start with implementation. I'd like to give any newly created tiddlers a 'Stub' tag which is, by policy, to be removed once that tiddler is deemed completed. Then I'd have a tiddler that lists all Stubs called 'To-Do' or something that's listed in the startup tiddlers. Is there a way to make a new tiddler come preloaded with a tag?

Further, I'm very new to the syntax here. The official tiddlywiki.com source is what I'm getting all my knowledge from, but it's not the best example of in-depth execution of various things. For instance the section on Macros explains what a macro is well enough, but doesn't show macro's in use with different pages. I'm hands-on when it comes to learning, so seeing an example of what I want to do helps me better than explanation of a features function. Where could I find peoples Tiddlywikis?
Reply all
Reply to author
Forward
0 new messages