Wednesday, July 22, 2009
Dynamic notification after posting
Wednesday, July 22, 2009
1 Comments
I just wasted a whole lot of time, and I'll tell you exactly what I did. As you may have read, I have set up dynamic Wave notifications - I can easily produce them without going to the Publisher Portal. And that's a really great and flexible thing. However it doesn't help me with Blogger so much, so here is what I did, and then what I undid.
I use Blogger to FTP to my site, and I have no way of explicitly calling a script of any kind once a successful publishing action takes place. This includes even pinging. If Blogger hosted, at least I would get pinging by default. Anyway, what to do?
This is the first, convoluted road I took, successfully. But I had to just say no.
- One can supply up to ten email addresses to have posts emailed to once published when using Blogger. This is the only trigger I could think of using. I can't see any other way to get a usable event. Okay, so I created an arcane email address on my site and used that to send new posts to.
- In Mail.app on OS X, one can create rules, and you can designate an AppleScript to run when an item matches the rule. This is pretty unique and quite useful.
- Have that script pull the Subject from the email as well as the contents of the email body for use later in the same script.
- Have Safari open to my form page already, and have the AppleScript use the subject and body of email and send it to the form in Safari and submit it.
Stupid. Really fragile and stupid. Did I say it's stupid? Yes I did, but it bears repeating. It works. But it's so taped together that I wanted to throw up in my mouth because I even spent so much time on it. The AppleScript was pretty interesting though I must admit, at least I learned a little something there.
Then I thought of another tactic that I could take using a simple Flash or AIR application (headless? maybe).
- Launch the application and have it read the contents of my RSS feed. Take an initial read of my RSS file.
- Have the application cycle ping that RSS file every 5 minutes or so and compare the previous read to the current, if it's different discern how many items are different, and then post notification(s) for each one (using data from the XML for each item to build the notification) to my server to then end up at Adobe's server for delivery.
That's a pretty decent solution, although it's still a hack to be honest. Perhaps I'll use this... but I wish that I could just be able to call a script from Blogger to begin with to make all of this really easy.
Labels: Adobe Wave, Blogger
