Quite honestly: I'm not exactly sure what you're asking for there.
Maybe that's because I'm not intimately familiar with both MonkeyTagger
and My Notes TiddlyWiki.
Either way, your chances of getting help would certainly improve if you
could describe your request in a concise way that even dummies like
myself could relate to... :)
-- F.
If I understand this correctly (and I'm afraid I'm not sure I do),
Pascal's recently released TagsTreePlugin should do what you want:
http://visualtw.ouvaton.org/VisualTW.html#TagsTreePlugin
HTH.
-- F.
Also try this bit:
---------------
<<forEachTiddler
where 'tiddler.tags.contains("notetopic")'
script 'function getNoteTypes() {
var out = "";
var noteTypes = store.getTaggedTiddlers("notetype");
var tag, tiddlers, j;
for(var i = 0; i < noteTypes.length; i++) {
tag = noteTypes[i].title;
out += "!![[" + tag + "]]\n"
tiddlers = store.getTaggedTiddlers(tag);
for(j = 0; i < tiddlers.length; i++) {
out += "* [[" + tiddlers[i].title + "]]\n";
}
}
return out;
}'
write '"!" + tiddler.title + "\n" + getNoteTypes()'
>>
---------------
If none of this matches your requirements, please create a minimalist
TiddlyWiki document that better illustrates your needs.
-- F.
That actually made it much easier to understand what you're really after.
So try this (requires EvalMacro*):
---------------
<<eval
'
function getTiddlerHierarchy(scope, category) {
// retrieve topics
var categories = store.getTaggedTiddlers(category);
var topics = [];
for(var i = 0; i < categories.length; i++)
topics.push(categories[i].title);
// generate index
var index = {};
for(i = 0; i < topics.length; i++) {
index[topics[i]] = [];
store.forEachTiddler(function(title, tiddler) {
if(tiddler.tags.containsAll([scope, topics[i]]))
index[topics[i]].push(title);
});
}
return index;
}
var index = getTiddlerHierarchy(tiddler.title, "notetopic");
var output = "";
var i;
for(topic in index) {
output += "!" + topic + "\n";
for(i = 0; i < index[topic].length; i++) {
output += "* [[" + index[topic][i] + "]]\n";
}
}
wikify(output, place);
'
"scriptMode"
>>
---------------
I somehow feel there should be another, less complex way - but all I
could think of were nested ForEachTiddler macro calls, and those aren't
very pretty either...
HTH.
-- F.
Oh right, I forgot to implement that condition - that's an easy fix though.
However, I don't like how this big chunk of code needs to be manually
inserted into all "notetopic" tiddlers. So let's turn this into a proper
macro then, shall we:
http://devpad.tiddlyspot.com/#TiddlerHierarchyMacro
(I'm having trouble finding a fitting name for this plugin - suggestions
are welcome!)
Now all you need to do is enter the following:
<<tiddlerHierarchy "notetopic">>
That way you could also use HideWhenPlugin to automatically invoke this
macro for all tiddlers tagged with "notetopic".
HTH.
-- F.
Try this version:
http://fnd.lewcid.org/svn/TiddlyWiki/plugins/CrossIndexingMacro.js
I haven't tested this (lacking a proper testcase), so it might be
missing the point.
-- F.
Glad it works.
> I think this macro is a big deal. You should announce its arrival
> to the world in a separate thread.
This might sound very strange, but I'm not entirely sure what this macro
actually does - in general terms, that is.
So before I can announce anything, I'll need to wrap my head around this
first so I can describe and document it properly - which will most
likely lead to some code modifications to make the whole thing more
flexible/universal...
> Do you have an Amazon wishlist, paypal, or some other way to do you a
> favor as a way of saying thank you?
I appreciate the sentiment, but that's really not necessary.
(Also, I wouldn't want to put you in the awkward position of buying a
book by Richard Dawkins... ;) )
-- F.
Try this version:
http://fnd.lewcid.org/svn/TiddlyWiki/plugins/CrossIndexingMacro.js
I'm not sure whether that really fixes the problem though, so you should
do some testing.
> I thought of another limitation this morning - [...] it references
> the tiddler title
That's why I've added an optional scope parameter in the latest version.
If that's missing, the respective tiddler's title will be used as
fallback value.
I don't think I've ever written code that I could relate to in such a
very limited extent as in this case - that's kinda disconcerting...
I keep trying to visualize the underlying concept, but fail to come up
with anything useful.
That's also why I can't release this to the general public; I'm unable
to describe its purpose in a few words.
-- F.