> Very nice, Eric.
> Using that and RenameTagsPlugin (for quick tag removal) I can convert
> a TW from being overly tag heavy to using custom fields combined with
> just a couple of choice tags for a nicer set up.
Indeed very practical.
However, I would need some help from Eric to merge this script with
the following RenameTag bookmarklet - with which a tag can also be
removed:
<script label="RenameTag" title="Renames all occurrences of a tag">
if(window.version&&window.version.title=='TiddlyWiki')
var oldTag=prompt('Enter the tag to rename','oldTag');
var newTag=prompt('Rename tag '+oldTag+' to:','newTag');
var t=store.getTaggedTiddlers(oldTag);store.suspendNotifications();
for(var i=0;i<t.length;i++)
{t[i].tags.remove(oldTag);t[i].tags.pushUnique(newTag);}
refreshDisplay();
</script>
All I could (copy and paste) till now was:
<script label="TagToField" title="Change all occurrences of a tag to a
custom field">
if(window.version&&window.version.title=='TiddlyWiki')
var oldTag=prompt('Enter the tag to add a custom field','oldTag');
var tids=store.getTaggedTiddlers(oldTag);
for (var t=0; t<tids.length; t++) {
store.setValue(tids[t].title,"field","myfieldvalue");
}
refreshDisplay();
</script>
If there would be a prompting box for the new field value and the
deletion of the old tag - all in one - that would of course be the
best.
Regards,
W.