Find all stylesheet tids that are NOT tagged such

See thread title. By a “stylesheet tid” I mean a tiddler that is filled with style definitions - but it may have had its $:/tags/Stylesheet removed!

Is this doable? Would it require very elaborate analysis of the content basically regex matching and pairing moustache brackets, etc?

I think regular expressions are going to be the sanest way if you want to do it with native TW tools, and if you want to do it all the time.

But if this is a one time thing (looking for a lost CSS), a different approach is to open your developer console:

document.querySelectorAll("*[class]");

Save the list. Then run a routine to mark all tiddlers (and shadows, I guess) as Stylesheets. Then run the query a second time and look for new classes. Then look for tiddlers containing those classes.

If of any use to you, this might help to quickly whittle things down to something manageable:

\define and_this() [{][!][!]
\define rFilter() [get[text]regexp[{]!regexp[{{]!regexp<and_this>]

<$list filter="[all[tiddlers]!tag[$:/tags/Stylesheet]filter<rFilter>!regexp[js]]">
<<currentTiddler>><br>
</$list>

If you authored the stylesheets you may know something about the content that can helpsearch like contains lines with only } or searching for tiddlers with lines beginning .tc- etc…