Tiddler Commander 2.0: Proposal

347 views
Skip to first unread message

Mohammad

unread,
Jan 1, 2020, 10:11:29 AM1/1/20
to TiddlyWiki
Happy New Year!


Commander 2: A rewrite of Commander 1


Tiddler Commander is a powerful and unique tool and can do many bulk operation! Yet it suffers some design issues and needs to be improved

In last three months Flibbles has contributed alot to address some issues among them are

  1. Use relink plugin if available (already installed)
  2. Remove most global variable and limit them to minimum number of really required ones
  3. Improve the filter search and selective operation [Not totally solved yet]
  • The problem in item 2 is Commander unlike other filter search in Tiddlywiki does not dynamically display search results and needs to press a  button called "applied filter search" the reason is to put the result in a selective component from there you can selectively which tiddler shall be included in bulk operation! The idea here was taken from Windows explorer.
  • Each operation reset the selection, this is because some operation changes the tiddler and affects on the search criteria, so you need to re-select tiddlers for next bulk operation! Some users reported this annoying and not inline with TW vanilla 

I appreciate your comments contribution.  I hope I can receive your feedback on Commander features and if there are other features in your wish list.

Some features planned now
  1. add field rename
  2. possible use of dynamic tables
  3. possible use of trashbin
  4. repeated operation without re-selecting where possible
--Mohammad

Mohammad

unread,
Jan 1, 2020, 10:21:13 AM1/1/20
to TiddlyWiki
More notes

The old version can be found here: https://kookma.github.io/TW-Commander/


The improved version which has a litter different behaviour on filter search can be found :https://github.com/kookma/TW-Commander
You need to download the source folder. It is a Node.js version


--Mohammad

TiddlyTweeter

unread,
Jan 2, 2020, 9:35:06 AM1/2/20
to TiddlyWiki
I appreciate your comments contribution.  I hope I can receive your feedback on Commander features and if there are other features in your wish list.

One of the things in TW Commander is Regular Expression support in a raw form that is extremely powerful and useful ...
I have three related requests ...

(1) that  it supports "mg" flags simultaneously for regex; at the moment it can run in "m" or "g", but "mg" flags combined is best (pass most flexibility to the JS Engine).

(2) an issue with applying regex widely in TW  is "recovering" if you make a mistake!
     So integration of UN-delete type functions (Trash-Bin) is a very good idea!

(3) I'm not sure if its possible in Commander, but the downside of applying changes on a selection list of Tiddlers is danger of getting it wrong. 
                I wonder if we could have a "step-through"? Meaning something like you change the first one. Then look at it to check & confirm. 
                Then the next, and so on, till you are happy. 
                Then click "Change ALL". 
                (In my mind is search-and-replace in word-processors which lets you SEE a result before you confirm it)

TW Commander is a brilliant work. The architecture of it nicely modular.

Best wishes
Josiah
  

Mohammad

unread,
Jan 2, 2020, 12:56:31 PM1/2/20
to TiddlyWiki
Thank you Josiah!


On Thursday, January 2, 2020 at 6:05:06 PM UTC+3:30, TiddlyTweeter wrote:
I appreciate your comments contribution.  I hope I can receive your feedback on Commander features and if there are other features in your wish list.

One of the things in TW Commander is Regular Expression support in a raw form that is extremely powerful and useful ...
I have three related requests ...

(1) that  it supports "mg" flags simultaneously for regex; at the moment it can run in "m" or "g", but "mg" flags combined is best (pass most flexibility to the JS Engine).

Hopefully I will add this! 

(2) an issue with applying regex widely in TW  is "recovering" if you make a mistake!
     So integration of UN-delete type functions (Trash-Bin) is a very good idea!

Very difficult because every operation needs to be saved in Trashbin and I recommend a version control plugin!
But I see if it is possible as an optional action on any change!
 
(3) I'm not sure if its possible in Commander, but the downside of applying changes on a selection list of Tiddlers is danger of getting it wrong. 
                I wonder if we could have a "step-through"? Meaning something like you change the first one. Then look at it to check & confirm. 
                Then the next, and so on, till you are happy. 
                Then click "Change ALL". 
                (In my mind is search-and-replace in word-processors which lets you SEE a result before you confirm it)

