tag:blogger.com,1999:blog-11837278.post2056158953311409288..comments2022-12-24T07:00:33.561-08:00Comments on tuxbox: hacking my computers: TwitPic to Posterous Export Scriptburndivehttp://www.blogger.com/profile/05133129688998029494noreply@blogger.comBlogger37125tag:blogger.com,1999:blog-11837278.post-83460609518101789192010-12-14T21:31:27.631-08:002010-12-14T21:31:27.631-08:00Excellent - I will give that a try. Thanks for all...Excellent - I will give that a try. Thanks for all your work and the quick responses.Neilhttps://www.blogger.com/profile/14642902803329530119noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-25013991246920571582010-12-14T21:21:21.990-08:002010-12-14T21:21:21.990-08:00If you ask support, they will up the limit for you...If you ask support, they will up the limit for you. I think that's what they did for me.<br /><br />I have updated the script (v1.4.0) to automatically stop after 50, and to take an optional parameter that allows you to skip posts that have already been uploaded.burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-17782498021876929312010-12-14T21:04:18.506-08:002010-12-14T21:04:18.506-08:00API limits are here - http://posterous.com/api/pos...API limits are here - http://posterous.com/api/posting. And they are pretty ridiculous; 50 posts per day.Neilhttps://www.blogger.com/profile/14642902803329530119noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-77962808942784823852010-12-14T09:26:06.847-08:002010-12-14T09:26:06.847-08:00Actually, the first parameter could probably be em...Actually, the first parameter could probably be embedded in the script if it's really a limit on the API.burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-77655242078733637742010-12-14T09:25:05.273-08:002010-12-14T09:25:05.273-08:00Interesting. Is there somewhere where they post t...Interesting. Is there somewhere where they post the default daily API limit?<br /><br />My guess would be 100. I could add two optional parameters: one to limit how many posts it uploads in that run, and a second to skip that number of posts before starting the upload. <br /><br />Do you think that would address your problem, Neil?burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-18266690375420665092010-12-14T01:19:49.838-08:002010-12-14T01:19:49.838-08:00Works pretty well but for my 124 Twitpic images, i...Works pretty well but for my 124 Twitpic images, it hits the Posterous API too hard:<br /><br />rsp stat : "fail"<br />err code : "3010", msg : "API rate limit reached"Neilhttps://www.blogger.com/profile/14642902803329530119noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-39687796179576285222010-12-08T12:05:46.730-08:002010-12-08T12:05:46.730-08:00I could kiss you for this thing. The Posterous Imp...I could kiss you for this thing. The Posterous Import tool has been an epic fail, puking out after uploading 3 pictures, and it doesn't even upload the ORIGINAL resolution files, it only uploads the stupid 450x600 res version. This took a few minutes to figure out, but damn - PERFECT end result. The Posterous guys should give you a money hat and borrow your code.Ryan Merayhttps://www.blogger.com/profile/03826412354636514974noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-8357429959578349982010-09-26T20:39:03.451-07:002010-09-26T20:39:03.451-07:00Thank you for making this! I've been using it ...Thank you for making this! I've been using it to learn shell scripting and it's been wonderful! I've been teaching myself by changing it to download locally and stop, versus going forward and posting to Posterous.<br /><br />A million times thanks :)Stan Schwertlyhttp://www.schwertly.comnoreply@blogger.comtag:blogger.com,1999:blog-11837278.post-4729111973941375412010-08-27T14:59:33.957-07:002010-08-27T14:59:33.957-07:00A huge thank you for your time writing this - copi...A huge thank you for your time writing this - copied the script to my tiny NSLU2 embedded linux server (Debian etch) and it did the business. Up yours TwitPic - now to delete my photos and unlink the account :)Rob Butlerhttps://www.blogger.com/profile/02503674563335926697noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-88735340383534141332010-07-20T10:31:36.836-07:002010-07-20T10:31:36.836-07:00v1.2.5 worked beautifully! Many thanks again :)v1.2.5 worked beautifully! Many thanks again :)Adam Bettshttp://www.artofadambetts.com/noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-71922359597623851382010-07-19T23:39:43.158-07:002010-07-19T23:39:43.158-07:00Thanks for your help and patience, Adam. It looks...Thanks for your help and patience, Adam. It looks like the culprit was "<a href="http://ss64.com/osx/sed.html" rel="nofollow">sed</a> <a href="http://linux.die.net/man/1/sed" rel="nofollow">-r</a>", which I have eliminated from the script. <br /><br />Hopefully that does it. (v1.2.5)burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-76133874272723941242010-07-19T21:33:36.759-07:002010-07-19T21:33:36.759-07:00All of them are like this:
ID: yomgh
POST_DATE: J...All of them are like this:<br /><br />ID: yomgh<br />POST_DATE: January 18, 2010<br />YEAR: <br />MONTH: <br />DAY: <br />DATE_FORMATTED: --Adam Bettshttp://www.artofadambetts.comnoreply@blogger.comtag:blogger.com,1999:blog-11837278.post-34424452193493505182010-07-19T17:26:57.111-07:002010-07-19T17:26:57.111-07:00Adam,
If you feel like running a test, you can in...Adam,<br /><br />If you feel like running a test, you can insert these lines:<br />echo "ID: $ID" >> test.txt<br />echo "POST_DATE: $POST_DATE" >> test.txt<br />echo "YEAR: $YEAR" >> test.txt<br />echo "MONTH: $MONTH" >> test.txt<br />echo "DAY: $DAY" >> test.txt<br />echo "DATE_FORMATTED: $DATE_FORMATTED" >> test.txt<br />echo >> test.txt<br /><br />...just below this line:<br />DATE_FORMATTED="$YEAR-$MONTH-$DAY"burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-46651480304889244522010-07-19T12:11:41.355-07:002010-07-19T12:11:41.355-07:00Opps I forgot to remove the brackets. Here's t...Opps I forgot to remove the brackets. Here's the error message:<br /><br />rsp stat="fail"<br />err code="3006" msg="Invalid date" /<br />/rsp<br /><br />Happened with both 1.2.3 and 1.2.4Adam Bettshttp://www.artofadambetts.comnoreply@blogger.comtag:blogger.com,1999:blog-11837278.post-40767028704298971002010-07-19T05:11:30.536-07:002010-07-19T05:11:30.536-07:00I've got everything running right now...going ...I've got everything running right now...going great! Thanks for all the updates. I was also able to contact Posterous to get an increased personal API limit, they were really quick to respond, so I've been able to do up to 200 items now instead of the API limit of 50.<br /><br />Thanks again for all the awesome work on this Tim!Kaihttps://www.blogger.com/profile/00736694197019569447noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-66053337229749713862010-07-18T23:09:36.013-07:002010-07-18T23:09:36.013-07:00Adam, if you're still there, I would like to k...Adam, if you're still there, I would like to know the error you're getting. <br /><br />Everyone else, I improved the way that this script handles TwitPic posts with no text. (v1.2.4)burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-71375370423497335032010-07-18T22:26:49.475-07:002010-07-18T22:26:49.475-07:00Got this again :(
No worries about it though...Got this again :(<br /><br /><br /> <br /><br /><br />No worries about it though. I can either manually do it or wait for official support from posterous.<br /><br />Many thanks though for trying to help me!Adam Bettshttp://www.artofadambetts.comnoreply@blogger.comtag:blogger.com,1999:blog-11837278.post-2836483923454992042010-07-18T21:10:40.138-07:002010-07-18T21:10:40.138-07:00I set up an alternate Posterous site to test, and ...I set up an alternate Posterous site to test, and it does indeed work now.burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-25772621997588340312010-07-18T20:50:49.273-07:002010-07-18T20:50:49.273-07:00Oops. I tested my changes in a smaller script, bu...Oops. I tested my changes in a smaller script, but I didn't want to upload anything to Posterous, so I didn't test it when I dropped it into the whole thing.<br /><br />Apparently I didn't paste it in correctly: I missed the closing `<br /><br />Try it now.burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-23183668322092889142010-07-18T19:18:39.405-07:002010-07-18T19:18:39.405-07:00v1.2.3 stopped the process early on:
/Users/adamb...v1.2.3 stopped the process early on:<br /><br />/Users/adambetts/Desktop/twitpic-to-posterous-v1.2.3.command: line 153: unexpected EOF while looking for matching ``'<br />/Users/adambetts/Desktop/twitpic-to-posterous-v1.2.3.command: line 194: syntax error: unexpected end of fileAdam Bettshttp://www.artofadambetts.comnoreply@blogger.comtag:blogger.com,1999:blog-11837278.post-75994351725861927222010-07-18T17:33:02.173-07:002010-07-18T17:33:02.173-07:00Adam,
Apparently the OS X version of the date com...Adam,<br /><br />Apparently the <a href="http://ss64.com/osx/date.html" rel="nofollow">OS X version</a> of the date command is a lot less functional than <a href="http://linux.die.net/man/1/date" rel="nofollow">the Linux version</a>. I was using it to convert the date format, but the OS X version doesn't support that. <br /><br />I updated the script once more (v1.2.3) so that it doesn't rely on the date command for the conversion.<br /><br />Let me know how it goes.burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-36288693454825782072010-07-18T16:14:23.649-07:002010-07-18T16:14:23.649-07:00sort -r seems to work great! I see a bunch of imag...sort -r seems to work great! I see a bunch of images, txt and html files now.<br /><br /> I've added posterous user id, password and site id but it doesn't seem to put anything in my posterous site. Repeated error I see in Terminal is this:<br /><br />Uploading Twitpic image...<br />date: illegal time format<br /><br />?xml version="1.0" encoding="UTF-8"?<br />rsp stat="fail"<br /> err code="3006" msg="Invalid date" /<br />/rsp<br /><br />If you'd like the full log, I can email themAdam Bettshttp://www.artofadambetts.comnoreply@blogger.comtag:blogger.com,1999:blog-11837278.post-1533294177224779192010-07-18T15:31:54.169-07:002010-07-18T15:31:54.169-07:00I went ahead and looked up which commands OS X doe...I went ahead and looked up which commands OS X does and doesn't have. According to <a href="http://ss64.com/osx/" rel="nofollow">this list</a>, tee should be just fine.<br /><br />I update the script accordingly (as of v1.2.2). Please let me know if it works for you, Adam.burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-3393602432831831642010-07-18T13:56:52.259-07:002010-07-18T13:56:52.259-07:00Adam,
Does OS X have the sort command with the -r...Adam,<br /><br />Does OS X have the sort command with the -r (--reverse) option?<br /><br />The tac command simply reverses the order of lines from its input to its output. "sort -r" would do the same.<br /><br />Another command I use that may or may not exist in OS X is "tee". tee splits the output between stdout and a file. I use "tee -a" to simultaneously log to a file and print to the terminal. Let me know if it's there, as I could also code around that.<br /><br />I'm also curious to know if curl is in OS X by default.<br /><br />Let me know.burndivehttps://www.blogger.com/profile/05133129688998029494noreply@blogger.comtag:blogger.com,1999:blog-11837278.post-85402078380200495412010-07-18T13:16:11.277-07:002010-07-18T13:16:11.277-07:00Hi Tim, thanks for doing this script :) One proble...Hi Tim, thanks for doing this script :) One problem is I'm unable to get past this error:<br /><br />line 88: tac: command not found<br /><br />I'm running Mac OS X 10.6.4, Terminal app with wget installed. I'm far from being an expert in command line but I know enough to run a script.<br /><br />Is there another way I can get the script to work? It seems like tac utility is not available for OS X.Adam Bettshttp://www.artofadambetts.comnoreply@blogger.com