The following inline script (*) will extract the data from each
tiddler tagged with "addressBook", and create a .VCF-formatted file in
the current directory, using the tiddler title as the filename (with
a .vcf extension, of course)
-----------------------------------------
<script label="create vCards">
var tag="addressBook";
var startMarker='<data>{"';
var endMarker='"}</data>';
var pre="begin:vcard\n";
var post="\nend:vcard\n";
var ext=".vcf";
var path=getLocalPath(document.location.href);
var slashpos=path.lastIndexOf("/");
if (slashpos==-1) slashpos=path.lastIndexOf("\\");
if (slashpos!=-1) path=path.substr(0,slashpos+1);
var tids=store.getTaggedTiddlers(tag);
for (var t=0; t<tids.length; t++) {
var start=tids[t].text.indexOf(startMarker);
if (start==-1) continue;
start+=startMarker.length;
var end=tids[t].text.indexOf(endMarker,start);
txt=tids[t].text.substring(start,end);
txt=txt.replace(/","/g,"\n").replace(/":"/g,":");
var fn=path+tids[t].title+ext;
var link="file:///"+fn.replace(/\\/g,'/');
if (saveFile(fn,pre+txt+post))
displayMessage("created file: "+fn,link);
}
</script>
-----------------------------------------
(*) requires
http://www.TiddlyTools.com/#InlineJavascriptPlugin
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios