Advanced Search in Fields Plugin: New Updates

You can change EditButton from no to yes in the result shadow tiddler where the dynamic table is called!`
So you can edit tiddler in place, even clone them!

Whoah! Brilliant! This tool makes an excellent document editor! For instance, dealing with issues in 13,000+ snips of Perry Mason TV scripts I am currently working on, the ability to edit-inline makes it easy to analyse documents for faults / edit them. Example …

Best, TT

1 Like

Hi @TiddlyTweeter
I hope I can find free time to add your wonderful examples to Advanced Search in Fields plugin documentation!

Side note:
Would you please review the predefined regex patterns? Do you think they are correct? Do you propose any other common patterns? (e.g. pattern which may be of general interest, not specific patterns)

They all work. That is the main thing.

Regex is complicated by the fact that you can achieve the needed result many ways. I will comment on specifics …


Match titles that are all decimals = “^\d+$” for Title field …

… works good for decimals of one or more numerals …


Here is an alternative to match ending decimals regardless of starting (i.e. no “^”) …

Match titles that end in A decimal = “\d$” (NOTE: the “+” is not needed)


Here is a more advanced regex… How would we match Binary through to Hexadecimals
—which are either the entire title or just the end of the title, of length of four numerals, ending in 1? :slight_smile:

Match Decimals through to Hexadecimals four numerals long ending the scope with ‘1’ = “(^|\s)[0-9A-F]{3}1$”

UPDATE … that should read …

Match Binary through to Hexadecimal four numerals long ending the scope with ‘1’ = “(^|\s)[0-9A-F]{3}1$”

Hope it is useful!
Best, TT

1 Like

Not sure “binary” has a place in that statement – once you allow 2-9A-F, mentioning binary is as redundant as mentioning “including the digits 4 and 5”.

You should also include a-f.

A common issue for the hobbyist hacker is identifying where macros are \defined & used

These are a few regex that may help them …


Aim: Identify tiddlers with 5 or more macro definitions

Scope: [all[tiddlers+shadows]]
Field: text
Match: (?m)(^\\define [\s\S]+?){5}

Result (sample) …


Aim: Find the Tree macro

Scope: [all[tiddlers+shadows]]
Field: text
Match: (?m)(^\\define tree\b)

Sometimes we want to know exactly where a macro is defined (unsurprisingly). For instance where do we examine the “tree macro” …?

Result …


Aim: Examine macro use.

Scope: [all[tiddlers]!is[system]]
Field: text
Match: <<[^>]+?>>

This matches how @Mohammad uses his macros in normal Tiddlers in this demo for the Search In Fields Plugin …


Aim: Is the tag macro used?

Scope: [all[tiddlers]!is[system]]
Field: text
Match: <<tag\s.+?>>

Yes it used by @Mohammad, though sparingly…

Result …

1 Like

@coda You are so sweet. I was one of those people subjected to the Nuffield “New Maths”. I can’t do long division. I can count in any base. I spent 3 years counting in weird bases and doing topology.

Regarding the numbers here, the 0001 is as good as any other, including ABC1

De facto, caro

… drawing out mention of “binary” is irrelevant, if not, de facto, wrong. The digits 0 and 1 are included in the hexadecimal character set (class). Same would be true of “decimal” and “octal” and any other base equal to 16-<base>.

Only saying this in case @Mohammad chooses to use the same text in the docs.

Yes. Dear Hexa, binary is simply 0/1, I understand you can’t cope with small long numbers. They are not inferior, though I do understand your bias to larger.

My binary 1,000,000 is your hex 40. Let’s jam! All long numbers start with 1 …

“There are 10 kinds of people… those who understand binary… and those who don’t.”

1 Like

As a friend of mine once said “the old ones are the old ones” :wink:

1 Like

Ciao @EricShulman that is so funny! I will use it with my Italian students as a bit of a challenge. Once you “get it” it is hilarious!

Grazie mille
TT

Eek. I missed that. You are right, you are on the page ahead …, the match should be …

How would we match Binary through to Hexadecimals
—which are either the entire title or just the end of the title, of length of four numerals, ending in 1?

  • (^|\s)[0-9A-Fa-f]{3}1$

OR …

  • (?i)(^|\s)[0-9A-F]{3}1$” (case insensitive)

TT

Small Issue: If you change “Search Tid” setting the Regex Patterns drop-down doesn’t work

I changed searchTid to …

\define searchTid()  $:/temp/advancedsearch/input/regex

But the “Regex Pattern” dropdown doesn’t work once you change it.

Best wishes
TT

Suggestion: Allow inline-edit mode to be toggled on from the sidebar

This is such a useful feature and works very well. Maybe many users would use it if it were easily toggled on and off??

Best wishes
TT

Hello Mohammad,

can you tell me please, where the background color is set?

Thanks
Stefan

Hi Stefan,
I have not any color set! I think that is Tiddlywiki itself!
By the way I will check!
Lets see what other says!

What color palette are you using?

@Mohammad
I use Twilight…
grafik

@StS
Stefan, if you look at $:/plugins/kookma/search/styles/main, you see I have not used any colors!

I see the problem is with tables from Shiraz!
I will have a look, but Shiraz uses Bootstrap 4.1 which does not support dark theme!
I plan to update to Bootstrap 5, but it takes time! :wink: Please also note some of TW palettes like Twilight have not colors for all UI elements and that causes many problems.

If you can use other dark palettes, give a try Spartan night or Gruvbox dark!

@Mohammad - thanks for feedback :slight_smile:

I checked all pallettes - background color of pulldown is NOK for:

  • Cupertino Dark
  • Spartan Night
  • Twilight