Posts tagged ‘python’
Improved Markdown table commands for TextMate
March 13th, 2012 at 10:31 pm by Dr. Drang
A few years ago, I made a small TextMate bundle with commands for manipulating MultiMarkdown-style tables1. One of the commands, Normalize Markdown Table, didn’t work too well if the table included non-ASCII characters. As I said in the post: I’m sure there’s some clever Python module I can use to get around this problem, but…
Looking forward to scripting
March 8th, 2012 at 9:45 pm by Dr. Drang
I didn’t mean to ruin Clark’s evening with this tweet. I thought he knew that Hamish Sanderson had stopped developing appscript and was telling people to stop using it on new projects. @macdrifter Um, doesn’t Devon know that appscript has been end-of-lifed? appscript.sourceforge.net/status.html — Dr. Drang (@drdrang) Wed Mar 7 2012 (The tweet, by the way,…
Snapflickr update
February 20th, 2012 at 9:08 pm by Dr. Drang
I’ve been having trouble recently with the screenshots I take for these blog posts. I use snapflickr, a little script I wrote last year1 that takes a snapshot of a window or area of the screen and uploads it to my Flickr account. What I’ve been finding is that often the window I take a…
Setting my coordinate
January 30th, 2012 at 10:15 pm by Dr. Drang
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
January 28th, 2012 at 9:02 pm by Dr. Drang
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)
January 27th, 2012 at 9:18 pm by Dr. Drang
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
January 27th, 2012 at 9:21 am by Dr. Drang
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
January 12th, 2012 at 11:45 pm by Dr. Drang
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
January 7th, 2012 at 10:02 am by Dr. Drang
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
January 5th, 2012 at 9:26 pm by Dr. Drang
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…




