StorySaverPlugin enhancement request

11 views
Skip to first unread message

rouilj

unread,
Jul 19, 2009, 10:37:03 PM7/19/09
to TiddlyWiki
Hi all:

I am using TiddlyWiki as a coursebook for a course I will be teaching
in November.

I have arranaged the chapters of the coursebook as stories so that all
the tiddlers that make up a chapter can be opened as a single unit,
however I need advice/ideas on handling some issues.

I am using the list function of the openStory macro to produce a list
of all the chapters (and presentations)
to allow the student to access the chapters. However the pulldown menu
that is shown uses the word story
rather than section or some other term. To change this to use terms
more friendly to the coursebook,
I created a tiddler zzLocalSettings tagged with systemConfig with the
contents:

config.macros.openStory.label = "open: %0";
config.macros.openStory.popuplabel = "section";
config.macros.openStory.selectprompt = "select a section...";
config.macros.openStory.foldprompt = "fold story tiddlers when
opening a section";
config.macros.openStory.closeprompt = "close other tiddlers when
opening a section";

So this seems to have handled that issue, except that the "add a
story..." menu item is still shown. While I can change the text, I
would like to totally remove that entry. Does anybody have an idea on
how to remove that without doing surgery on the StorySaverPlugin (make
future upgrades difficult)?

Also I was thinking of having multiple "Stories". It seems that it
should be possible to support an
optional tag parameter to the openStory and saveStory macros that
allows support for alternate
story tags (in my particular case "Presentations" and "Chapters").
Even though I don't use it, a similar
change to the storyViewer macro in the StoryViewerPlugin would
probably also be useful.

To allow the student to print off multiple chapters, I thought I could
just open chapter 1 clearing
all the other open tiddlers. Then I could open Chapter 2 while keeping
the other tiddlers (i.e. chapter 1)
open and then continue with chapter 3. However Chapter 2 opens at the
top of the story column and
not at the end. Would it be possible to add a new view option(s) that
control where the new story
tiddlers gets opened?

While I think I can use http://www.TiddlyTools.com/#SinglePageModePlugin
to allow the user
to select opening of the tiddlers at the bottom of the story column,
it would be nice to not have
to install it, or at least to be able to configure the settings via
the view options menu in openStory.

Thanks for any ideas.

-- rouilj

Anthony Muscio

unread,
Jul 20, 2009, 10:26:13 PM7/20/09
to Tiddl...@googlegroups.com
This could be close to what you are after.

I have a set of Canned Stories that I can re-save, including that for default tiddlers, and have modified the unmodifiable titles with the rename button macro. The rename button macro came from http://tw.lewcid.org/#HoverMenuPlugin

I have a Tiddler in my Right Hand Side menu, opened by a slider, that reads;

<<openStory BOD "BOD" tooltip>> <<storyViewer BOD list onlybuttons>> [[View/Edit|BOD]]
<<openStory MOD "MOD" tooltip>> <<storyViewer MOD list onlybuttons>> [[View/Edit|MOD]]
<<openStory EOD "EOD" tooltip>> <<storyViewer EOD list onlybuttons>> [[View/Edit|EOD]]
----
Save open tiddlers as;
<<saveStory>><<renameButton 'Default Tiddlers' 'Set open tiddlers as Default tiddlers'>>
<<saveStory SavedStory>><<renameButton SavedStory 'Set open tiddlers in SavedStory'>> Open <<openStory SavedStory "SavedStory" tooltip>>
<<saveStory BOD>><<renameButton BOD 'Set open tiddlers in Beginning of day'>>
<<saveStory MOD>><<renameButton MOD 'Set open tiddlers in Middle of day'>>
<<saveStory EOD>><<renameButton EOD 'Set open tiddlers in End of day'>>
----
[[Edit|Stories]]


Regards Tony


TonyM

If you have not found an easy way to do it with TiddlyWiki, you have missed something.
www.tiddlywiki.com

rouilj

unread,
Jul 25, 2009, 2:31:45 PM7/25/09
to TiddlyWiki
Hi Anthony:

On Jul 20, 10:26 pm, Anthony Muscio <anthony.mus...@gmail.com> wrote:
> This could be close to what you are after.

Well I really want to use the drop down list to open the story
tiddlers rather than creating explicit links/buttons. The drop down
list reduces the amount of space needed for the user to see the
chapters/presentation/quizzes and also is automatically maintained. I
did use your method originally, but found it a pain as too much
scrolling was needed to find the section I wanted to open and I kept
forgetting to add new sections to the list.

