ecto 3

Playing with ecto 3 alpha - looks pretty good so far.

Hopefully it handles the RTF/HTML conversion process a bit better than ecto 2.

which python?

I came across a strange issue today. I have written a script that adds acronym tags to a post created in ecto, and another that adds the currently playing iTunes track, as nice links to iTMS. However, the problem that arose is that the script wouldn’t run. I had the shebang line, and everything, but no joy. Then I noticed that I have upgraded my python installation to 2.5, but for some reason the /usr/bin/python was still pointed at 2.3 - but my interpreter run from the bash shell, or from Komodo was 2.5. This itself wouldn’t be too much of an issue, except I was using appscript, and I had only installed appscript into the 2.5 Python installation library. So, it was failing (way too silently, for my liking), and I couldn’t tell why. All fixed now, though.

Fly Me AwaySupernatureGoldfrapp

Posting Images via XMLRPC

I’ve been getting errors when trying to upload images via ecto, an XMLRPC client.

Method “metaWeblog.newMediaObject” produced a server error: “server error. requested method metaWeblog.newMediaObject does not exist.”.

I’m not sure if this is due to a new version of ecto, or something that’s broken within ecto. I’m downloading some other editors to try it out, but over dialup…

Careless Whisper (w/ R. Wainwright)Ben FoldsWolf Trap 6-29-04 ★★★★

ecto Problems

I’m having trouble posting with ecto. Seems to be a problem at my end, too. I can’t post at all anymore, it freezes after parsing the document. It used to post, and then get some sort of a fail on server connection, but I don’t even get that far now.

Testing XMLRPC

This is a test of the XMLRPC interface. I think Ronan may have fixed it. This is a single quote ‘ This is a double quote “ This is an image: Matthew Schinckel

Seance On A Wet Afternoon • “Ultra-Lounge, Vol. 16: Mondo Hollywood” • John Barry

Moving from Blogsome

Luis Suarez, over at elsua.net wanted to know how to get his posts out of Blogsome. It’s really quite simple - all you need to do is use any XMLRPC offline composer that can get an arbitrary number of posts. ecto is a great example. Then set it to get more posts than you have, and it will grab them all from the server. You may need to learn how to set it all up - I won’t go through that here, but if enough people comment, I will write a tutorial. You can then re-post these entries to another server. IIRC, there isn’t a way to say ‘post all of these entries to another server for me’, so I wrote an AppleScript to do this when I migrated to Blogsome. Basically, it grabbed all of the posts from an Account, and cycled through them, posting each one to Blogsome (after changing the date to match the original, I think - there was an issue where it thought each post was a ‘new’ post, rather than using the old date). If you are on a Windows box, there is a version of ecto for Win, but obviously no AppleScript, so you may wish to investigate other solutions. It should be possible to write a simple program that just does this (copies posts from one host to another, via XMLRPC), but I don’t have the need, so I won’t write one ;) As it turns out, Louis asked for, and received a zipped file of all his posts anyway, but incase anyone else needs to do it fast… Oh, and Louis, I didn’t write a Comment because I didn’t want to have to create yet another account somewhere. Maybe you could consider turning on Comments, and using some sort of Spam protection other than requiring logging in. Casual commenters will be quickly turned off this. All of my Comment Spam is gone, just by using a simple JavaScript - now all I get is Trackback Spam.

Still No Joy (XML-RPC)

I’m still not able to post with ecto on Blogsome: some of the functionality is there, but I get an error on posting. I might try MarsEdit or something else and see if that works, as w.bloggar does, apparently. I’ve also stopped using Dvorak keyboard layouts, as it takes too long to learn to type, and I hate not being able to keep up with my thoughts.

Blogsome XMLRPC issues

I cannot post via ecto, or any other offline client at the moment: Blogsome has disabled XMLRPC support, due to a security issue. Since they use Multi-User WordPress, there is not fix for this build as yet.

Sub-Pages don't work in Blogsome

There you go. Visit http://schinckel.net/software/, and then visit http://schinckel.net/software/acronymmerpy/ No difference, even though there is a page in acronymmerpy/ I’ll put this in the blogsome forums when I get a chance.

acronymmer.py final (?)

Taking into account the comments on PhotoMatt’s acronymit page (where I shamelessly stole some ideas, including the list of words!), I’ve modified acronymmer.py so that it:

  1. Does not apply <acronym> tags to instances that have been acronymmed already.
  2. Does not apply tags to instances that are inside href or title strings.
  3. Does not save the file if no changes have been made.

