TiddlyBlogger is here - JavaScript blog posting with XML-RPC and TiddlyWiki
I mentioned in an earlier post that I was interested in turning TiddlyWiki into an offline blogging tool. The idea being that you often get a spare few minutes when you’re offline, and you could use that time to do things like write your blog.
So what I’ve done is added an option to each Tiddler ‘publish as blog’. This calls an object that I’ve created (called blog), which builds and XML-RPC message, and then send’s it via Ajax. At the moment I’ve only tested this with WordPress, but it should also work with blogger and a few others.
You can view an example of this at:
http://www.craigcook.co.uk/samples/TiddlyBlogger.html
and the script file can be found at:
http://www.craigcook.co.uk/samples/BlogPlugin.js
You’ll need to modify some variables in BlogPlugin.js for your own blog details.
Tags: Ajax, blog, blogging, TiddlyBlogger, TiddlyWiki, wordpress, XML-RPC
October 12, 2007 at 12:55 pm
Cool! Now if you could sync your blog into tiddlers, use the Firefox spell checking and upload images, you’ve a replacement for the likes of Ecto.
October 16, 2007 at 10:32 am
Hey Craig, nice work. Don’t think I’ve seen TiddlyWiki working with XML-RPC before..! To answer your questions:
- you can edit ViewTemplate directly, via the “shadowed” menu. Better still, you can use the “TaggedTemplateTweak” plugin, available from Eric Shulman’s site here
- to add to config.commands, you can just put the line into your plugin e.g. config.commands.publishBlog = {}; is fine
You might want to make links out of your url’s in the blog post…
October 16, 2007 at 10:34 am
It occurs to me that what you should really do here is make an XML-RPC plugin for general use…
October 16, 2007 at 10:58 am
Cheers Jon. I’ll make some tweaks. We can discuss further when we meet tomorrow.
October 16, 2007 at 12:33 pm
Nice work Craig. Now to get you a little more accustomed to the flexibility of TiddlyWiki when it comes to customization.
To customize the layout, you need to edit the shadow tiddlers. What is a shadow tiddler? It is a tiddler with a predefined shadow value. In the tabs on the right hand side, click on More and then Shadowed. You will see that you can edit the ViewTemplate, PageTemplate etc from here.
When you edit a shadow tiddler, you are creating a real tiddler that masks the shadow tiddler of the same name, over-riding its value. If you delete that real tiddler at a later date, the shadow tiddler is automatically restored. So the shadow tiddlers act as fail safe fallbacks.
The motto being… in TiddlyWiki you never need to edit the source of the html file.
Now for the js file and plugins. If you create a tiddler and tag is systemConfig, its contents are treated as javascript and loaded at start up. So while it is definitely convenient to load plugin code from external files like you have been doing while development - as it means you can use a nice editor for editing the code - when sharing or deploying the plugin or code, put it into a tiddler and tag it with systemConfig.
Voila. There you go. Everything in one file. Not only do you get to avoid hacking the source, but it also makes it easier for test your work. Read: more feedback!
October 17, 2007 at 1:45 pm
Blog from Tiddlywiki
If this works, then I’m posting into WordPress from TiddlyWiki! All thanks to boycook and his wonderful TiddlyBlogger.
…
October 17, 2007 at 2:39 pm
http://www.tiddlytools.com/#TaggedTemplateTweak
That’s the plugin we talked about so you can use custom templates for blog tiddlers.
November 1, 2007 at 11:59 pm
Alrighty, I’ve made a few changes, get hold of the BlogPlugin and BlogSetup tiddlers here:
http://jayfresh.tiddlyspot.com/#BlogSetup%20BlogPlugin
The BlogPlugin now uses a custom view template for any tiddler that is tagged “blog” to add the “publish as blog” button. I’ve added a callback to the XML-RPC call so you can see if there’s an error and I’ve added in support for tags. Also, I’ve replaced the custom XMLHttpRequest function with TiddlyWiki’s cross-browser doHttp().
November 2, 2007 at 12:01 am
[...] I’m hitting “publish to blog” having made some changes to the boycook’s TiddlyBlogger… In theory, there should be some tags attached to this [...]
November 2, 2007 at 12:03 am
Forgot to mention last thing - password isn’t plain text anymore, it’s stored in a cookie.
November 2, 2007 at 11:49 am
Feature request: wikifier/formatter to translate between TW syntax and WordPress syntax.
Thank you.
November 2, 2007 at 12:02 pm
Feature request 2: ability to do trackbacks to other blogs
November 4, 2007 at 3:36 pm
Woot! Much happiness as I just made my first post from my TW homepage to my WordPress blog.
The main point of this post is: My WordPress blog is not hosted on the WordPress domain. Sure, it was simple to change the ‘.wordpress.com/xmlrpc.php’ at the end of the ‘this.blogURL’ to point to the correct location, but it occurred to me that you might want to have a input field that for that, which if left empty defaults to WordPress.
December 27, 2007 at 11:05 pm
Hey dude, some good late night spam on here, TiddlyBlogging away….
February 17, 2008 at 11:38 am
Craig,
Would could you separate a plugin that just pinged throught XML-RPC a configurable url as http://rpc.technorati.com/rpc/ping ?