Tiddler Commander: A Tiddler Toolkit

426 views
Skip to first unread message

Mohammad

unread,
Feb 11, 2019, 11:00:28 AM2/11/19
to tiddl...@googlegroups.com



I am thinking on having a Tiddler Commander to do the below jobs in one place.

These are kind of batch (bulk) operation and work on a group of tiddlers or a bunch of tiddlers.
A bunch of tiddlers is a group of tiddlers meet some criteria like having a common tag, common filed, have a common word in their title, created the same day, or month or year and like that.

The bulk operation:
  1. Rename tiddlers
    1. use  a totally new name
    2. add a suffix/prefix to title
    3. add prefix to title
    4. replace part of title
    5. add ordinal number to title 
  2. Copy tiddlers (make duplicates)
  3. Add/remove tag or any field
  4. Change/replace the content of any field
  5. Create empty bulk tiddlers (for lecture or slideshow) having common properties (tag, field, part of text,...)
  6. Capability to undo the operation at least one step
  7. Capability to get the user confirmation before doing the operation
I want to have this minimal, simple to work and simple to understand.

I Know Most of These Tools are Already Developed and I need to collect the best of them.

I appreciate to have your comments/opinion on this tool. I appreciate who knows or has these tools to share them.

As there are expert Tiddliwikians in this forum, I appreciate if anybody else can help, manage or do the job.

Cheers
Mohammad

@TiddlyTweeter

unread,
Feb 11, 2019, 11:07:41 AM2/11/19
to TiddlyWiki
One thing.

Say I have a prefix of "$/tt/do/" and all those procedures need to be within it?

Josiah


On Monday, 11 February 2019 17:00:28 UTC+1, Mohammad wrote:
I am thinking on having a Tiddler Commander to do the below jobs in one place.

These are kind of batch (bulk) operation and work on a group of tiddlers or a bunch of tiddlers.
A bunch of tiddlers is a group of tiddlers meet some criteria like having a common tag, common filed, have a common word in their title, created the same day, or month or year and like that.

