Oh, I’m not referring to the javascript codes in tiddlywiki. My apology for not being clear.
I have tiddlers with data contents and “code tiddlers” with filters and such for organizing and presenting the contents (sample below to present a list of bookmarked URLs). I have trouble trying to keep track of the ‘codes’ (i.e. filters, macros and variables ) distributed among these “code tiddlers” even while I’m writing them and these are simple functions! I believe I will have trouble trying to recall how they do what they do a few months down, particularly those little tiddlers that use tags to latch onto the system tiddlers to get work done.
Right now, i cut and paste these “code” fragments to a text file for an overview and quick reference while working on them. When I’m done, I suppose I will just consolidate all of them into one text file and add some comments for my future self. I’m not sure that’s the best approach though, so checking with the community what’s the best practices to document what you did in TW. I have no doubt that you will be using TW somehow to do it
\define tid_icon(imgpath,ticon)
<$set name="var_icon" filter="[<currentTiddler>has:[bmicon]]" value="[img[$imgpath$/$ticon$]]" emptyValue="[img[$imgpath$/blank.png]]">
<<var_icon>>
</$set>
\end
\define t_titleurl(t_url, t_title, t_text, t_status, t_plain)
[[$t_plain$|$t_url$]] $t_text$ ($t_status$) //[[edit|$t_title$]]//
\end
<$set name="tagSelected" value={{@Bookmarks!!selection}}>
<hr>@@font-size:1.5em;Tag "<<tagSelected>>" : <$count filter="[tag<tagSelected>!tag[#TW5BM]!bmstatus[9]]"/>@@ <br><hr>
<$action-sendmessage $message="tm-close-other-tiddlers" $param="@Bookmarks"/>
<$set name="hash" value=" :[0-9a-f]{12}:"><ol>
<$list filter="[tag<tagSelected>!tag[#TW5BM]!bmstatus[9]each[bmstatus]get[bmstatus]sort[]]" variable="tstatus">
<$list filter="[tag<tagSelected>!tag[#TW5BM]!bmstatus[9]bmstatus<tstatus>!sort[modified]]">
<li><$macrocall $name="tid_icon" imgpath={{@Startup!!imagpath}} ticon={{!!bmicon}} /> <$macrocall $name="t_titleurl" t_url={{!!bmurl}} t_title={{!!title}} t_text={{!!text}} t_status={{!!bmstatus}} t_plain={{{[<currentTiddler>search-replace::regexp<hash>,[]]}}}/></li>
</$list>
</$list></ol>
</$set>
</$set>