Posts tagged ‘python’

Setting my coordinate

Too many posts of my retuning of old scripts. This is another one, but I’ll try to make it the last one for a while. Today I was going to use my coordinate script to set the location of several dozen photos I took with a standard, non-GPS-equipped camera. I’d taken a photo in the…


Fun with Python’s decimal library

You’ve probably run across a link to this cute math fact in the past few days: [\frac{1}{998001} = 0.000001002\ldots100101102\ldots900901902\ldots999\ldots] This relatively simple fraction generates a decimal number that contains, in order, every three-digit sequence from 000 to 999 (except, sadly, 998). Pretty cool. If it’s true. I don’t want to be cynical or disparage the…


Photo location service (and Bing)

Following up on this morning’s post, I’ve expanded my map script to include an option for using Bing Maps to display the location of a photograph, and I’ve created a Service so I can get a map by right-clicking on a photo in the Finder and choosing “Photo location” from the contextual menu. Here’s the…


Locating your photos on Google Maps

Back in October I wrote a little script that added GPS location information to photos. My idea was to be able to take one photo with my iPhone, which would capture the location in its EXIF metadata, and use the script to transfer that information to all the photos I took with my regular camera…


New Blackbird.py for embedding tweets

If you have access to the NewNewNew Twitter (as I did for about a day several weeks ago, but haven’t since), you’ll find a button that’ll give you the HTML code necessary to embed any given tweet in your blog or webpage. This is a big improvement on the common way of showing a tweet,…


Tweeting images

Back in August, I added some code to my personal Twitter client, Dr. Twoot, that allowed it to display tweeted images inline. This ability is limited to pictures that use Twitter’s “native” image system, which includes the image data as a tweet entity. This isn’t as nice as having hooks to display images from all…


Simpler Apple affiliate linking

Last night I posted a TextExpander snippet that automated the procedure for generating Apple affiliate links for the items in iTunes and Mac App Stores. This morning I got an email from David Smith, who pointed out that affiliate links can be much shorter and easier to read if you’re willing to forgo the click…


Apple affiliate links via TextExpander

This is a relatively simple way to get affiliate links to Apple’s digital offerings: Mac apps, iOS apps, songs, albums, ebooks, audiobooks, movies, TV shows—anything Apple sells through iTunes or the Mac App Store. It’s a bottom-up rewrite of a workflow I described last week that’s more accurate and more flexible. Affiliate link primer Let’s…


Fortunate tweets

Earlier this month I read a couple of things that made a connection in my head and turned into this little program. As best I can tell, it has absolutely no value other than to give me something to do while sitting in airports and on planes. A perfect project for the week between Christmas…


Extending the last output script

As threatened at the end of my last post, I’ve extended the script for putting the output of the last command in Terminal to handle Octave and Python sessions as well as bash sessions. I often need to include results from these sessions in reports and other documents, and a quick keyboard command is faster…