TiddlyWiki to Spaces!
did some quick javascript to send tw articles to spaces via the blogit interface (if it can be called that…)
anyway, it’s working and I’m not going to touch it anymore! >:D
Javascript changes below:
// Commands supported by the toolbar macro
config.commands = {
closeTiddler: {},
closeOthers: {},
editTiddler: {},
saveTiddler: {hideReadOnly: true},
cancelTiddler: {},
deleteTiddler: {hideReadOnly: true},
permalink: {},
spaceit: {},
references: {},
jump: {}
};
ViewTemplate: “\n
\n\nmerge(config.commands.spaceit,{
text: “spaceit”,
tooltip: “send this tiddler to spaces”});
config.commands.spaceit.handler = function(event,src,title)
{
var t = encodeURIComponent(title);
var tiddler = store.getTiddler(title);
var b = tiddler.toSpaceIt();
var w = window.open( b , “spaces” );
w.focus();
return false;
}
Tiddler.prototype.toSpaceIt = function()
{
var s = [];
s.push(“http://spaces.msn.com/blogit.aspx”);
s.push(”?”);
s.push(“Title=” + encodeURIComponent(this.title) + ”&”);
s.push(“Description=” + encodeURIComponent(wikifyStatic(this.text,null,this)));
return(s.join(""));
}
Discussions