Posterous backup, an upgrade

This message is an update to the previous one.
it is due to my users being true bentlemen, that wants nothing more than a sweet script allowing them to do whatever kind of backup they want.

One of these users, Eli, asked me if it was possible to save images in another folder than the messages one.

As a matter of fact, I thought it would be even more convenient to have ilmages stored in a folder named from the message.

As a consequence, I added a new flag to posterous backup command line : "-s". When using this flag, images are all stored in a folder named like the message url.

When opitting it, the "historical" mode has been kept, and all images are saved alongside the messages.

Obviously, you can download that script by following that link : download it immediatly and without any kind of nagware.

Feel free to manifest your appreciation !
Publicités

12 réflexions sur “Posterous backup, an upgrade

  1. Awesome! Thx for the update. My name is Gabriel btw–Eli is my 1yo son, but this is "his" posterous acct.I see you made a patch from other error, but now I’m getting another one on the same album:saving post 52/191 of site 1 linked to http://eliweinberg.com/pisainCaught: java.net.MalformedURLException: no protocol: at Posterous$_createPrepare_closure4_closure9.doCall(posterous.groovy:237) at Posterous$_createPrepare_closure4.doCall(posterous.groovy:210) at Posterous$_run_closure1_closure6.doCall(posterous.groovy:70) at Posterous$_run_closure1.doCall(posterous.groovy:68) at Posterous.run(posterous.groovy:66) at Posterous.main(posterous.groovy:319)Ideas?

  2. Besides, I’ve just updated the backup script to try to add some infos in, can you please be kind enough to re-download the script ? Thanks

  3. Sure, here’s the output: ERROR we were unable to dowload (coming from message http://eliweinberg.com/pisain) due to exceptionjava.net.MalformedURLException: no protocol: at java.net.URL.<init>(URL.java:567) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:107) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200) at Posterous$_createPrepare_closure4_closure9.doCall(posterous.groovy:238) at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at groovy.lang.Closure.call(Closure.java:276) at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:2088) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1185) at org.codehaus.groovy.runtime.dgm$109.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Posterous$_createPrepare_closure4.doCall(posterous.groovy:210) at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at groovy.lang.Closure.call(Closure.java:276) at groovy.util.Expando.invokeMethod(Expando.java:102) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) at Posterous$_run_closure1_closure6.doCall(posterous.groovy:70) at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at groovy.lang.Closure.call(Closure.java:276) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(DefaultGroovyMethods.java:1160) at org.codehaus.groovy.runtime.dgm$140.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Posterous$_run_closure1.doCall(posterous.groovy:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at groovy.lang.Closure.call(Closure.java:276) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(DefaultGroovyMethods.java:1160) at org.codehaus.groovy.runtime.dgm$140.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Posterous.run(posterous.groovy:66) at Posterous$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Posterous.main(posterous.groovy:324) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1305) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:717) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:270) at groovy.lang.GroovyShell.run(GroovyShell.java:226) at groovy.lang.GroovyShell.run(GroovyShell.java:156) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:494) at groovy.ui.GroovyMain.run(GroovyMain.java:309) at groovy.ui.GroovyMain.process(GroovyMain.java:295) at groovy.ui.GroovyMain.processArgs(GroovyMain.java:112) at groovy.ui.GroovyMain.main(GroovyMain.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:108) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)

  4. Can you be kind enough to post your modification on any pastie-like ? (I'm sorry to ask you to do my job, but I would really appreciate to have this modification back in order to fix the bug)

  5. Don’t know what you mean by pastie like. You have " if(mediaUrl.contains(".")) {". I just moved the closing brace of that block to below out.close()

  6. <div>OK<br></div><div>It seems your message contained a reference to a non-existing media (well, in fact, it was even the message that didn't exist, as the page displayed by clicking the link clearly states). I've copied your update. Try the latest version, it should work (and display a message indicating one media was not downloaded).</div> <div>By <a href="http://pastie.org/">pastie</a&gt;, I was talking about a site to share code by copy/pasting the code on a web page (see the given link as an example).</div>

  7. That’s what I thought you meant (by pastie). I downloaded the new script. Apparently there were a bunch of errors before (i.e. the same error was occurring for just more than that one album). Running the new script, produces a bunch of these: "in message http://eliweinberg.com/refluxin, there is one media which couldn’t be downloaded : """, but all with just "".

  8. Another feature request–tired of me yet? Prevent the mini-thumbnails from being downloaded. I don’t want them copying to my iPad and cluttering up the folder. When it was in one big folder I could sort by size and easily delete, but now that it is many, which works great btw, it is too hard to go through and delete them quickly.

  9. Try to download the last version of posterous export script … It <br/>should include the required "-d" switch. <br/>I guess it’s now the right time to reclaim an iPad as retribution 🙂

  10. Haha, awesome! If you want to be fully iPad compliant, make the folder titles be the album title names, i.e. with spaces and the like 🙂

  11. Well, this one will really be harder to implement, as I won’t use a <br/>simple switch argument, but rather rely on groovy ability to interpret <br/>parameters, so it will be a little more complicated, but really more <br/>interesting, I think (or at least I hope).

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