Here it is, including my current acronym list. (I know some of these are Abbreviations, but ecto, and some browsers do not handle this tag). Also, this code needs to be re-pasted - I was trying to make it (XHTML) valid, and it’s broken now.

 1     #! /usr/bin/env python
 2         
 3     'A script for ecto that adds abbr and acronym tags to the text'
 4         
 5     acronyms = {
 6     'WYSIWYG' : 'what you see is what you get',
 7     'XHTML' : 'eXtensible HyperText Markup Language',
 8     'IIRC' : 'if I remember correctly',
 9     'HDTV' : 'High Definition TeleVision',
10     'LGPL' : 'GNU Lesser General Public License',
11     'MSDN' : 'Microsoft Developer Network',
12     'WCAG' : 'Web Content Accessibility Guidelines',
13     'SOAP' : 'Simple Object Access Protocol',
14     'OPML' : 'Outline Processor Markup Language',
15     'MSIE' : 'Microsoft Internet Explorer',
16     'FOAF' : 'Friend of a Friend vocabulary',
17     'GFDL' : 'GNU Free Documentation License',
18     'XSLT' : 'eXtensible Stylesheet Language Transformation',
19     'HTML' : 'HyperText Markup Language',
20     'IMAP' : 'Internet Message Access Protocol',
21     'RAID' : 'Redundant Array of Independent Disks',
22     'MPEG' : 'Motion Picture Experts Group',
23     'JPEG' : 'Joint Photographic Experts Group',
24     'CSTA' : 'Central Scorpions Touch Association',
25     'CDDB' : 'Compact Disc DataBase (Gracenote)',
26     'XBMC' : 'Xbox Media Centre',
27     'VNC' : 'Virtual Network Computing',
28     'URL' : 'Uniform Resource Locator',
29     'W3C' : 'World Wide Web Consortium',
30     'MSN' : 'Microsoft Network',
31     'USB' : 'Universal Serial Bus',
32     'P2P' : 'Peer To Peer',
33     'PBS' : 'Public Broadcasting System',
34     'RSS' : 'Really Simple Syndication',
35     'SIG' : 'Special Interest Group',
36     'RDF' : 'Resource Description Framework',
37     'AOL' : 'American Online',
38     'PHP' : 'PHP Hypertext Processor',
39     'SSN' : 'Social Security Number',
40     'JSP' : 'Java Server Pages',
41     'DOM' : 'Document Object Model',
42     'DTD' : 'Document Type Definition',
43     'DVD' : 'Digital Versatile Disc',
44     'DNS' : 'Domain Name System',
45     'CSS' : 'Cascading Style Sheets',
46     'CGI' : 'Common Gateway Interface',
47     'CMS' : 'Content Management System',
48     'FAQ' : 'Frequently Asked Questions',
49     'FSF' : 'Free Software Foundation',
50     'API' : 'Application Interface',
51     'PDF' : 'Portable Document Format',
52     'IIS' : 'Internet Infomation Server',
53     'XML' : 'eXtensible Markup Language',
54     'XSL' : 'eXtensible Stylesheet Language',
55     'GPL' : 'GNU General Public License',
56     'KDE' : 'K Desktop Environment',
57     'STB' : 'Set Top Box',
58     'MP3' : 'Mpeg Layer 3',
59     'PVR' : 'Personal (Digital) Video Recorder',
60     'GUI' : 'Graphical User Interface',
61     'CLI' : 'Command Line Interface',
62     'AAC' : 'Advanced Audio Coding',
63     'IE' : 'Internet Explorer',
64     'CD' : 'Compact Disk',
65     'GB' : 'Gigabyte',
66     'MB' : 'Megabyte',
67     'KB' : 'Kilobyte',
68     'TV' : 'TeleVision',
69     'PC' : 'Personal Computer',
70     'NSLU2':'[Linksys] Network Storage Link (USB) 2.0'
71     }
72     
73     
74     import sys, re
75     data = open(sys.argv[1]).read()
76     olddata = data
77     
78     # replace only the first instance of each acronym/abbreviation
79     for each in acronyms:
80         d = re.search(r'(?!<.*(title|href)='*>)?\b%s\b(?!(.*'>|</acronym>))' % each, data)
81         if d:
82             data = data[:d.start()] + '<acronym title='' + \
83                    acronyms[each] + '>' + \
84                    each + '</acronym>' + data[d.end():]
85         
86     if data <> olddata:
87         open(sys.argv[1],'w').write(data)