Blog with ecto

I thought about another improvement for BwE today. It really only occurred to me when I created a new blog for nanowriwo 2004. When a new folder is created, I wonder if it is possible to add a folder action (of the same folder action script) to the created folder. This way I could just attach the script to the .Blogs folder, and then when I create special purpose blogs, I only have to create a folder on the Palm with the right name. I also wondered if I should use the “Journal Entry” feature of Agendus for blogging. Must look into this. I placed a Blogger bug report about post times not being respected by the server, but haven’t heard back. At least they fixed up the timezone error. Update: I’ve updated the script so that when a new folder is created, a “Blog with ecto” Folder Action Script is automatically added to the sub-folder. The latest version, as always, can be found at Blog with ecto.scpt. Thought: I should also tell ecto to update the account cache, but I need to know the server details, I think.

Palm Blogging via ecto

Well, using my limited AppleScript skills, I’ve created a system for blogging via ecto from my palm. Using the MacNoteTaker Conduit, and a Folder Action Script, ecto creates & posts a new post for each new file in the monitored folder. Now all I need to do is ‘fix’ the Conduit so it handles deleted files a bit better. However, since the Conduit was written for a different development environment, I’ll have to get the original working first. Oh, and this post was done directly from my Palm. Well, the paragraph above was, anyway. Bugs to get rid of:

  • Doesn’t do much parsing of the data. Paragraphs don’t seem to exist. Fixed: Used property body text instead of entry body.
  • Use an alternate form of getting the date. MacNoteTaker date-stamps all new files. I’ll use this. Done.
  • Parse the first line to get the post title. Done.

Updated Blog with ecto.scpt

I went through a couple of revisions of Blog with ecto the other night. I’ve now added the following feature:

  • Allows posting to multiple blogs, where the closest match to the folder name is used as the blog name.

There is a small issue - the date I set (using set entry_date to date date_stamp) doesn’t seem to be respected by ecto when it posts. I’ll do a bit more testing, and possibly issue a bug report. Anyway, the link for it is Blog with ecto.scpt.

Blog with ecto.scpt

Yesterday I talked about blogging from my Palm Zire 21.

Here is the complete AppleScript for Blog with ecto.scpt. Copy this, paste it into Script Editor, and save it to ~/Library/Scripts/Folder Action Scripts/Blog with ecto.scpt

Then right-click on the folder you want monitored - I use ~/Documents/Palm/Matthew Schinckel/NoteTaker/Blog and away you go. For best results, use with MacNoteTaker. Obviously, ecto is required.

All code is ©2004 Matthew Schinckel, but may be freely used with attribution.

Note: the formatting is removed, because ecto wasn’t quite doing it right, but Script Editor will figure it out.

 1on adding folder items to this_folder after receiving added_items
 2 Set this to true to automatically post the item(s)
 3 Leave as false so you can check the data.
 4set autopost to false
 5repeat with each_file in added_items
 6tell application Finder
 7set filename to (name of each_file) as text
 8open for access each_file
 9set entry_body to (read each_file)
10close access each_file
11end tell
12try
13set entry_title to filename
14set date_stamp to word 3 of filename & / & word 2 of filename ¬
15& / & word 1 of filename &   & word 4 of filename
16set entry_date to false
17set entry_date to date date_stamp
18set entry_title to first paragraph of entry_body
19set entry_body to text ((count characters of entry_title) + 2) ¬
20thru end of entry_body
21end try
22–—— You WILL need to change the next line!
23set my_blog to Life According to Matt
24tell application ecto
25set my_doc to make new document at front with properties ¬
26{entry title:entry_title, current blog:my_blog, ¬
27body text:entry_body}
28if false is not entry_date then
29set entry date of my_doc to entry_date
30end if
31if true is autopost then
32do post my_doc
33end if
34end tell
35end repeat
36end adding folder items to

Blogpsot!

I typed schinckel.blogpsot.com into my browser, wanting to check out the links I had made, but got the address wrong. Have a look - it’s funny if you look at my post a little while ago. I thought some vengeful god was hacking me.

Flickr Photos

Just as a bit of a test to see how this thing works, I’m posting an image to Flickr, and having it appear here, hopefully.

And while I’m at it, here’s what I’m listening to right now…

To Her Door from the album “Under The Sun” by Paul Kelly

Am I a God Botherer?

Just for fun (actually, to see if Google I plugged in “Life According To Matt” (notice the quotes). I was happy to say that this blog came top of the results list, but I was amused to see the remainder:

  • Authorized Version Defense Mystery Of The Cursed Fig Tree
  • The Florida Catholic - Abortion Destroys Women’s Health
  • Claude “Fiddler” Williams: Nearly as Young as Jazz
  • Unknown News - www.UnknownNews.net - The news you need, whether …
  • [PDF] BT V3N16 File Format: PDF/Adobe Acrobat
  • 2blowhards.com: Half Baked Notions, Redux
  • The Vertex - 6.0

From then on in, everything is bible related. Without the quotes, I come in number 3. Like anyone cares.

Blog-Novels

I’m not the only person publishing their novel on a blog as they post: Le Spirale Fantastique is a novel that an Indian fellow is writing, but he’s doing something a little cool - if you use a quote from his novel, and link it back to his novel, he will link that quote to your website. See if you can find my link - I’ve actually used the quote as part of my novel.

Gravatars not loading

I’ve noticed some commenters Gravatars are not loading, including mine. Some of them are, but I don’t know why. I haven’t been able to log into Gravatar.com to see what’s going on. Oh, and Jake, I think there’s a problem with document.commentform on your site, and I cannot submit a comment.

Blog Post Page Breaks

I didn’t realise this until last night, but it’s easy to split a post into several pages, use the following: I wonder if there’s a setting in ecto to automatically paginate…