convert filtered list into hard copy?

134 views
Skip to first unread message

Dave

unread,
Dec 12, 2018, 3:17:30 PM12/12/18
to TiddlyWiki
Hi,

I was wondering if this were possible:

I have this filtered list:
\define tgng()

<<list-links filter:"[all[current]tagging[]]">>
\end

that, for example shows all the tiddlers tagged "errands" when called from that tiddler.  

I'd like to make a button that allows me to create a "hard copy" of that list into a tiddler in the sense that you could open the tid file in another program and just see the list there, i.e. in the form of a normal text file (I'm using BobTW)

I would imagine I'd need something like this (but one that works, ha ha)
\define mybutton()

<$action-sendmessage $message="tm-new-tiddler"
title="myErrands"
   tags="hardcopies"
text=<$list filter="[all[current]tagging[]!tag[exclude]!tag[done]tag[errands]sort[priority]limit[20]]"></$list>

/>
\end

<$button actions=<<mybutton>> >
set Errands
</$button>

any suggestions?


thanks, 
- Dave

P.s. is there any way to make the tiddler this way without opening it in edit mode? i.e. just write over any previous versions of the file.




Mark S.

unread,
Dec 12, 2018, 5:30:09 PM12/12/18
to TiddlyWiki
This version works, though you'll have to put back in your own filter (I needed data for testing). Note that it makes the new tiddler without opening it. The main difference is that the output of the list widget is first converted into text by the wikify widget. Be sure to make backups before trying.

Have fun
-- Mark

\define mymegatext()
<$list filter="[tag[Learning]limit[20]]">
<$view field=text/>
</$list>
\end
\define mybutton()
<$wikify name=mytext text=<<mymegatext>>>
<$action-setfield
$tiddler="myErrands"
   tags="hardcopies"
text=<<mytext>>
/
>
</$wikify>

\end

<$button actions=<<mybutton>> >
set Errands
</
$button>


TonyM

unread,
Dec 13, 2018, 1:57:16 AM12/13/18
to tiddl...@googlegroups.com
Mark,

This makes me think a button on the view tiddler toolbar that creates a new tiddler based on the Wikification of the current tiddlers content would be a helpful tool. 

It inspires me that I would then also create a version to show an unwikified version in the same form as a tid file for quick sharing in GG.

Regards
Tony

TonyM

unread,
Dec 13, 2018, 1:58:03 AM12/13/18
to TiddlyWiki
notification changed to wikification (not yet in my dictionary)


On Thursday, December 13, 2018 at 5:57:16 PM UTC+11, TonyM wrote:
Mark,

This makes me think a button on the view tiddler toolbar that creates a new tiddler based on the notification of the current tiddlers content would be a helpful tool. 

Dave

unread,
Dec 13, 2018, 12:44:23 PM12/13/18
to TiddlyWiki
Thank you Mark :)

I did have to tweak it a bit because it was showing content of the tiddlers, whereas my "todos" are the titles of the tiddlers only.  Here's what I ended up with:
\define mymegatext()
<$list filter="[!tag[exclude]!tag[done]has[priority]tag[errands]sort[priority]limit[20]]">
<$view field=title/>

</$list>
\end
\define mybutton()
<$wikify name=mytext text=<<mymegatext>>>
<$action-setfield
$tiddler="myErrands"
   tags="hardcopies"
text=<<mytext>>
/
>
</$wikify>

\end

<$button actions=<<mybutton>> >
set Errands
</
$button>

One tweaking question:  Is there a way to get it to be a numbered list (using "#")?  No matter where I put the #, I couldn't get it to come out right.


TonyM

unread,
Dec 13, 2018, 5:51:49 PM12/13/18
to TiddlyWiki
Try

\define mymegatext()
<ol>

<$list filter="[!tag[exclude]!tag[done]has[priority]tag[errands]sort[priority]limit[20]]">
<li><$view field=title/></li>

</$list>
</
ol>
\end


Tony

Mark S.

unread,
Dec 13, 2018, 6:01:38 PM12/13/18
to TiddlyWiki
D'oh! I thought that was what you wanted -- a big tiddler representing the content of a series of other tiddlers.

-- Mark

Dave

unread,
Dec 13, 2018, 6:14:42 PM12/13/18
to TiddlyWiki
Mark, I'm just happy that I'm finally able to have figured it out on my own, ha ha.  Thanks so much (for doing the heavy lifting)!!

Tony, thanks, but that doesn't seem to change anything

TonyM

unread,
Dec 13, 2018, 8:25:15 PM12/13/18
to TiddlyWiki
Dave,

Thats Odd

For example this works

\define test()
<ol>
<$list filter="[all[shadows+tiddlers]tags[]prefix[$:/]sort[title]]">
<li>{{||$:/core/ui/TagTemplate}}</li>
</$list>
</
ol>
\end

<<test>>

Regards
Tony

TonyM

unread,
Dec 13, 2018, 8:48:35 PM12/13/18
to TiddlyWiki
Sorry,

I see I am trying to take this further than the OP Original post. 

I want the wikified or is that HTML version to be saved in the hardcopy.

Regards
Tony

Dave

unread,
Dec 14, 2018, 3:24:48 PM12/14/18
to TiddlyWiki
Hi Tony,

Yes, your example definitely works, but there must be something about how the second macro...
\define mybutton()
<$wikify name=mytext text=<<mymegatext>>>
<$action-setfield
$tiddler
="myErrands"
   tags
="hardcopies"
text
=<<mytext>>
/
>
</$wikify>

\end

processes the first macro...
\define mymegatext()
<ol>

<$list filter="[!tag[exclude]!tag[done]has[priority]tag[errands]sort[priority]limit[20]]">
<li><$view field=title/></li>

</$list>
</ol>
\end

that somehow changes the formatting - weird...

Dave

unread,
Dec 14, 2018, 3:27:10 PM12/14/18
to TiddlyWiki
Oh, ha ha, I just spotted something and now it works if you change
text=<<mytext>>

to

text=<<mymegatext>>

in the second macro
Reply all
Reply to author
Forward
0 new messages