Thank you @CodaCoder. I got what you mean! I correct this issue!
A new update for Index-Entries UI was pushed!
See the original post:
Feedbacks are highly appreciated!
Phase ii - Index UI
The next phase is to create the Index UI.
- This UI shows the Index per category
- The released version has a default Subject category
For testing purpose (do not use for anything serious) see:
- Demo: Tiddlywiki Indexer — create subject/author indexes
- Code: GitHub - kookma/TW-Indexer: Tiddlywiki Indexer: Create Subject Indexes of Any Type
Special thanks go to @telumire, @saqimtiaz, @CodaCoder, @DaveGifford, @twMat, and @TW_Tones .
I will announce the first beta release in another thread!
Demo link says 404 There isn’t a GitHub Pages site here.
Wow, this is looking great! Beautiful work! Two questions:
- How do I select the fields that I want it to search?
- Could this accomodate entries that begin with numerals?
Blessings.
- open $:/plugins/kookma/indexer/ui/subject-index
- look at the code
<$macrocall
$name="wiki-indexer"
fields="title, tags, caption, text"
indexEntries="$:/indexer/data/subject"
/>
See the fields, customize as you like.
NOTE: The subject index is default index which shipped with plugin, create your own for example, an index for places, objects, animals, …
aaaaaaand there it is! Eliminating ‘text’ eliminated a lot of unwanted results. This is brilliant, thanks a bunch for this plugin!
Yes, you may like to index a Chinese or Japanese, or perhaps Persian wiki, so you need to to add numbers or other alphabets, normally indexes are used for alphabet.
Open
- $:/plugins/kookma/indexer/macros/index
- $:/plugins/kookma/indexer/macros/add-entries
extend the two variables alphabet and letters to cover your needs.
Kookma plugins are modular and very hackable!!!
Enjoy hacking Indexer!
One thought to consider:
A
Action
Search results for Action
I figured it out myself
In $:/plugins/kookma/indexer/macros/index
<!-- generate output -->
<article>
<$list filter="[<indexTiddler>get[text]enlist-input[]sort[title]] :filter[subfilter<listfilter>] :filter[subfilter<sfilter>limit[1]]" >
<dl class="kk-indexer-list">
<details><summary><dt><$text text=<<currentTiddler>> /></dt></summary>
<$list filter=<<sfilter>> >
<dd><span title={{{[<livepreviewTid>get[text]match[yes]then{!!text}] }}}><$link/></span></dd>
</$list></details>
</dl>
Share your public wiki with hacked indexer when you could! Let’s learn from your showcase!
See the subject index tab in FFTW2 2022. I limited the fields to tags, keywords and caption for the moment.
You can see my own attempts at organizing domains > topics > notes in the story river. The list-search in my way is handy, but your indexer requires less work upfront for me.
As you hide the result by default (using details tag) you may like to show the number of results in front of entries like
Acts14
or
Acts (14)
That is handy, but ‘count’ tends to slow files down…
Perhaps a click to see count? but one that only counts on click not when listing.
Hi Mohammad,
This is really a wonderful idea. Have you thought about provinding a button to export then in an html/.tid file with indexes as headings; entries (tiddler titles or some other field of choice) in bold?
Thank you Rahul,
Exporting to an interactive html, needs JS, but TW only exports static page with no JS.
And creating a manual setup to do so is tough!
Thanks to this thread I solved a long standing problem for me, exporting static tiddlers that load the parent wiki. It also demonstrates how to possibly capture something like an indexer in a static tiddler.
- To test download and drop Export Static tiddlers link to parent.json
- Open the “Filter Operators” tiddler and export using the new exporter.
- Save this static tiddler anywhere, then open it in your browser
- It looks like a standard static tiddler however any link will open in the current tab the actual tiddlywiki.com tiddler/page.
If you look here Creating a custom export format you can see exporters simply make use of a “template” defined within a tiddler, eg static HTML exporter is in $:/core/templates/exporters/StaticRiver
- I revisited this and discovered what I want to do was very easy using the html
head/base
tag. Here is my modified version Export Static tiddlers link to parent.json (1.3 KB) - The only change was adding
<base href={{$:/info/url/full}} target="_self">
in the head section of the exporter.
- Not true @Mohammad you just need a modified or new exporter and include the Javascript.
- I believe the node version will make use of a named template as well (need to check)
Hi @rkashyap welcome. If you take a copy of the above exporter and modify it, including with javascript inside it you can do as you suggest.
- To be clear, the tiddlywiki export mechanism allows you to generate almost any kind of output including fully formed HTML pages. Static tiddlers is the only html exporter provided for tiddlywiki users.
Many thanks. This is helpful.