Pack plugin button

115 views
Skip to first unread message

Andrew

unread,
Aug 18, 2017, 9:37:33 AM8/18/17
to TiddlyWiki
Hello everyone, I'm trying to make a button that will take the generated contents of the following and put it in the text field of my plugin tiddler and then leave it in edit mode. So far it just puts the literal text and not the generated content. I thought it would be possible but any suggestions would be appreciated.

$:/plugins/ajh/plugintools/list

{ "tiddlers": { <$list filter="""[list[$:/plugins/ajh/plugintools/list]butlast[]]""">"<$text text=<<currentTiddler>>/>": <$text text=<<jsontiddler>>/>,<br></$list><$list filter="""[list[$:/plugins/ajh/plugintools/list]last[]]""">"<$text text=<<currentTiddler>>/>": <$text text=<<jsontiddler>>/></$list> } }

$:/plugins/ajh/plugintools/sidebar

<$set name=mylist value={{$:/plugins/ajh/plugintools/list}}>
<$button>
<$action-setfield $tiddler="$:/plugins/ajh/plugintools/plugin" text=<<mylist>> dependents={{$:/plugins/ajh/plugintools/list!!list}}/>
<$action-sendmessage $message="tm-edit-tiddler" $param="$:/plugins/ajh/plugintools/plugin"/>
Pack Plugin
</$button>
</$set>

TonyM

unread,
Aug 18, 2017, 8:01:09 PM8/18/17
to TiddlyWiki
My Inexpert answer is use the Wikify widget to transform it into text then use the new variable. As I understand it the wikification usually occurs at the end.

\define currentobjectsrc()
{{!!title}}
\end
<$wikify name="currentobject" text=<<currentobjectsrc>>>

Regards
Tony

Andrew

unread,
Aug 18, 2017, 8:13:20 PM8/18/17
to TiddlyWiki
I'd say you are an expert. That worked. Thank you very much. This will help me polish up my plugin before I make it available from my library.

Jan

unread,
Aug 19, 2017, 3:54:57 PM8/19/17
to tiddl...@googlegroups.com
Hi Andrew,
this seems to be interesting, can you post a link to your result please?
I would also like to have a button which creates plugins where the names
of the tiddlers are unchanged.
yours Jan

Andrew

unread,
Aug 19, 2017, 5:32:41 PM8/19/17
to TiddlyWiki
Bad news, there was a fundamental problem that wikify causes. The text you wikify also replaces any $(variable)$ with it's string literal. I'm still trying to figure out a work around.

Jan

unread,
Aug 19, 2017, 5:40:49 PM8/19/17
to tiddl...@googlegroups.com
Hi Andrew,
For my use case this would not matter, because I would like to have it
for users to export their stories as a plugin.
You know the Andreas Hahns Tinka solution certainly - for real plugins I
use that one...

Greetings
Jan

Andrew

unread,
Aug 19, 2017, 6:16:21 PM8/19/17
to TiddlyWiki
Ok, well, my work in progress is at http://plugintools.tiddlyspot.com/ but again, it is not yet versioning. I am still working on a sidebar with a one click button instead of copying and pasting. I guess you could call it prerelease. The major parts and concepts are complete, I'm just hacking on the sidebar button.

Andrew

unread,
Aug 22, 2017, 9:50:42 AM8/22/17
to TiddlyWiki
I am abandoning wikify because it causes all macro transclusions in all tiddlers to wikify.
Reply all
Reply to author
Forward
0 new messages