Wrangler: Easy querying and modification of your wiki

Hello folks, here’s a little show & tell on something I’ve built for myself that others might find useful. It’s only “mostly done” but I’ve been using it quite a bit lately and thought it’d be worth sharing. It’s not really a traditional plugin - just drag and drop it to play with it.

The name comes from “Data Wrangling” and is useful for re-shaping the content of your wiki. I put a quick TiddlyHost site up ( Wrangler — TiddlyWiki Data Wrangling), and recorded a demo video on YouTube (https://youtu.be/f0jtGsGP89w).

10 Likes

Hello @stobot
thank you for providing this handy tool.
At first glance, the symbols are not showing in the results/records table listing.
I’m not sure if there should be icons or whether it’s a browser thing (Firefox on Linux)

filter[tag[Character]]
fields title
Records found: 87 xx export xx delete (should this read export all delete all)

|tiddler|title|
|xx|xx|xx|Ackbar|

Just to let you know

Hi @Sunny , yes - I mention it in the wiki but I’m using a “symbol font” from Windows. Not sure what the best way to solve cross-platform, but you could swap out with other unicode icons of your choosing. SVG icons were slowing thing down when showing thousands of records.

Damn it, Adam, you couldn’t have released this two days ago?! I spent about three hours yesterday manually making changes that this would easily have helped with. :frowning:

Thank you very much. I’ve just watched the video, and will be trying it out later today, but it looks extremely useful for the sort of work I sometimes do.

Thanks @Scott_Sauyet - given all of your previous mentions of SQL I assumed you’d be of a similar mindset.

@stobot I am Very Sorry, I overlooked the symbol font from windows info.
Swapping the icons would solve the issue, I’m sure.

I love tablehelper and I’m sure Wrangler will be very useful too.

1 Like

I did watch the video. Very well done! Thanks for sharing.
-m

1 Like

Cool tool with “swiss army knife” vibe. Hopefully it’ll evolve past demo stage and will get at least some basic documentation in text form, that will be bundled with the code. Because going back to the demo video every time, to learn how to use it, or to remember how to use it, is not appealing to everyone.

Looks great @stobot and very powerful, its features are somwhat hidden so I wonder if a few hints could help?

In this case it is intended to assist wrangling data in tiddlers. I wonder if it can be used for exploring the source code of tiddlywiki for people to find examples within?, that they can borrow to write their own tiddlywiki script, or perhaps a seperate tool could be constructed to help in this.

Would you consider adding the filter drop down from advanced search>filter tab to the wrangler tab for easy access to my saved filter list.

Those symbols came out as “X” in Chrome browser on a Chromebook. I changed them to some emoticons character (part of the Unicode nowaday). Now, this is usable for some tiddlers wrangling, thanks !

stobotWrangler.json (11.8 KB)

2 Likes

Take a look at TiddlyTools/Editable (pronounced “edit table”). It does something very similar to your “Wrangler”, but with quite a few additional features:

  • Enter/choose a filter to get an initial list of matching tiddlers (e.g., [tag[Character]] - just like the $:/AdvancedSearch > Filters tab)
  • Next, select specific tiddlers from the left listbox of matching tiddlers. Use “All/None” buttons or listbox keyboard modifiers (shift-click and/or ctrl-click) to select multiple tiddlers.
  • Next, select from the right listbox to choose fieldnames from those selected tiddlers. Use “All/None” buttons or listbox keyboard modifiers (shift-click and/or ctrl-click) to select multiple fieldsnames.
  • A table grid view is shown, where rows are tiddlers and columns are fields. Table display options include:
    • Choose how many rows to show at a time (5,10,15,20,25,50,100, or all). When there are more tiddlers than the chosen row count, controls are shown for “<<” (first page), “<” (previous page), “>” (next page), and “>>” (last page).
    • Select which field to sort by in ascending or descending order. You can also click on any column header to sort by that field (ascending or descending order).
    • Options for “wrap text”, “omit missing fields”, and “read-only”.
    • Unless the “read-only” option is checked, individual table cells are directly editable as multi-line textarea inputs.
    • While editing a table cell, the value stored in the corresponding tiddler field is immediately updated in the usual manner. As long the input focus remains in that table cell, you can press escape to cancel those changes and revert to the previous tiddler field value. However, once the input focus leaves that table cell, any changes you have made cannot be undone.

In addition to editing individual table cells:

  • You can perform a keyword text search to “find matching content” within the table cells. The text search input can include multiple space-separated keywords, and is case-sensitive.
    • Table cells with matching content are enabled for editing, while fields without matching content are automatically disabled and grayed-out. If “find matching content” is left blank, all table cells remain editable.
  • You can also use the “replace with” input to perform a global search-replace[...],[...] filter and/or the “apply filter” input to use a custom filter syntax (e.g., the [split[, ]format:titlelist[]join[ ]] filter from your Wrangler demo) to “transform” text within the enabled table cells.
    • The checkboxes in the column headings let you indicate which fields the “replace with” and “apply filter” inputs are allowed to modify.
    • Once you have entered “replace with” and/or “apply filter” inputs and selected the desired column heading checkboxes, press the ✓ buttton to perform the “change field values” actions.

The first column in the table shows the tiddler titles, which are NOT editable. These titles are links to the individual tiddlers so you can quickly navigate directly to any desired tiddler.

  • The title column heading has a button to toggle the global “update timestamp” setting (so changes can be made without updating the tiddler modified field values)
  • There are also buttons to “add a new field” (fieldname and value) to all tiddlers currently shown in the table, as well as to delete all tiddlers currently shown in the table (with a confirmation, of course!)
  • You can use the checkbox to the left of an individual title to deselect (remove) that tiddler from the table. This is equivalent to using ctrl-click in the listbox of matching tiddlers to deselect individual titles, but is much more direct since it doesn’t involve scrolling the listbox or using modifier keys.
  • There are also buttons that allow you to “clone” or “delete” any individual tiddler title without needing to navigate directly to that tiddler.

@stobot: Note that TiddlyTools/Editable is written using only wikitext (no JS plugins), and is self-contained within that single tiddler so you can use drag-and-drop to add TiddlyTools/Editable to your “Wrangler” demo, and then try it out on your [tag[Character]] Star Wars data.

Hope you like it… let me know what you think…

enjoy,
-e

4 Likes

I modified also the icons but with standard TW icons if you want to try…

$__stobot_tools_wrangler.json (12.1 KB)

@stobot and @EricShulman your plugins are both amazing.
I stumbled across this video about Obsidian’s bases and it seems that they are pretty much similar to @stobot’s new Wrangler plugin except that they communicate a lot more about it in the Obsidian sphere. I do think that the TW community could benefit from extended communication, especially through the video format. I do know that this format is not everyone’s favorite (personally, I wouldn’t watch a 30-minute video about Base basics, I would rather read a tutorial and/or the documentation and tinker with it in parallel) but producing videos could be a way to make TW more well-known and widely used. Compared to Obsidian or similar software, TW has many qualities that are just overlook by the average user becase TW’s “marketing” is not as strong as Obsidian’s.

As an example, @EricShulman could create a videos for beginners to discover his TiddlyTools from scratch. It would encourage a lot of people to include them to their workflows.

tiddlytools is all rights reserved. There are concerns about whether to use this tool.

There is a difference between “open source licensing” and “public domain”. Open source allows me to retain the copyright on all my work so I can decide how I want my work to be used by others (“licensing”), while public domain releases all claims to those rights.

Regardless, my published TiddlyTools works have ALWAYS been shared FOR FREE (i.e., licensed without charge), and you are absolutely permitted to copy and use them for all NON-COMMERCIAL intents and purposes.

I have updated my TiddlyTools/Legal/TermsOfUse, to more clearly explain this:

-e

It would not be creative commons if there were additional terms to the creative commons clause.

If the creative commons is only for components. Then the license is generally written into the code.

The creative commons itself is the license, and merging it with the copyright tiddler would make it clearer. Or “open source model” link to TermsOfUse.

Now that the license is clear, it’s really reassuring to use.