Vision of a taglistmacro (maybe a little naive?) In a future Utopia we could have a combination of both scripts with prompts for 1) Title of the Tiddler with the list 2) Prompt for Tag and 3) prompt for fieldname and value (optional).
If the process could be automated so 1) the macro "knows" the tiddlertitle because it is invoked from the toolbar of the tiddler (should ask: do you really want to tag this list of tiddlertitles?) 2) You are asked to choose a tagname or fieldname (if you don't choose it - it don't ask for value ofcourse) - and the first macro runs a) the bracketing and puts the bracketed list into a temporary list (SomeList) b) the second macro uses the tagname or/and fieldname/value to add to the listed tiddlertitles. The SomeListtiddler is deleted/content erased - and you get a popup which shows the progress and result of the operation. YS Måns Mårtensson On 28 Aug., 16:22, Måns <[email protected]> wrote: > If there could be a prompt for choosing a tagname in the first script > (instead of a prompt for TiddlerTitle) it would be nice. > <script label="ListT"> > var titles=store.getTiddlerText("SomeList").readBracketedList(); > for (var i=0; i<titles.length; i++) store.setTiddlerTag(titles > [i],true,'Prompt4tagName'); > </script> > > YS Måns Mårtensson > > On 28 Aug., 15:49, Måns <[email protected]> wrote: > > > > > That's perfectly ok - Btw - thanks for the enlightening conversation > > through tinyChathttp://www.tiddlytools.com/#TinyChat-Nice to hear > > and see you in live conversation!! > > > Next step would be to change a script i have to convert a list of > > tiddlernames to a bracketed list and send it to SomeList - so I can > > use ListeMakro to add a tag to all bracketed tiddlertitles. > > > My script does read a list and converts it into bracketed titles on a > > line - in the tagfield. > > What it should do is to keep the list with linebreaks, bracket each > > line of words and send the result to the SomeList tiddler instead. > > > Is this doable? - if it is - all things has been accomplished: > > <script label="L2B" title="List2BracketedListSomeList"> > > var here=story.findContainingTiddler(place); > > if (!here) return; > > var title=here.getAttribute("tiddler"); > > var tiddler=store.getTiddler(title); > > var t=store.getTiddlerText(tiddler.title) ; > > var target = store.getTiddler(tiddler.title) ; > > var taglist = t.split('\n') ; > > for(var i=0 ; i < taglist.length ; i++) { > > if ( taglist[i] && ! target.tags.contains(taglist[i]) ) > > target.tags.push( taglist[i] ) ; > > } > > return 'List is bracketed and copied to SomeList - go to SomeList > > and use ListT-button to tag all tiddlers in the list at once' ; > > </script> > > > YS Måns Mårtensson > > > On 28 Aug., 02:49, Eric Shulman <[email protected]> wrote: > > > > > I changed 'Tagname' to HoldListeBilleder and all bracketed > > > > tiddlertitles were added the tag: "true" > > > > After this operation I lost the ability to save the TW and I had to > > > > restart... > > > > I dont get it ... > > > > eek! I goofed... I got the order of the parameters reversed... > > > > Instead of: > > > store.setTiddlerTag(titles[i],'tagName',true); > > > it should be: > > > store.setTiddlerTag(titles[i],true,'tagName'); > > > > sorry about that! > > > > enjoy, > > > -e --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en -~----------~----~----~----~------~----~------~--~---

