by Derek—2005.05.20 @ 1541
My first attempt at a more useful AppleScript: "Blogit!" I'm sure that's not a very unique name, but for an AppleScript, it works fine. I'm not complaining...
This script takes the contents of the Clipboard (text only) and then prompts you to pick a blog (if you have more than one configured), a title, and a category. Once these are picked, you can post your entry and optionally rebuild/publish it. In fact, this entry was published using Blogit!.
The script uses the XML-RPC technology built-in to Mac OS X's AppleScript and uses the "metaWeblog.newPost" and "mt.setPostCategories" defined from MovableType's reference document. This script was built to use specific definitions for MovableType, but it could be modified to work with other blogging tools.
This script can be used with multiple blogs. Currently, you cannot set multiple categories, but it is totally possible. This is my first AppleScript, so give me a break already!
I created this script starting with Objective Labs capable BlogScript. However, in trying to modify BlogScript, I kept encountering errors with the preference file it created. In addition, BlogScript wouldn't allow you to pick multiple blogs easily, nor would it allow you to set a category for the entry.
Blogit! v.0.001
Unzip and open the blogit.scpt in Apple's Script Editor and modify the following default properties to suit your site:
property username : "your_username"
property user_password : "your_password"
property APIURL : "http://www.your_site.com/mt/mt-xmlrpc.cgi"
property weblog_url : "http://www.your_site.com/"
property autoURL : true (or false)
I put BlogIt! in my ~/Scripts/ folder and activated the script menu so I can activate the script from any application. Copy some text and invoke the script. Follow the prompts. Done.