I will look at this to see how it is possible 

TW Commander is a brilliant work. The architecture of it nicely modular.

Many thanks for your comments and support.
 

Best wishes
Josiah
  

TonyM

unread,
Jan 3, 2020, 1:37:14 AM1/3/20
to TiddlyWiki
Mohammad,

One thing I would ask for, but may already be possible is it possible to install commander while designing then disable or remove it cleanly?

If not this would be great or may simply need some instructions.

Regards
Tony

Mohammad

unread,
Jan 3, 2020, 2:18:31 AM1/3/20
to TiddlyWiki
Hi Tony!


On Friday, January 3, 2020 at 10:07:14 AM UTC+3:30, TonyM wrote:
Mohammad,

One thing I would ask for, but may already be possible is it possible to install commander while designing then disable or remove it cleanly?

It is a plugin. So, it should follow the plugin mechanism! 

Mohammad

unread,
Jan 3, 2020, 2:50:35 AM1/3/20
to tiddl...@googlegroups.com
Selective operation versus non-selective operation

One of comments from many users was: Filter search in Commander has an extra step, it is Apply New Search

Tiddlywiki by default shows search results dynamically! 

To address this I planned to have two modes for Commander

  • non-selective
    • acts dynamically
    • no need for enter, or press a button
    • behave like Tiddlywiki default search mechanism
    • BUT you cannot select among filtered results
  • Selective
    • you need to press a button
    • you can do the operation on selected tiddlers come from first filter search
    • you can do many steps on operation in sequence
    • BUT (CONS)
      • extra steps
      • different from default Tiddilywiki search
      • have to press a button at the end of operation
I will push some intermediate beta release to see how it works, BUT I appreciate if you have any other solution on this

TonyM suggested to use a working tag! e.g. before multi step batch operation on baulk of tiddlers add a temporary working tag like $:/tags/Commander/Working
and when finished remove that tag! 

Any idea solution is appreciated.

--Mohammad

Mohammad

unread,
Jan 3, 2020, 2:52:26 AM1/3/20
to TiddlyWiki
For email user!
 The post was edited!

Mohammad

unread,
Jan 3, 2020, 4:11:46 PM1/3/20
to TiddlyWiki
An experimental commander-ii is up

Selective and non-selective operations

https://github.com/kookma/TW-Commander/tree/commande-ii  (download the index.html or commander.tid)


This is ONLY for comment and feedback and include ONLY tag operations.
So, other features are removed intentionally to only check the selective mechanism!

I am looking to see if there is any procedure, method to implement the selective, non-selective operations.

--Mohammad

bimlas

unread,
Jan 4, 2020, 12:56:08 PM1/4/20
to TiddlyWiki
Mohammad,

It would be a useful feature if you could treat fileds as a list in addition to specifying the values of the fileds. For example, new items could be added or removed to the list field of selected tiddlers.

I'm working on a plugin, which I hope will make the fields easy to use and users will use them more often to categorize tiddlers, for example (for example, the "TiddlyWiki" tiddler could have "platform" field with "web" value, "programming-language" field with "html css javascript" list, etc.).


Mohammad

unread,
Jan 4, 2020, 1:48:27 PM1/4/20
to TiddlyWiki
Hello bimlas,
 Many thanks for your comments!


On Saturday, January 4, 2020 at 9:26:08 PM UTC+3:30, bimlas wrote:
Mohammad,

It would be a useful feature if you could treat fields as a list in addition to specifying the values of the fields. For example, new items could be added or removed to the list field of selected tiddlers.

Do you mean to have the list filed in a separate tab or you mean to treat every field like a filed? 

I'm working on a plugin, which I hope will make the fields easy to use and users will use them more often to categorize tiddlers, for example (for example, the "TiddlyWiki" tiddler could have "platform" field with "web" value, "programming-language" field with "html css javascript" list, etc.).
 
does this means programming-language is a list filed not ordinary one?

As fields are first class citizen in TW, it worth to get more attention.

--Mohammad

bimlas

unread,
Jan 4, 2020, 2:42:21 PM1/4/20
to TiddlyWiki
Mohammad

 
Do you mean to have the list filed in a separate tab or you mean to treat every field like a filed? 
 
