<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Smarterware &#187; Python</title>
	<atom:link href="http://smarterware.org/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://smarterware.org</link>
	<description>A blog about software</description>
	<lastBuildDate>Tue, 15 May 2012 20:17:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Interact with Google Apps at the Command Line</title>
		<link>http://smarterware.org/6327/get-your-google-data-at-the-command-line</link>
		<comments>http://smarterware.org/6327/get-your-google-data-at-the-command-line#comments</comments>
		<pubDate>Fri, 18 Jun 2010 22:34:15 +0000</pubDate>
		<dc:creator>Gina Trapani</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Google Calendar]]></category>
		<category><![CDATA[Google CL]]></category>
		<category><![CDATA[Google Docs]]></category>
		<category><![CDATA[Picasa]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://smarterware.org/?p=6327</guid>
		<description><![CDATA[Having a ball playing around with the just-released GoogleCL tool, which offers command line access to Google Calendar, contacts, Docs, Picasa, Blogger, and YouTube. With Python-based GoogleCL installed, you can do things such as list today's events on your GCal right in the terminal, like so: $ google calendar today title Coffee with Michael and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://smarterware.org/wp-content/uploads/2010/06/googlecl.png" alt="" title="Google CL" width="700" height="147" class="aligncenter size-full wp-image-6360" align="center" /><br />
Having a ball playing around with the just-released <a href="http://code.google.com/p/googlecl/">GoogleCL tool</a>, which offers command line access to Google Calendar, contacts, Docs, Picasa, Blogger, and YouTube. With Python-based GoogleCL installed, you can do things such as list today's events on your GCal right in the terminal, like so:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ google calendar today title<br />
Coffee with Michael and Samir<br />
Dozing off<br />
Lunch at Flingers</div></div>
<p>Instant use case: Add <code class="codecolorer text default"><span class="text">echo &quot;Next 24 hours:&quot;;google calendar today title</span></code> to your <code class="codecolorer text default"><span class="text">~/.bash_profile</span></code> file to see what you've got scheduled for the day when you launch a new Terminal window. Some more GoogleCL fun inside.</p>
<p><span id="more-6327"></span></p>
<p>If you just type <code class="codecolorer text default"><span class="text">google</span></code> at the command line, you launch an interactive terminal that lets you try all the various commands. In the interactive terminal, type command-name help to see its options, like <code class="codecolorer text default"><span class="text">help calendar</span></code>.</p>
<p>Each command has several parameters that aren't immediately apparent. For example, in calendar, you can omit the long and hairy event URL by using the <code class="codecolorer text default"><span class="text">title</span></code> parameter. You can list events for a particular day using the data parameter (<code class="codecolorer text default"><span class="text">--date 2010-06-16</span></code>), and you can get events from a particular calendar and by keyword search term.</p>
<p>For example, to see all my trips to NYC on my TripIt calendar, I'd use the command:</p>
<p><code class="codecolorer text default"><span class="text">$ google calendar list --cal TripIt --query NYC</span></code></p>
<p>Remember the beauty of the command line: you can easily chain commands together with the pipe, so you can <code class="codecolorer text default"><span class="text">sed</span></code>, <code class="codecolorer text default"><span class="text">awk</span></code>, and <code class="codecolorer text default"><span class="text">grep</span></code> output to your heart's content, and then write it to a file if needed, using <code class="codecolorer text default"><span class="text">&gt;</span></code>. Before I discovered the <code class="codecolorer text default"><span class="text">title</span></code> parameter on the <code class="codecolorer text default"><span class="text">calendar</span></code> command, I was planning to use sed to filter out the calendar URLs from the output. (Thanks to <a href="http://twitter.com/eric_the_read/status/16499681942">lightening-fast</a> <a href="http://twitter.com/jasmarc/status/16499990433">sed</a> and <a href="http://twitter.com/tjmcgrew/status/16502555711">awk</a> experts on Twitter</a>, I was prepared to do just that.)</p>
<p>What I'd love to do is create a Todo.txt CLI add-on that inserts an event on your Google Calendar when you add a task with a due date. Here's <a href="http://tech.groups.yahoo.com/group/todotxt/message/2641">the discussion about that</a> going on now on the Todo.txt CLI mailing list. It's pretty much a no-brainer.</p>
<p>While I've mostly only played with calendar, the Docs access is pretty useful, too. With it, you could easily schedule cron'ed backups of your Google Docs, or push data into a new doc on a regular basis. Same deal with Picasa and YouTube. I like the idea of cron'ing a job that backs up my Google contacts to a CSV file on my local computer weekly, too. I don't see myself ever blogging from the command line, but it's neat that you can.</p>
<p>How are you using GoogleCL? Post your favorite command combos in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://smarterware.org/6327/get-your-google-data-at-the-command-line/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Back Up Your Full-Size Flickr Images by Set</title>
		<link>http://smarterware.org/2651/how-to-back-up-your-full-size-flickr-images-by-set</link>
		<comments>http://smarterware.org/2651/how-to-back-up-your-full-size-flickr-images-by-set#comments</comments>
		<pubDate>Wed, 05 Aug 2009 21:13:29 +0000</pubDate>
		<dc:creator>Gina Trapani</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://smarterware.org/?p=2651</guid>
		<description><![CDATA[If you email photos to Flickr directly from your phone like I do, you probably don't always have a copy of the images you've published online on your computer. There are a few applications that back up your Flickr photos, but right now I'm digging Dan Benjamin's (admittedly geeky) Python script, FlickrTouchr. FlickrTouchr doesn't support [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://smarterware.org/wp-content/uploads/2009/08/flickrbackupfolder.png" alt="Flickr backup folder" title="Flickr backup folder" width="279" height="229" class="aligncenter size-full wp-image-2648" align="right" />If you email photos to Flickr directly from your phone like I do, you probably don't always have a copy of the images you've published online on your computer. There are a few applications that back up your Flickr photos, but right now I'm digging Dan Benjamin's (admittedly geeky) Python script, <a href="http://github.com/dan/hivelogic-flickrtouchr/tree/master">FlickrTouchr</a>. </p>
<p>FlickrTouchr doesn't support video uploads or grab any metadata about your photos (like tags, comments, favorites, etc). But it does arrange your backups by set name. In one command, you authorize FlickrTouchr to access our Flickr account, and it gets busy downloading your files.  You'll need Python to run this and a folder to save your images. (Python comes in OS X, <a href="http://python.org/download/">install it on Windows from here</a>.) Here's what FlickrTouchr looks like in action.</p>
<p><span id="more-2651"></span></p>
<p>Download <a href="http://github.com/dan/hivelogic-flickrtouchr/tree/master">FlickrTouchr</a> and as per the README, invoke it using the commands:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ mkdir FlickrBackupFolder<br />
$ python flickrtouchr.py FlickrBackupFolder</div></div>
<p>FlickrTouchr will launch your browser and open a page asking you to authorize it to access your Flickr account. </p>
<p><img src="http://smarterware.org/wp-content/uploads/2009/08/flickrtouchrauth.png" alt="FlickrTouchr authorization" title="FlickrTouchr authorization" width="617" height="272" class="aligncenter size-full wp-image-2649" /></p>
<p>When it starts going you'll see it grabbing your images.  <b>Wherever you get the error "Failed to get original", FlickrTouchr is trying to get a video.</b> Currently the script does not back up video files.</p>
<p><img src="http://smarterware.org/wp-content/uploads/2009/08/flickrtouchr1.png" alt="FlickrTouchr CLI" title="FlickrTouchr CLI" width="677" height="467" class="aligncenter size-full wp-image-2652" /></p>
<p>Once the script gets running, you can see it create folders of images on your hard drive based on your Flickr set names as it goes. If a photo isn't in any set, it gets saved in a folder called "No Set."</p>
<p><img src="http://smarterware.org/wp-content/uploads/2009/08/flickrbackupfolder.png" alt="Flickr backup folder" title="Flickr backup folder" width="279" height="229" class="aligncenter size-full wp-image-2648" /></p>
<p>If you schedule this script to run on a weekly basis <a href="http://hivelogic.com/articles/backing-up-flickr/">as Dan suggests</a>, it will simply update the photos that don't already exist in your backup.  Just the other day I was <a href="http://smarterware.org/2486/when-you-put-data-in-you-should-be-able-to-get-it-out">complaining about how non Flickr Pro users lose access to photos beyond the latest 200</a>; this is a good way to ensure the full-size image files don't get lost in the ether once they're past that number.</p>
<p><a href="http://hivelogic.com/articles/backing-up-flickr/">Backing up Flickr</a> [Hivelogic]</p>
]]></content:encoded>
			<wfw:commentRss>http://smarterware.org/2651/how-to-back-up-your-full-size-flickr-images-by-set/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