> I have a set of Canned Stories that I can re-save, including that
> for default tiddlers, and have modified the unmodifiable titles with
> the rename button macro. The rename button macro came from
> http://tw.lewcid.org/#HoverMenuPlugin

Hmm, looks like tw.lucid.org is kind of broken right now. Getting a
python traceback from there.

> I have a Tiddler in my Right Hand Side menu, opened by a slider,
> that reads;
>
> <<openStory BOD "BOD" tooltip>> <<storyViewer BOD list onlybuttons>>
> [[View/Edit|BOD]]
> <<openStory MOD "MOD" tooltip>> <<storyViewer MOD list onlybuttons>>
> [[View/Edit|MOD]]
> <<openStory EOD "EOD" tooltip>> <<storyViewer EOD list onlybuttons>>
> [[View/Edit|EOD]]
> ----
> Save open tiddlers as;
> <<saveStory>><<renameButton 'Default Tiddlers' 'Set open tiddlers as Default
> tiddlers'>>
> <<saveStory SavedStory>><<renameButton SavedStory 'Set open tiddlers in
> SavedStory'>> Open <<openStory SavedStory "SavedStory" tooltip>>
> <<saveStory BOD>><<renameButton BOD 'Set open tiddlers in Beginning of
> day'>>
> <<saveStory MOD>><<renameButton MOD 'Set open tiddlers in Middle of day'>>
> <<saveStory EOD>><<renameButton EOD 'Set open tiddlers in End of day'>>
> ----
> [[Edit|Stories]]

Nice feature with the button renaming though.

This does address the ability to have multiple story types by creating
the lists manually, but again I would prefer to not have to do that
maintenance.

However this doesn't seem to address the location where the new
tiddlers are opened does it? Or am I just missing something.

-- rouilj

Eric Shulman

unread,
Jul 26, 2009, 6:22:25 PM7/26/09
to TiddlyWiki
> I am using the list function of the openStory macro...
> ...to use terms more friendly to the coursebook,
> I created a tiddler zzLocalSettings tagged with systemConfig...

That's the right approach... one suggestion: instead of using
[[zzLocalSettings]], I recommend calling it
[[StorySaverPluginConfig]]. This ensures that, just like
zzLocalSettings, it will be invoked alphabetically following
StorySaverPlugin, so that it can override the desired text values, but
also makes it clear that those override values are related to
specifically to StorySaverPlugin.

> So this seems to have handled that issue, except that the "add a
> story..." menu item is still shown. While I can change the text, I
> would like to totally remove that entry.

The 'add a story' command is automatically omitted if the document is
being viewed in read-only mode. Are you saying that you also want to
be able to omit that menu item even when the document is editable?

> Also I was thinking of having multiple "Stories". It seems that it
> should be possible to support an
> optional tag parameter to the openStory and saveStory macros that
> allows support for alternate
> story tags (in my particular case "Presentations" and "Chapters").

OK... I've just added 'extra tags' and 'tag filter' params to the
macros defined by
http://www.TiddlyTools.com/#StorySaverPlugin (v1.6.0)

new usage:

<<saveStory ask 'save story' 'tooltip' tag tag tag...>>
* optional params following the 'tooltip' are added as tags to newly
saved story tiddler (in addition to the default 'story' tag)

<<openStory list tagValue>>
<<openStory popup label tip tagValue>>
* optional tagValue (default='story') specifies which tag should be
used to match tiddlers that are to be listed as 'stories'. Note: if
you have TiddlyTools' MatchTagsPlugin installed, you can also use
boolean //tag expressions// to match complex sets of tiddlers.

> Even though I don't use it, a similar
> change to the storyViewer macro in the StoryViewerPlugin would
> probably also be useful.

working on it...

> Would it be possible to add a new view option(s) that
> control where the new story tiddlers gets opened?

possibly... let me think on it for a few minutes...

enjoy,
-e

rouilj

unread,
Jul 26, 2009, 11:12:44 PM7/26/09
to TiddlyWiki
On Jul 26, 6:22 pm, Eric Shulman <elsdes...@gmail.com> wrote:
> > I am using the list function of the openStory macro...
> > ...to use terms more friendly to the coursebook,
> > I created a tiddler zzLocalSettings tagged with systemConfig...
>
> That's the right approach...  one suggestion: instead of using
> [[zzLocalSettings]], I recommend calling it
> [[StorySaverPluginConfig]].