I think not only the list field can contain a list, tags work the same way and other fields may contain lists as well.

does this means programming-language is a list filed not ordinary one?

Yes, for example, programming-language could be such a "list field".
 
As fields are first class citizen in TW, it worth to get more attention.

 I didn't want to talk about it yet, because the plugin is not ready yet, which shows the real benefits of my ideas, but I'm about to open a topic where we can talk more about this.

bimlas

unread,
Jan 4, 2020, 3:00:01 PM1/4/20
to TiddlyWiki
Mohammad,

 
 I didn't want to talk about it yet, because the plugin is not ready yet, which shows the real benefits of my ideas, but I'm about to open a topic where we can talk more about this.

Mohammad

unread,
Jan 4, 2020, 3:02:59 PM1/4/20
to TiddlyWiki
Good idea!
 In Commander ii, I will see how it can be supported!

--Mohammad

Mohammad

unread,
Jan 6, 2020, 2:02:01 PM1/6/20
to TiddlyWiki
Another experimental commander-ii is up
Commander 2.0.1 beta

Selective and non-selective operations


  1. Go to https://github.com/kookma/TW-Commander/tree/commande-ii  
  2. Clone or download to your computer
  3. Open the doc/index.html

This is ONLY for comment and feedback and include ONLY few operations.

Mohammad

unread,
Jan 7, 2020, 2:50:10 AM1/7/20
to TiddlyWiki
Hi Josiah,

 I am starting to implement your proposed configuration!
Please lets me know more details!

  • mg is implemented
  • m OR g has been implemented
Do we need the first match?
Any other flags useful here?

I also try to make the interface simple! Newbies should be able to perform SnR!

--Mohammad

On Thursday, January 2, 2020 at 6:05:06 PM UTC+3:30, TiddlyTweeter wrote:
Message has been deleted

TiddlyTweeter

unread,
Jan 8, 2020, 3:27:45 AM1/8/20
to TiddlyWiki
Ciao Mohammad

It would be really good to have all four of the "scope" flag combinations ...

--      (no scope flag; scope anchors = start and end of field; first match)
-- g   (scope anchors = start and end of field; repeat match)
-- m  (scope anchors = start and end of line; first match)
-- gm (scope anchors= start and end of line; repeat match)

I'll write a second note on the other JS flags soon.

Many thanks!
Josiah

TiddlyTweeter

unread,
Jan 8, 2020, 4:15:23 AM1/8/20
to TiddlyWiki
Mohammad wrote:
Any other flags useful here?

Ciao Mohammad

My last post covered the "scope" flags.  The remaining JS flags at MDN are:  i s u y.

i - That is already in Commander SNR.

s - Could be very useful BUT at the moment Firefox and Edge do not support it.
     It is supported by Chrome, Safari & Opera.
     "s" enables the meta-character "." to match line endings.
     Probably NOT a good idea to include it until FF JS supports it.
     In any case, there is a simple workaround in regexp by using character class "[\s\S]".

u - Unicode support so that the match pattern is interpreted as a sequence of Unicode code points
     I'm not clear how this would interact in TW. 
     At the moment I think demand for it in TW is close to zero. Its advanced regex to use it.
     So probably not needed.

y - Matches from the index indicated by the lastIndex property of the expression in the target.
     I think the use cases would be of very limited numbers.
     So probably not needed.

So, overall, with 4 scope flags of my last post ("f", m, g, gm) and case insensitivity (i) I think it should be enough.

My thoughts!
Best wishes
Josiah

Mohammad

unread,
Jan 8, 2020, 10:10:07 AM1/8/20
to TiddlyWiki
Hi Josiah,
 I will start implementing them and will let you know if I successful.

--Mohammad


On Wednesday, January 8, 2020 at 12:45:23 PM UTC+3:30, TiddlyTweeter wrote:
Mohammad wrote:
Any other flags useful here?

Ciao Mohammad

My last post covered the "scope" flags.  The remaining JS flags at MDN are:  i s u y.

i - That is already in Commander SNR.

