[tw5] Re: Saving a story-river
Thanks Scott for the suggestion and Eric for the implementation, this will be really useful! Here's a version with a couple of tweaks: - Added icons to the buttons. - You can export the tiddlers in a story (the OK button in the export popup looks goofy because the export macro I used doesn't have an option to change the button appearance...didn't feel like it was worth making my own copy of the macro to fix this, but if someone knows a simpler solution I'm all ears). - Stories are saved with a prefix (e.g., $:/StorySaver/saved) rather than as the unmodified name of the story. The prefix used for this and for the tag applied to saved stories is configurable via a variable at the top of the tiddler. One additional tweak that might be useful would be preventing the story-saver tiddler itself from being saved. I don't care because I put it in the sidebar at the bottom of the Open tab, so I won't normally have it open, but others might. <$set name=savedStoryTag value="$:/sib/StorySaver/SavedStory"> <$set name=savedStoryPrefix value="$:/sib/StorySaver/saved/"> <$button popup="$:/state/popup/savestory"> {{$:/core/images/save-button}} save story <$reveal type="popup" state="$:/state/popup/savestory" class="tc-drop-down tc-popup-keep" style="min-width:auto;padding:0.5em;"> Enter a new story name: <$edit-text tiddler="$:/state/popup/savestory" field="storyname" /> <$list filter="[taglimit[1]]"> or, select an existing story: .savedStoryList { width:100%; } <$select tiddler="$:/state/popup/savestory" field="storyname" size="5" class="savedStoryList"> <$list filter="[tagremoveprefix]"><> <$button style="text-align:center;"> save <$action-setfield $tiddler={{{ [{$:/state/popup/savestory!!storyname}addprefix] }}} list={{$:/StoryList!!list}} tags=<> /> <$action-deletetiddler $tiddler="$:/state/popup/savestory" /> <$button popup="$:/state/popup/loadstory"> {{$:/core/images/storyview-classic}} load story <$reveal type="popup" state="$:/state/popup/loadstory" class="tc-drop-down tc-popup-keep" style="min-width:auto;padding:0.5em;"> <$list filter="[taglimit[1]]" emptyMessage="no saved stories"> select an existing story: .savedStoryList { width:100%; } <$select tiddler="$:/state/popup/loadstory" field="storyname" size="5" class="savedStoryList"> <$list filter="[tagremoveprefix]"><> <$button style="text-align:center;"> load <$action-setfield $tiddler="$:/StoryList" list={{{ [{$:/state/popup/loadstory!!storyname}addprefixget[list]] }}} /> <$action-deletetiddler $tiddler="$:/state/popup/loadstory" /> <$button popup="$:/state/popup/exportstory"> {{$:/core/images/export-button}} export story <$reveal type="popup" state="$:/state/popup/exportstory" class="tc-drop-down tc-popup-keep" style="min-width:auto;padding:0.5em;"> <$list filter="[taglimit[1]]" emptyMessage="no saved stories"> select an existing story: .savedStoryList { width:100%; } <$select tiddler="$:/state/popup/exportstory" field="storyname" size="5" class="savedStoryList"> <$list filter="[tagremoveprefix]"><> <$macrocall $name="exportButton" exportFilter={{{ [{$:/state/popup/exportstory!!storyname}addprefixget[list]] }}} lingoBase="$:/language/Buttons/ExportTiddlers/"/> On Wednesday, November 25, 2020 at 7:57:14 PM UTC-6 Eric Shulman wrote: > On Wednesday, November 25, 2020 at 5:01:52 PM UTC-8 > ad...@menswellbeing.org wrote: > >> Is it possible to save the story-river into a tiddler and then use that >> tiddler to open that story-river at a later time? >> > > The current StoryRiver contents are stored in $:/StoryList!!list. > > Here's a tiddler that defines two buttons... > one to save the current $:/StoryList!!list field to a separate tiddler > tagged with "savedStory", > and another to set the $:/StoryList!!list from the list field in a > "savedStory" tiddler: > > *StorySaver:* > <$button popup="$:/state/popup/savestory"> save story > <$reveal type="popup" state="$:/state/popup/savestory" class="tc-drop-down > tc-popup-keep" style="min-width:auto;padding:0.5em;"> >Enter a new story name: ><$edit-text tiddler="$:/state/popup/savestory" field="storyname" /> ><$list filter="[tag[savedStory]limit[1]]"> > or, select an existing story: >.savedStoryList { width:100%; } > <$select tiddler="$:/state/popup/savestory" field="storyname" > size="5" class="savedStoryList"> > <$list > filter="[tag[savedStory]]"><> > > ><$button style="text-align:center;"> save > <$action-setfield $tiddler={{$:/state/popup/savestory!!storyname}} > list={{$:/StoryList!!list}} tags="savedStory" /> > <$action-deletetiddler $tiddler="$:/state/popup/savestory" /> > > > <$button popup="$:/state/popup/loadstory"> load story > <$reveal type="popup" state="$:/state/popup/loadstory"
[tw5] Re: Saving a story-river
It remind me this old Tobias solution : http://tobibeer.github.io/tb5/#Saving%20And%20Loading%20A%20History%20Snapshot Le jeudi 26 novembre 2020 à 23:09:33 UTC+1, joshua@gmail.com a écrit : > Nice work Eric!!! > > On Wednesday, November 25, 2020 at 5:57:14 PM UTC-8 Eric Shulman wrote: > >> On Wednesday, November 25, 2020 at 5:01:52 PM UTC-8 >> ad...@menswellbeing.org wrote: >> >>> Is it possible to save the story-river into a tiddler and then use that >>> tiddler to open that story-river at a later time? >>> >> >> The current StoryRiver contents are stored in $:/StoryList!!list. >> >> Here's a tiddler that defines two buttons... >> one to save the current $:/StoryList!!list field to a separate tiddler >> tagged with "savedStory", >> and another to set the $:/StoryList!!list from the list field in a >> "savedStory" tiddler: >> >> *StorySaver:* >> <$button popup="$:/state/popup/savestory"> save story >> <$reveal type="popup" state="$:/state/popup/savestory" >> class="tc-drop-down tc-popup-keep" style="min-width:auto;padding:0.5em;"> >>Enter a new story name: >><$edit-text tiddler="$:/state/popup/savestory" field="storyname" /> >><$list filter="[tag[savedStory]limit[1]]"> >> or, select an existing story: >>.savedStoryList { width:100%; } >> <$select tiddler="$:/state/popup/savestory" field="storyname" >> size="5" class="savedStoryList"> >> <$list >> filter="[tag[savedStory]]"><> >> >> >><$button style="text-align:center;"> save >> <$action-setfield $tiddler={{$:/state/popup/savestory!!storyname}} >> list={{$:/StoryList!!list}} tags="savedStory" /> >> <$action-deletetiddler $tiddler="$:/state/popup/savestory" /> >> >> >> <$button popup="$:/state/popup/loadstory"> load story >> <$reveal type="popup" state="$:/state/popup/loadstory" >> class="tc-drop-down tc-popup-keep" style="min-width:auto;padding:0.5em;"> >><$list filter="[tag[savedStory]limit[1]]" emptyMessage="no saved >> stories"> >> select an existing story: >>.savedStoryList { width:100%; } >> <$select tiddler="$:/state/popup/loadstory" field="storyname" >> size="5" class="savedStoryList"> >> <$list >> filter="[tag[savedStory]]"><> >> >> >><$button style="text-align:center;"> load >> <$action-setfield $tiddler="$:/StoryList" list={{{ >> [{$:/state/popup/loadstory!!storyname}get[list]] }}} /> >> <$action-deletetiddler $tiddler="$:/state/popup/loadstory" /> >> >> >> >> To use these buttons, just insert {{StorySaver}} into any tiddler. >> Alternatively, you can add these buttons to the Sidebar by tagging the >> above tiddler with $:/tags/SideBarSegment. After tagging, you can >> reposition the buttons in the SideBar by viewing the tiddler and clicking >> on the $:/tags/SideBarSegment tag to display the list of tiddlers with that >> tag. You can then use drag-and-drop to move the buttons to the desired >> position in the list (e.g., above the $:/core/ui/SideBarSegments/tabs) >> >> enjoy, >> -e >> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/56a845da-90cd-4f38-970d-8bfc204fb1e4n%40googlegroups.com.
[tw5] Re: Saving a story-river
Nice work Eric!!! On Wednesday, November 25, 2020 at 5:57:14 PM UTC-8 Eric Shulman wrote: > On Wednesday, November 25, 2020 at 5:01:52 PM UTC-8 > ad...@menswellbeing.org wrote: > >> Is it possible to save the story-river into a tiddler and then use that >> tiddler to open that story-river at a later time? >> > > The current StoryRiver contents are stored in $:/StoryList!!list. > > Here's a tiddler that defines two buttons... > one to save the current $:/StoryList!!list field to a separate tiddler > tagged with "savedStory", > and another to set the $:/StoryList!!list from the list field in a > "savedStory" tiddler: > > *StorySaver:* > <$button popup="$:/state/popup/savestory"> save story > <$reveal type="popup" state="$:/state/popup/savestory" class="tc-drop-down > tc-popup-keep" style="min-width:auto;padding:0.5em;"> >Enter a new story name: ><$edit-text tiddler="$:/state/popup/savestory" field="storyname" /> ><$list filter="[tag[savedStory]limit[1]]"> > or, select an existing story: >.savedStoryList { width:100%; } > <$select tiddler="$:/state/popup/savestory" field="storyname" > size="5" class="savedStoryList"> > <$list > filter="[tag[savedStory]]"><> > > ><$button style="text-align:center;"> save > <$action-setfield $tiddler={{$:/state/popup/savestory!!storyname}} > list={{$:/StoryList!!list}} tags="savedStory" /> > <$action-deletetiddler $tiddler="$:/state/popup/savestory" /> > > > <$button popup="$:/state/popup/loadstory"> load story > <$reveal type="popup" state="$:/state/popup/loadstory" class="tc-drop-down > tc-popup-keep" style="min-width:auto;padding:0.5em;"> ><$list filter="[tag[savedStory]limit[1]]" emptyMessage="no saved > stories"> > select an existing story: >.savedStoryList { width:100%; } > <$select tiddler="$:/state/popup/loadstory" field="storyname" > size="5" class="savedStoryList"> > <$list > filter="[tag[savedStory]]"><> > > ><$button style="text-align:center;"> load > <$action-setfield $tiddler="$:/StoryList" list={{{ > [{$:/state/popup/loadstory!!storyname}get[list]] }}} /> > <$action-deletetiddler $tiddler="$:/state/popup/loadstory" /> > > > > To use these buttons, just insert {{StorySaver}} into any tiddler. > Alternatively, you can add these buttons to the Sidebar by tagging the > above tiddler with $:/tags/SideBarSegment. After tagging, you can > reposition the buttons in the SideBar by viewing the tiddler and clicking > on the $:/tags/SideBarSegment tag to display the list of tiddlers with that > tag. You can then use drag-and-drop to move the buttons to the desired > position in the list (e.g., above the $:/core/ui/SideBarSegments/tabs) > > enjoy, > -e > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5592f53d-a475-4c39-85a7-ce1eb86dc0bbn%40googlegroups.com.
[tw5] Re: Saving a story-river
Wonderful job! I think it worth to have a sidebar tab as Story! and then see list of saved story the button to load and save! and even an export story! This makes it great to distribute notes/docs/trails to other. --Mohammad On Thursday, November 26, 2020 at 5:27:14 AM UTC+3:30 Eric Shulman wrote: > On Wednesday, November 25, 2020 at 5:01:52 PM UTC-8 > ad...@menswellbeing.org wrote: > >> Is it possible to save the story-river into a tiddler and then use that >> tiddler to open that story-river at a later time? >> > > The current StoryRiver contents are stored in $:/StoryList!!list. > > Here's a tiddler that defines two buttons... > one to save the current $:/StoryList!!list field to a separate tiddler > tagged with "savedStory", > and another to set the $:/StoryList!!list from the list field in a > "savedStory" tiddler: > > *StorySaver:* > <$button popup="$:/state/popup/savestory"> save story > <$reveal type="popup" state="$:/state/popup/savestory" class="tc-drop-down > tc-popup-keep" style="min-width:auto;padding:0.5em;"> >Enter a new story name: ><$edit-text tiddler="$:/state/popup/savestory" field="storyname" /> ><$list filter="[tag[savedStory]limit[1]]"> > or, select an existing story: >.savedStoryList { width:100%; } > <$select tiddler="$:/state/popup/savestory" field="storyname" > size="5" class="savedStoryList"> > <$list > filter="[tag[savedStory]]"><> > > ><$button style="text-align:center;"> save > <$action-setfield $tiddler={{$:/state/popup/savestory!!storyname}} > list={{$:/StoryList!!list}} tags="savedStory" /> > <$action-deletetiddler $tiddler="$:/state/popup/savestory" /> > > > <$button popup="$:/state/popup/loadstory"> load story > <$reveal type="popup" state="$:/state/popup/loadstory" class="tc-drop-down > tc-popup-keep" style="min-width:auto;padding:0.5em;"> ><$list filter="[tag[savedStory]limit[1]]" emptyMessage="no saved > stories"> > select an existing story: >.savedStoryList { width:100%; } > <$select tiddler="$:/state/popup/loadstory" field="storyname" > size="5" class="savedStoryList"> > <$list > filter="[tag[savedStory]]"><> > > ><$button style="text-align:center;"> load > <$action-setfield $tiddler="$:/StoryList" list={{{ > [{$:/state/popup/loadstory!!storyname}get[list]] }}} /> > <$action-deletetiddler $tiddler="$:/state/popup/loadstory" /> > > > > To use these buttons, just insert {{StorySaver}} into any tiddler. > Alternatively, you can add these buttons to the Sidebar by tagging the > above tiddler with $:/tags/SideBarSegment. After tagging, you can > reposition the buttons in the SideBar by viewing the tiddler and clicking > on the $:/tags/SideBarSegment tag to display the list of tiddlers with that > tag. You can then use drag-and-drop to move the buttons to the desired > position in the list (e.g., above the $:/core/ui/SideBarSegments/tabs) > > enjoy, > -e > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/81e32fa3-23ae-4e09-81b8-14db038192afn%40googlegroups.com.
[tw5] Re: Saving a story-river
I enjoy very much! Thank you On Thursday, 26 November 2020 at 11:57:14 am UTC+10 Eric Shulman wrote: > On Wednesday, November 25, 2020 at 5:01:52 PM UTC-8 > ad...@menswellbeing.org wrote: > >> Is it possible to save the story-river into a tiddler and then use that >> tiddler to open that story-river at a later time? >> > > The current StoryRiver contents are stored in $:/StoryList!!list. > > Here's a tiddler that defines two buttons... > one to save the current $:/StoryList!!list field to a separate tiddler > tagged with "savedStory", > and another to set the $:/StoryList!!list from the list field in a > "savedStory" tiddler: > > *StorySaver:* > <$button popup="$:/state/popup/savestory"> save story > <$reveal type="popup" state="$:/state/popup/savestory" class="tc-drop-down > tc-popup-keep" style="min-width:auto;padding:0.5em;"> >Enter a new story name: ><$edit-text tiddler="$:/state/popup/savestory" field="storyname" /> ><$list filter="[tag[savedStory]limit[1]]"> > or, select an existing story: >.savedStoryList { width:100%; } > <$select tiddler="$:/state/popup/savestory" field="storyname" > size="5" class="savedStoryList"> > <$list > filter="[tag[savedStory]]"><> > > ><$button style="text-align:center;"> save > <$action-setfield $tiddler={{$:/state/popup/savestory!!storyname}} > list={{$:/StoryList!!list}} tags="savedStory" /> > <$action-deletetiddler $tiddler="$:/state/popup/savestory" /> > > > <$button popup="$:/state/popup/loadstory"> load story > <$reveal type="popup" state="$:/state/popup/loadstory" class="tc-drop-down > tc-popup-keep" style="min-width:auto;padding:0.5em;"> ><$list filter="[tag[savedStory]limit[1]]" emptyMessage="no saved > stories"> > select an existing story: >.savedStoryList { width:100%; } > <$select tiddler="$:/state/popup/loadstory" field="storyname" > size="5" class="savedStoryList"> > <$list > filter="[tag[savedStory]]"><> > > ><$button style="text-align:center;"> load > <$action-setfield $tiddler="$:/StoryList" list={{{ > [{$:/state/popup/loadstory!!storyname}get[list]] }}} /> > <$action-deletetiddler $tiddler="$:/state/popup/loadstory" /> > > > > To use these buttons, just insert {{StorySaver}} into any tiddler. > Alternatively, you can add these buttons to the Sidebar by tagging the > above tiddler with $:/tags/SideBarSegment. After tagging, you can > reposition the buttons in the SideBar by viewing the tiddler and clicking > on the $:/tags/SideBarSegment tag to display the list of tiddlers with that > tag. You can then use drag-and-drop to move the buttons to the desired > position in the list (e.g., above the $:/core/ui/SideBarSegments/tabs) > > enjoy, > -e > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1db0c11e-4edc-48c4-bbac-a161b2caf9b3n%40googlegroups.com.
[tw5] Re: Saving a story-river
On Wednesday, November 25, 2020 at 5:01:52 PM UTC-8 ad...@menswellbeing.org wrote: > Is it possible to save the story-river into a tiddler and then use that > tiddler to open that story-river at a later time? > The current StoryRiver contents are stored in $:/StoryList!!list. Here's a tiddler that defines two buttons... one to save the current $:/StoryList!!list field to a separate tiddler tagged with "savedStory", and another to set the $:/StoryList!!list from the list field in a "savedStory" tiddler: *StorySaver:* <$button popup="$:/state/popup/savestory"> save story <$reveal type="popup" state="$:/state/popup/savestory" class="tc-drop-down tc-popup-keep" style="min-width:auto;padding:0.5em;"> Enter a new story name: <$edit-text tiddler="$:/state/popup/savestory" field="storyname" /> <$list filter="[tag[savedStory]limit[1]]"> or, select an existing story: .savedStoryList { width:100%; } <$select tiddler="$:/state/popup/savestory" field="storyname" size="5" class="savedStoryList"> <$list filter="[tag[savedStory]]"><> <$button style="text-align:center;"> save <$action-setfield $tiddler={{$:/state/popup/savestory!!storyname}} list={{$:/StoryList!!list}} tags="savedStory" /> <$action-deletetiddler $tiddler="$:/state/popup/savestory" /> <$button popup="$:/state/popup/loadstory"> load story <$reveal type="popup" state="$:/state/popup/loadstory" class="tc-drop-down tc-popup-keep" style="min-width:auto;padding:0.5em;"> <$list filter="[tag[savedStory]limit[1]]" emptyMessage="no saved stories"> select an existing story: .savedStoryList { width:100%; } <$select tiddler="$:/state/popup/loadstory" field="storyname" size="5" class="savedStoryList"> <$list filter="[tag[savedStory]]"><> <$button style="text-align:center;"> load <$action-setfield $tiddler="$:/StoryList" list={{{ [{$:/state/popup/loadstory!!storyname}get[list]] }}} /> <$action-deletetiddler $tiddler="$:/state/popup/loadstory" /> To use these buttons, just insert {{StorySaver}} into any tiddler. Alternatively, you can add these buttons to the Sidebar by tagging the above tiddler with $:/tags/SideBarSegment. After tagging, you can reposition the buttons in the SideBar by viewing the tiddler and clicking on the $:/tags/SideBarSegment tag to display the list of tiddlers with that tag. You can then use drag-and-drop to move the buttons to the desired position in the list (e.g., above the $:/core/ui/SideBarSegments/tabs) enjoy, -e -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/93bf2446-9757-4652-a0b5-9f74b02c4e59n%40googlegroups.com.
[tw5] Re: Saving a story-river
Yes, but there is no pre-built UI for doing so. Setup a $button to copy the $:/StoryList tiddler to another name, driven by a text-input field (that points to a `$:/temp/StoryListTitle` title). Transclude that title for the button actions. Also in the actions, add a tag like `StoryList` to each saved StoryList tiddler. Then, setup a dropdown widget that gets a list of tiddlers tagged `StoryList`, and saves the selected one to `$:/temp/StoryListSelected`. Then have a button with actions that transclude that title, and use that to save a copy AS $:/StoryList (overwriting the current $:/StoryList). Best, Joshua F On Wednesday, November 25, 2020 at 5:01:52 PM UTC-8 ad...@menswellbeing.org wrote: > Hi there, > > Thanks to those posters who pointed out it is possible to drag-and-drop > tiddlers in the "Open" side-bar to re-order tiddlers in the story-river. > > Is it possible to save the story-river into a tiddler and then use that > tiddler to open that story-river at a later time? As you might guess I'm > looking to save a few custom story-rivers, one for each "audience" of > readers. > > Scott. > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/927fc799-0a68-4258-b88f-b672486414d5n%40googlegroups.com.