Ahh cool idea. Thanks.

I am able to use a single redefinition of the terms replacing story
with
section for all invocations of the StorySaverPlugin. I am wondering if
there is a simple solution to replace:

"story" with "chapter" if I am looking at a series of chapters,
"story" with "quiz" if I am looking at a series of quizzes

etc. I am happy with the current mechanism, but I am afraid my asking
you to add the multiple story type support opened this can of worms
as well.

> > So this seems to have handled that issue, except that the "add a
> > story..." menu item is still shown. While I can change the text, I
> > would like to totally remove that entry.
>
> The 'add a story' command is automatically omitted if the document is
> being viewed in read-only mode.  Are you saying that you also want to
> be able to omit that menu item even when the document is editable?

Correct. I have a pull down set of chapters/presentations/quizzes and
I
would like to remove anything that may confuse the student.

> > Also I was thinking of having multiple "Stories". It seems that it
> > should be possible to support an
> > optional tag parameter to the openStory and saveStory macros that
> > allows support for alternate
> > story tags (in my particular case "Presentations" and "Chapters").
>
> OK... I've just added 'extra tags' and 'tag filter' params to the
> macros defined by
>    http://www.TiddlyTools.com/#StorySaverPlugin(v1.6.0)

Cool. I'll import it now and take a look.

> [...] Note: if
> you have TiddlyTools' MatchTagsPlugin installed, you can also use
> boolean //tag expressions// to match complex sets of tiddlers.

Oh very cool. I have a nice use case for this.

> > Would it be possible to add a new view option(s) that
> > control where the new story tiddlers gets opened?
>
> possibly... let me think on it for a few minutes...

Thanks. I see this being treated similarly to the "close others"
viewing options in the pulldown. So the view options would look like:

[ ] "close others"
[x] "open at botton"
[ ] "open at top"

-- rouilj

Eric Shulman

unread,
Jul 27, 2009, 7:13:20 PM7/27/09
to TiddlyWiki
> > The 'add a story' command is automatically omitted if the document is
> > being viewed in read-only mode.  Are you saying that you also want to
> > be able to omit that menu item even when the document is editable?
> Correct. I have a pull down set of chapters/presentations/quizzes and
> I would like to remove anything that may confuse the student.

ok. I've added a new checkbox option setting:
<<option chkStoryAllowAdd>>
with a default=true

> > > Would it be possible to add a new view option(s) that
> > > control where the new story tiddlers gets opened?
> I see this being treated similarly to the "close others"
> viewing options in the pulldown. So the view options would look like:
>  [ ] "close others"
>  [x] "open at botton"
>  [ ] "open at top"

Seems reasonable. Note that "open at top/bottom" options are only
applicable when "close others" is not checked.

Get the update (v1.7.0) here:
http://www.TiddlyTools.com/#StorySaverPlugin

enjoy,
-e

rouilj

unread,
Jul 27, 2009, 8:49:11 PM7/27/09
to TiddlyWiki
Hi Eric:

On Jul 27, 7:13 pm, Eric Shulman <elsdes...@gmail.com> wrote:
> > > The 'add a story' command is automatically omitted if the document is
> > > being viewed in read-only mode.  Are you saying that you also want to
> > > be able to omit that menu item even when the document is editable?
> > Correct. I have a pull down set of chapters/presentations/quizzes and
> > I would like to remove anything that may confuse the student.
>
> ok.  I've added a new checkbox option setting:
>    <<option chkStoryAllowAdd>>
> with a default=true

Can it be used as: <<openStory chkStoryAllowAdd:false list tags>>, or
to make it permanent do I have to add:

config.options.chkStoryAllowAdd = false;

to my StorySaverPluginConfig tiddler?

I tried the StorySaverPluginConfig change, saved and reloaded the TW,
but the add option
is still in the list pulldown when called with:

<<openStory list "story and Presentation" >>


> > > > Would it be possible to add a new view option(s) that
> > > > control where the new story tiddlers gets opened?
> > I see this being treated similarly to the "close others"
> > viewing options in the pulldown. So the view options would look like:
> >  [ ] "close others"
> >  [x] "open at botton"
> >  [ ] "open at top"
>
> Seems reasonable.  Note that "open at top/bottom" options are only
> applicable when "close others" is not checked.