The bulk operation:
  1. Rename tiddlers
    1. use a totally new names
    1. add a suffix/prefix to title
    2. add prefix to title
    3. replace part of title
    4. add ordinal number to title 
    1. Copy tiddlers (make duplicates)
    2. Add/remove/replace tag or any field
    3. Change the contents of any field
    4. Create empty bulk tiddlers (for lectures or slideshow) having common properties (tag, field, part of text,...)
    1. Capability to undo the operation at least one step
    2. Capability to get the user confirmation before doing the operation
    I want to have this minimal, simple to work and simple to understand.

    Mohammad

    unread,
    Feb 11, 2019, 11:17:21 AM2/11/19
    to TiddlyWiki
    We can do them step by step.

    PMario

    unread,
    Feb 11, 2019, 11:55:49 AM2/11/19
    to TiddlyWiki
    HI,


    -m

    Mohammad

    unread,
    Feb 11, 2019, 1:14:16 PM2/11/19
    to TiddlyWiki
    That's true Mario.
     
    -Mohammad

    Watt

    unread,
    Feb 11, 2019, 1:45:06 PM2/11/19
    to TiddlyWiki
    Hi Mohammad, You are telepathic, I am trying to implement some of the operations that you list at the moment, scouring the forum for clues, so the methods you are collecting will be very helpful indeed. Nearly everything seems to have been done before here on the forum but finding the solutions that fit is always a struggle. Your collection is a real timesaver. Thanks.

    I'm trying for a 'modular' approach on my own project where distinct buttons offering different functions can be added to or removed from a 'menu' of my own, allowing a 'mix and match' option. Some operations are used regularly and stay in the menu, others are only needed occasionally, so can be toggled in and out of the menu as needed using reveal and checkboxes on a 'settings' tiddler. The batch operations themselves are almost like discrete extensions or add-ons in that respect. (When they work.)

    My small suggestion would be that you use a similar method to present each of your collected batch operations. I would like each batch operation to be a bolt-on snippet that can be applied almost 'off the shelf'.

    The https://www.w3schools.com reference pages are a very good resource model imo. As a novice I like to see things working 'live', with copyable code and plenty of buttons to press. Sometimes understanding follows.

    So I suggest one tiddler per operation with buttons that produce visible results and as many practical examples as possible, pretty much as you are doing. Possibly also a menu bringing them all together in an example application.

    The manager suggested by Mario doesn't do it for me as a beginner, although I'm sure all the information is there, but pleasing every ability level is the challenge.

    You are taking on a big job Mohammad and I would be pleased to help in any way I can, even if it is only with documentation write up or feedback, so ask away if it would help. Good luck.

    Mohammad

    unread,
    Feb 11, 2019, 1:59:29 PM2/11/19
    to TiddlyWiki
    Thanks Watt!
    I will remain for a few days to see what other think and say, as you said I am sure most of these are available and we need to ask and collect the best of them,
    It would be a pleasure to work with together.

    Best
    Mohammad

    TonyM

    unread,
    Feb 11, 2019, 6:52:18 PM2/11/19
    to TiddlyWiki
    Mohammad,

    Inspired by your desire to do this I was thinking what if at the same time as selecting the various options for a particular batch process an intermediate "code" result was displayed (in parallel to a working button) that could be copied and pasted elsewhere and operate independently. 

    So lets say we use a filter to add a prefix to a set of tiddlers. We could take this info and present a piece of code, that copied and pasted, will do as requested, or can be modified to have a different filter and prefix. I will take a little more work initially, but not too much because it will be the same logic, but will have long term utility and extencibility. 

    This is taking an approach of my own I call the "TiddlyWiki Factory" where I build the means to build wikis, rather than just build them. I have a few example such as generating a toggle Tag button and view template addition.

    Happy to collaborate if this interests you.

    Regards
    Tony

    Mohammad

    unread,
    Feb 11, 2019, 11:16:52 PM2/11/19
    to TiddlyWiki
    Thanks Tony!
     Good idea! I see a similar approach in the http://tiddlywiki.psat.com.au/TW5NewUser.html
    That is an advanced feature, but as you said it could be great for saving for later use.

    Keep going on and share your work.

    Cheers
    Mohammad

    TonyM

    unread,
    Mar 7, 2019, 9:22:05 PM3/7/19
    to TiddlyWiki
    Mohammad,I found some time to review the latest release of commander. Here is an alternate way to arrange the front page

    2019-03-08_13-13-05.jpg


    And the Text of Quick Start if you want to use it


    *Use ''search via Filter Expression'' to list possible tiddlers
    *Use ''Select Tiddlers'' for the resulting list to identify which specific tiddlers to do a batch operation on
    *From ''Batch Operations tabs'' select the batch Operation you wish to perform on selected tiddlers
    *Notes:
    **//Multiple batch operations can be done on the same set (unless you change something in the search criteria)//
    **//Sometimes it is useful to use an intermediate batch to help, like tag tiddlers with a "working" tag, using multiple searches, then then use the "working" tag to apply a batch operation to//


    Further many of your macros may be able to be used other ways.  Can I suggest in each tiddler with a macro not dedicated to Commander, that you add the field macro-macroname where macro name is exactly how it is named. Then in the field macro-macroname add the format .
    <<macroname tiddlername>> Describe and tell them about the parameters

    You can then list all fields with the prefix "macro-" display there format and the tiddler in which they are defined.

    Ask if you want related code snippets. I would love to see this or something similar as a "defacto" standard for macro definitions.

    Regards
    Tony

    TonyM

    unread,
    Mar 7, 2019, 9:27:22 PM3/7/19
    to TiddlyWiki
    Post Script

    A Graphic example of macros listed with a format. The Title links to the source tiddler

    2019-03-08_13-25-51.jpg


    This thus lists macros I may wish to reuse that comes with all installed macros/plugins (of my own)

    Regards
    Tony

    Mohammad

    unread,
    Mar 8, 2019, 12:00:59 AM3/8/19
    to TiddlyWiki
    Hi Tony!
    Many thanks for your comments. I am preparing a help and add some question marks each will show
    a help tiddler related to that specific subject! I will use your quick start! Thank you

    Regarding to macros! I am preparing a developer version of Tiddler Commander! I will use your approach in that
    version! I also believe if I can make components, they can be used (exported) independently to other wikis.

    Tiddler Commander code has a lot of things to learn and many people in this forum helped in development.

    --Mohammad

    @TiddlyTweeter

    unread,
    Mar 8, 2019, 4:07:33 PM3/8/19
    to TiddlyWiki
    Mohammad

    Small request that you give "short-forms" for all flags in SNR.

    Like this ...

    {0B98F9D5-6634-425B-B3EE-D996C7FE9D71}.png.jpg

    It would make documentation easier having a single letter for each flag. So i w g m f ?

    Best wishes
    Josiah

    @TiddlyTweeter

    unread,
    Mar 9, 2019, 8:14:36 AM3/9/19
    to TiddlyWiki
    Ciao Mohammad and all,

    I have more suggestions. I make them one by one so others can comment. 

    HELP 

    I think it would be good to have a Help Popup? Perhaps containing something like the Regex Quick Reference I sent you? Maybe something like this ...

    {C133D232-0132-4717-84EF-0B8FC76AAF4F}.png.jpg


    Best wishes
    Josiah

    @TiddlyTweeter

    unread,
    Mar 9, 2019, 8:58:07 AM3/9/19
    to tiddl...@googlegroups.com
    Ciao Mohammad and all ...


    REPLACE BUTTONS

    I suggest that ...

    1 -- Replace buttons are changed so its clearer what they do. Current first. ALL second.

    2 -- Buttons are Repeated at top AND bottom of the diff view.
          Reason: When you replace in long tiddlers you don't need to scroll down.

    3 -- Are placed inside the diff. box.

    I hope this image makes it clearer?

    {A5B8E483-6787-4C0E-8EA4-87269EF16517}.png.jpg

    Best wishes
    Josiah

    @TiddlyTweeter

    unread,
    Mar 9, 2019, 9:19:02 AM3/9/19
    to TiddlyWiki
    Mohammad wrote:
    ... I want to have this minimal, simple to work and simple to understand.

    I completely agree. It's an interesting design issue though. 

    Because you made very powerful tools that users may sometimes need help with?

    How much complexity is needed---how minimal the design can be---is an interesting issue.

    I'd guess that SNR module needs to be a bit more complex? 
    Mainly because it enables  powerful changes through Regex that many users are not familiar with?

    Just thoughts
    Josiah


    @TiddlyTweeter

    unread,
    Mar 9, 2019, 9:54:19 AM3/9/19
    to TiddlyWiki
    Mohammad wrote:
    ... I Know Most of These Tools are Already Developed ...

    Right.

    But they are NOT Modular Design.

    You are the first TW programmer of plugins who explicitly values Modularity I ever came across.

    Modularity would let us scale much better. 

    Why can't plugins inter-work? 

    LACK of standards on things like state tiddler naming.

    Best wishes
    Josiah

    Mohammad

    unread,
    Mar 9, 2019, 10:59:53 AM3/9/19
    to TiddlyWiki
    Hi Josiah!
    I used those abbreviated letters from rexexp documentation. They are real flags!
    But f, and w are not! Don't you think this may cause confusion!

    --Mohammad

    Mohammad

    unread,
    Mar 9, 2019, 11:00:56 AM3/9/19
    to TiddlyWiki
    Great!
     TonyM also send a tiddler on a quick start! 
    I will prepare a small system help!

    --Mohammad

    Mohammad

    unread,
    Mar 9, 2019, 11:04:34 AM3/9/19
    to TiddlyWiki
    Agree!

    Mohammad

    unread,
    Mar 9, 2019, 11:06:52 AM3/9/19
    to TiddlyWiki
    I think this is a big problem and TW developer specially Jeremy can address this!
    In Commander, adding new operation is simple!


    I am developing some TW components! These are objects can be used with other plugins
    and can be used a complex design!


    --Mohammad

    @TiddlyTweeter

    unread,
    Mar 9, 2019, 11:20:33 AM3/9/19
    to tiddl...@googlegroups.com
    Ciao M

    I do see the issue. 

    But we talking here about a TW app., not regex per se.

    Not having the flags makes documentation difficult.

    J.

    @TiddlyTweeter

    unread,
    Mar 11, 2019, 12:50:25 PM3/11/19
    to TiddlyWiki
    Mohammad,

    Sorry to have to report there are issues with the Difference Engine in SNR that wiil lead to serious CONFUSION for users :-(.

    Is the issue in SNR or the Difference Engine itself? ...

    This shows the problem ...

    {0AAE77CC-6579-4B71-A76B-DA1861BAFB28}.png.jpg


    The settings for this test were ...

    {3C005AB5-520B-42D7-9790-09B9AF55A0D0}.png.jpg

    Note : The actual Replace in Tiddler was correct. But the DISPLAY is very inaccurate.

    Best wishes
    Josiah 


    @TiddlyTweeter

    unread,
    Mar 11, 2019, 1:11:10 PM3/11/19
    to TiddlyWiki
    Ciao Mohammad

    An issue now is because the Difference Engine is displaying in a CONFUSING way is how useful can tutorials be???

    I think, at the beginning, users need to be able to clearly see the effect of changes they intend. Right now it's likely too messy to learn from??

    Best wishes
    Josiah

    Mohammad

    unread,
    Mar 11, 2019, 2:31:03 PM3/11/19
    to TiddlyWiki
    Hi Josiah,
     Could you send the tiddler text and explain what the below example should do?

    --Mohammad

    Mohammad

    unread,
    Mar 11, 2019, 2:35:01 PM3/11/19
    to TiddlyWiki
    Hi Josiah,
     I will take a look. I think if we consider two level of usage for SNR in Commander then they are

    1. Simple character, word, sentences search and replacement
    2. Advanced search and replace using Regular Expressions
    Then I think the most usage for beginners and moderate TW users is item one where SNR works like a charm.

    For the second advanced application of SNR, then we need your evaluation and see what are the limitation and what are the issues.

    I appreciate your time for evaluating and error reporting.

    Keep doing it and lets improve SNR.

    --Mohammad

    @TiddlyTweeter

    unread,
    Mar 11, 2019, 2:53:52 PM3/11/19
    to TiddlyWiki
    Ciao Mohammad

    Illustrating simple Replace is no problem.

    BUT there is the importance of regex. SNR is a regex engine so its important that its diff engine is accurate.

    The real power in SNR is for Regular Expressions not simple replace. 

    Otherwise, why bother?

    I'll send you a detailed example.

    Best wishes
    Josiah

    @TiddlyTweeter

    unread,
    Mar 11, 2019, 3:16:26 PM3/11/19
    to TiddlyWiki
    Mohammad

    Part of the problem is few people will understand what ...

    (\b\w+\b)(\s+)(\b\1\b)

    ... means unless they can see the result under flags i g reliably.

    It is actually  simple, once you understand it, but the diff engine I think is making it hard to understand.

    Best wishes
    Josiah

    @TiddlyTweeter

    unread,
    Mar 12, 2019, 9:56:48 AM3/12/19
    to TiddlyWiki
    Cari

    I put a demo online at http://tidbits.wiki/bin/mohammad_snr.html that shows how that match works.

    Josiah

    Mohammad

    unread,
    Mar 14, 2019, 7:06:44 AM3/14/19
    to TiddlyWiki
    Added as help!


    On Friday, March 8, 2019 at 5:52:05 AM UTC+3:30, TonyM wrote:

    Watt

    unread,
    Mar 14, 2019, 9:05:33 AM3/14/19
    to TiddlyWiki
    Hi Mohammad

    Tiddler Commander is looking better all the time. You are so prolific it is hard to keep up with you! Thanks for your persistent efforts and developing this very useful tool.

    I have two requests to try and slow you down!

    1. Is easy. Could you include a footer on all your forum posts with links to your project homepages? The forum here moves on quickly and it's not always easy backtracking to find the links.

    2. Not so easy, but I would like to second Tony's suggestion above:

    "Can I suggest in each tiddler with a macro not dedicated to Commander, that you add the field macro-macroname where macro name is exactly how it is named. Then in the field macro-macroname add the format .
    <<macroname tiddlername>> Describe and tell them about the parameters

    You can then list all fields with the prefix "macro-" display there format and the tiddler in which they are defined."

    Maybe this list could be incorporated and promoted here:
    https://kookma.github.io/TW-Commander/#Index%20of%20TW5%20batch%20operations

    At the moment the Commander uses many useful and applicable filters that would serve as wonderful examples for TW users of all levels, but the magic is by necessity hidden within the workings of the machine.

    As a perpetual beginner I would love to see the mechanics explained a little more or at least be a little more accessible to users who would like to apply them in their own projects.

    As Tony suggests, appropriate id fields, maybe combined with structured templates for each macro/filter category, might allow a separate tiddler for each description and allow you to generate an illustrative library of filters and macros. With a working Tiddler Commander to show them in action!

    Maybe with the addition of a brief explanation of the role of filters and macros in TW you would be producing an invaluable practical tool and an educational resource at the same time. That nobel prize could be within reach Mohammad!

    All easier said than done I'm sure. I told you I was trying to slow you down ;)
    If all that sounds like too much would simply adding a small info button to Tiddler Commander that shows the full filter currently being applied be possible? (Not just the user input part eg 'tag[xx]' but the fully constructed filter).

    In any event keep up the great work and thanks for Tiddler Commander.


    Mohammad

    unread,
    Mar 14, 2019, 9:25:01 AM3/14/19
    to TiddlyWiki
    Hello Watt,
     Many thanks for your feedback!

    Sure, I absolutely will document all parts of Commander! I will do what you are asked!

    By the way at the moment all of my efforts focused on finalizing the Commander to be distributed as PLUGIN!
    As you see still is as Release Candidate and is not packaged as plugin!

    After I get a stable version, I will start documenting! I myself learned alot in developing Commander! 

    One important point: If you go deeper, you will find Commander is modular! Of course it can be much better, but
    you can simply on/off features! and add your own! To ease this part, I gonna to write developer document!

    Please keep in touch and let me know your feedback evaluating Commander!

    Last point: Commander developed by help of all of you! If you search this forum you see many people involved directly or indirectly! So, I think
    Commander is a collaborative project!

    Thank you Watt! Thank you all

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