Posterous backup script v2

As a follow-up to Posterous official blog message concerning most wanted feature, here is great (or maybe not) news for you, users of posterous backup script.
I’ve just released v2.1 of Posterous backup script.
Why such a tremendous version jump ?
Because many things changed in that little script.

New and noteworthy
  • First, the script now uses Posterous API, thanks to the greatness of Groovy HTTP Builder.
  • What’s more, I now export not only posts, but also tags and pages, leading to an updated organization : each of your posterous site now have, under its very own folder, the following architecture
  +— pages
  |      +— list of your user pages
  +— tags
  |      +— list of your tags, for each the generated page contains all associated posts
  +— posts
  |      +— list of your all your posts
  +— images
  |      +— list of all images used in both your posts and page. For each, both thumbnail and full size image are downloaded
  +— audio_files
  |      +— list of all audio used in both your posts and page.
  +— videos
  |      +— list of all videos used in both your posts and page.
  +— posts.html           # a page listing all your posts
  +— pages.html           # a page listing all your pages
  +— tags.html            # a page listing all your tags

Actually, the links are not exported. Do you want me to export them ? If so, how ?
  • Concerning page content, even if the layout is far simpler than elegant layouts found on our beloved site, I tried to respect, as far as possible, microformats recomendations. As a consequence, posts are written using hatom hentry, users infos (in posts and comments) are written using hcard, which theorically makes CSS skinning easy (even if I’ve not yet thought about it, I must confess)
The mandatory how-to

Concerning the usage guide of that script, nothing has changed (more or less) since initial release of v1 : you must still install both Java and Groovy. Since I’ve kept v1 of that script, you now download it at http://dl.dropbox.com/u/2753331/posterous_2.groovy and then run it using Groovy using either standard command line :

groovy posterous_2.groovy

which will show you the available options :

This is posterous export script v 2.1
2.1 is mainly due to the use of posterous api, instead of old-style http queries
You like that script ? You already use flattr ? Please go to http://flattr.com/thing/54243/Posterous-backup-script to sh
ow your appreciation
error: Missing required options: u, p, o
usage: groovy posterous.groovy
-f,–forceRewrite When present, all sites are regenerated. Existing
data on disk is totally wiped out
-h,–help provides full help and usage information
-o,–output <arg> An eventually existing output folder, where all
data will be output. Beware, if some data exists in
that folder, it may be overwritten.
-p,–password <arg> Unfortunatly one have to give its password to this
little script
-s,–separeMedia Separates media from posts directory. When set, all
medias are copied in subfolders of output folders
named as posts they’re associated with. This option
is by request of Eli Weinberg, with my best wishes.
-u,–username <arg> Sets posterous mail address here

Besides, you may have notice some options changes : the -downloadThumbnails options has been removed, and -forceRewrite option to ensure previous files were removed has been added.
As for version 1, you can still be sure to always launch latest script version but be sure to change used URL, otherwise result won’t necessary meet your expectations.

Troubleshooting guide ?

Naaah, there does not seems to be that much issues for that over-simple script written on the shoulders of giants.
Anway, if you really want to ask, this script is slow, and it’s a known problem (but there is nothing I can do) (except re-writing it in Java with great usage of multi-threading for parallelizing posts and medias downloads … well, Ok, I’ve thought about that, but I won’t implement it before … v2.2).
Publicités

2 réflexions sur “Posterous backup script v2

  1. Under Windows 7 (x64), the script seems to retrieve the very latest post from our blog site and then dies. I’m using groovy 1.8.4 (x86) with JAVA_HOME pointing to the (x86) jre6 folder (and not the jre7 folder (x64).The beginning of the error message is:Caught: groovy.lang.MissingMethodException: No signature of method: org.apache.commons.collections.map.ListOrderedMap$ListOrderedMapEntry.entrySet() is applicable for argument types: () values: []Possible solutions: every()at Posterous$_downloadMediasBatch_closure10_closure25.doCall(posterous_2.groovy:247)…

  2. <div>Damn, forgot that Groovy 1.8 release line may contain incompatibilities with 1.7 one.<br></div><div>My groovy scrip runs on … oh crap, i've lost Groovy valid version number !</div><div>Will try to investigate on that this week-end. Thanks for your bug report, Henry.</div>

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s