Yup. I think they really act like radio buttons since only one of them
makes sense.

> Get the update (v1.7.0) here:
>    http://www.TiddlyTools.com/#StorySaverPlugin

I did, but something looks wierd in the StorySaverPluginInfo tiddler.
I used
the import plugin from your site to perform the import. However, I see
bold
italics text starting at the part of the tiddler that reads:

where:
* list
shows a droplist of all saved stories, plus additional
commands/viewing options. Selecting a story opens the
corresponding tiddlers.
* popup
shows a popup display containing a list of all saved stories,
plus additional commands/viewing options. Selecting
a story opens the corresponding tiddlers.

the bold italics starts as "shows a dropdown....". When I look at the
source I see:

where:
*list''<br>shows a droplist of all saved stories, plus additional
commands/viewing options. Selecting a story
*popup''<br>shows a popup display containing a list of all saved
stories, plus additional commands/viewing options.
*storyname<br>is

I truncated the lines rather than wrapping them. On your web site
viewing the Info tiddler shows

where:
*''list''
*''popup''

but when I imported it it stripped the leading '' somehow. Any ideas?

Sorry to be such a pain but...

-- rouilj

Eric Shulman

unread,
Jul 27, 2009, 10:39:58 PM7/27/09
to TiddlyWiki
> > ok.  I've added a new checkbox option setting:
> >    <<option chkStoryAllowAdd>>
> > with a default=true
>
> Can it be used as: <<openStory chkStoryAllowAdd:false list tags>>, or
> to make it permanent do I have to add:
>   config.options.chkStoryAllowAdd = false;
> to my StorySaverPluginConfig tiddler?

The latter. Adding another use-case specific optional param that has
to be processed by the macro is much more involved than simply adding
the global option setting.

> I tried the StorySaverPluginConfig change, saved and reloaded the TW,
> but the add option
> is still in the list pulldown when called with:
>     <<openStory list "story and Presentation" >>
...
> something looks wierd in the StorySaverPluginInfo tiddler.

oops. I missed one placed in the code for handling the
chkStoryAllowAdd flag, and I had an couple of unintentionally mis-
matched bold ('') sequences in the documentation. They've been
fixed. Get the update (v1.7.1) here:
http://www.TiddlyTools.com/#StorySaverPlugin
http://www.TiddlyTools.com/#StorySaverPluginInfo

enjoy,
-e

rouilj

unread,
Jul 27, 2009, 11:11:47 PM7/27/09
to TiddlyWiki
Hi Eric:

On Jul 27, 10:39 pm, Eric Shulman <elsdes...@gmail.com> wrote:
> > > ok.  I've added a new checkbox option setting:
> > >    <<option chkStoryAllowAdd>>
> > > with a default=true
>
> > Can it be used as: <<openStory chkStoryAllowAdd:false list tags>>, or
> > to make it permanent do I have to add:
> >   config.options.chkStoryAllowAdd = false;
> > to my StorySaverPluginConfig tiddler?
>
> The latter.  Adding another use-case specific optional param that has
> to be processed by the macro is much more involved than simply adding
> the global option setting.

Ah ok. that works for me. The student can turn it on in all the lists
if they
want to. If the user changes this option (checking the box in the
options macro)
is the option change stored in a cookie? So the next time the user
opens the TW
the chkStoryAllowAdd is set to true?

> > I tried the StorySaverPluginConfig change, saved and reloaded the TW,
> > but the add option
> > is still in the list pulldown when called with:
> >     <<openStory list "story and Presentation" >>
> ...
> > something looks wierd in the StorySaverPluginInfo tiddler.
>
> oops.  I missed one placed in the code for handling the
> chkStoryAllowAdd flag, and I had an couple of unintentionally mis-
> matched bold ('') sequences in the documentation.  They've been
> fixed.  Get the update (v1.7.1) here:
>    http://www.TiddlyTools.com/#StorySaverPlugin
>    http://www.TiddlyTools.com/#StorySaverPluginInfo

Looks much better and the dreaded "add" item is missing.

One thing that is a bit odd, is that I can check both the
"Open at top" and "Open at bottom" items in the menu provided
I do not check the "Close others" option. Is this intentional?
If so it looks like open at bottom takes priority.

Maybe reordering the list so that the view opions are in priority
order would be useful?

In any case thanks very much for the changes. This looks really
good.

-- rouilj
Reply all
Reply to author
Forward
0 new messages