{"id":2219,"date":"2010-02-12T22:08:30","date_gmt":"2010-02-13T06:08:30","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=2219"},"modified":"2010-02-12T22:08:30","modified_gmt":"2010-02-13T06:08:30","slug":"svn-to-twitter-gateway","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/svn-to-twitter-gateway\/","title":{"rendered":"SVN To Twitter Gateway"},"content":{"rendered":"<p>Here&#8217;s one of those projects that you dream up just to avoid doing more important\/useful work: <a href=\"http:\/\/twitter.com\/ffmpegsvn\">FFmpeg SVN to Twitter gateway<\/a>. I, too, am now contributing to the notorious fail whale.<\/p>\n<p>All the kids are talking about this Twitter thing these days. I have read up on some kind of <a href=\"http:\/\/apiwiki.twitter.com\/\">open API they offer<\/a>. I&#8217;m not really that keen on these modern web-based APIs. I had a feeling that someone must have a Python API for it and sure enough: <a href=\"http:\/\/code.google.com\/p\/python-twitter\/\">python-twitter<\/a>. So that takes care of that half of the gateway.<\/p>\n<p>The other half is interfacing to FFmpeg SVN. I already have this part reasonably figured out thanks to <a href=\"http:\/\/fate.multimedia.cx\/\">FATE<\/a>&#8212; my current method is to simply execute &#8216;svn&#8217; via shell and parse the stdout. It seems that there are a few cleaner Python-oriented solutions for this. But all I really need is to parse the current revision number from &#8216;svn info&#8217; and then parse the output of &#8216;svn log -r &lt;rev&gt;&#8217;.<\/p>\n<p>Perhaps the craziest part of my solution is that I&#8217;m using an sqlite3 database to store a single piece of data&#8211; the revision. Hey, I just find it to be the simplest solution, oddly enough. <\/p>\n<p>I imagine it would be possible to engineer the Twitter update as a function triggered during a commit. However, I tend to think it&#8217;s not a good idea to have a commit trigger that is dependent on an RPC call to a web service that has a tenuous uptime reputation.<\/p>\n<p>Now to sit back and see if anyone actually follows the account (besides spammers).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow FFmpeg development on Twitter<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2219","post","type-post","status-publish","format-standard","hentry","category-general"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=2219"}],"version-history":[{"count":2,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2219\/revisions"}],"predecessor-version":[{"id":2221,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/2219\/revisions\/2221"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=2219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=2219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=2219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}