s - Could be very useful BUT at the moment Firefox and Edge do not support it.
     It is supported by Chrome, Safari & Opera.
     "s" enables the meta-character "." to match line endings.
     Probably NOT a good idea to include it until FF JS supports it.
     In any case, there is a simple workaround in regexp by using character class "[\s\S]".

u - Unicode support so that the match pattern is interpreted as a sequence of Unicode code points
     I'm not clear how this would interact in TW. 
     At the moment I think demand for it in TW is close to zero. Its advanced regex to use it.
     So probably not needed.

--this is interesting 

y - Matches from the index indicated by the lastIndex property of the expression in the target.
     I think the use cases would be of very limited numbers.
     So probably not needed.

So, overall, with 4 scope flags of my last post ("f", m, g, gm) and case insensitivity (i) I think it should be enough.

Good! 

Mohammad

unread,
Jan 15, 2020, 5:42:23 AM1/15/20
to TiddlyWiki
Hi Josiah,
 I have pushed a new update to address your comment on regex flags.



Please kindly test these new features and let me know!
Except the text field other fields are single line, so we should decide if we need all these flags and combination or not!

--Mohammad
Message has been deleted

TiddlyTweeter

unread,
Jan 16, 2020, 5:05:29 AM1/16/20
to TiddlyWiki
Mohammad wrote:
 I have pushed a new update to address your comment on regex flags.


Please kindly test these new features and let me know!

Very good! Works well.  Thank you.

Except the text field other fields are single line, so we should decide if we need all these flags and combination or not!

You do NOT need to change anything for flags for fields that are a single line. It works fine as you now have it.

When a field in only a single line 'm' flag and "first match" will give the same result. That is the expected behaviour. 
And "mg" will give the same result as "g" for a single line field. That is the expected behaviour. 
So NO further changes are needed on "scope" flags for single line fields.

Best wishes
Josiah

TiddlyTweeter

unread,
Jan 16, 2020, 5:10:15 AM1/16/20
to TiddlyWiki
Ciao Mohammad

I notice you added "Unicode" support too to SNR! I'll test that tomorrow.

TT

Mohammad

unread,
Jan 16, 2020, 6:25:37 AM1/16/20
to TiddlyWiki
Hi Josiah,


On Thursday, January 16, 2020 at 1:40:15 PM UTC+3:30, TiddlyTweeter wrote:
Ciao Mohammad

I notice you added "Unicode" support too to SNR! I'll test that tomorrow.

Yes, but it seems has no effect. I search Persian words with and without u flag and both returns the same.
Please check and see if it is needed! I am not sure what is the default setting of regex in Javascript which is used by Tiddlywiki. 

TT

--Mohammad 

TiddlyTweeter

unread,
Jan 17, 2020, 6:48:11 AM1/17/20
to tiddl...@googlegroups.com
Ciao Mohammad

IT WORKS! Great to have the unicode flag!

... it seems has no effect.

The reason why you thought it had no effect is you tried it on Persian.
Persian code points are in Unicode Plane 0, which means it is already supported! You don't need the "u" flag for it.

The "u" flag enables code points in Unicode Planes 1 and above to be matched with a simpler single code point rather than having to use complex combining codes.


I will update the Regular Expressions Quick Reference for TC to cover how to use it as soon as I have time: http://commander.tiddlyspot.com/#%24%3A%2Fplugins%2Fkookma%2Fcommander%2Fhelp%2Fuicomp%2Fregular-expression

Best wishes
Josiah

Mohammad

unread,
Jan 17, 2020, 7:00:03 AM1/17/20
to TiddlyWiki
Hi Josiah,
 Many thanks for your time and comments. It would be great to improve the regexp section as it is still one of difficult subject for many users :-)

Best
Mohammad

On Friday, January 17, 2020 at 3:18:11 PM UTC+3:30, TiddlyTweeter wrote:
Ciao Mohommad

TiddlyTweeter

unread,
Jan 17, 2020, 7:57:39 AM1/17/20
to TiddlyWiki
Mohammad wrote:
... It would be great to improve the regexp section as it is still one of difficult subject for many users :-)

TBH I think it would need an interactive tutorial. Once the new TC is completed & released I think about doing that!

Best wishes
TT 
Reply all
Reply to author
Forward
0 new messages