Google Transit Feed Project
This was a contract gig for RouteMe2 Technologies, a Silicon Valley company that specializes in developing location based service (LBS) applications for Google's Android smart phone.
My job was to digitize shuttle route maps and timetables and create sets of files conforming to the Google Transit Feed Specification. There were 95 routes in total, mostly free shuttles operating in the San Francisco, and the work was done on a milestone basis over several months.
All of the bus stops for each route needed to be Geocoded and the timetable and fare information extracted.
For the former it was a matter of reading the stops from the route maps and trying to pinpoint them on google maps. Street view came in very handy for this and many of the bus stops I could actually see, which was great for accuracy. That part of the job was a little bit like a cross between aerial reconnaissance and "Where's Waldo?". I was even able to call some of the agencies to dig for more information.
For the time-tabling, KPDF has a great feature that lets you draw a rectangle around a section of text in a PDF and extract it as plain text. which ended up being a big time saver. I wrote a few short perl scripts to take a timetable in CSV format and covert it into GTFS format. I used an OpenOffice.org spreadsheet to keep the datasets straight.
The final destination for all of this data is an application called "PedNav", developed by RouteMe2 technologies. It's a google Android application that works a little bit like a personal assistant. You tell it where you need to be for the day and at what time and it will create an itinerary for you with instructions of where to walk, and which bus to take. The application won the first round of the Google Android Developer Challenge.
Tags: perl, automation, applications, parser
Son of Perl Video Grabber Script
This was yet another scripting project for Jay at Primary Web Services, LLC. The goal for this script was to take a source video, show a group of 15 or so frames, allowing the user to pick one, or move on to the next group of frames. When a frame is chosen it will save it to an output directory and move on to the next video in the source folder.
If the script gets to the end of a video without a frame being chosen it loops back to the start and shortens the distance between grabbed frames.
The solution was coded in Perl, utilizing ffmpeg decoder and the Tk module to handle the GUI aspect.
Tags: perl, applications, automation
Ebay Template & CSV Conversion
Annette at Surplus4Business needed a fresh design for her ebay auction template combined with a scripted solution to accept a CSV file of product data as input and automatically insert it into the template and generate an ebay file exchange CSV. She had a large listing of items that needed to go online within a week. I was able to get the template and script finished in plenty of time for her deadline.
Url: http://stores.ebay.com/Surplus-4-Business
Tags: graphic design, perl, parser
Perl Video Frame Grabber Script
Jay at Primary Web Services, LLC needed another image processing script - this time, grabbing frames from a video source. The script had to cycle through a folder of videos, displaying a frame from the start of the video and a pair of "yes" / "no" buttons. If "yes" is chosen, it writes the visible frame to an output folder, otherwise it skips ahead a specified number of frames and displays that. If it gets to the end of the video and a frame has not yet been selected it returns the beginning and decreases the number of frames to skip.
To realize this I coded a Perl script that leveraged the ffmpeg decoder to first extract all of the frames, then used Perl's Tk module to display the frame in a GUI window with the "yes"/"no" buttons.
Tags: perl, applications, automation
Son of Perl Image Conversion Script
A couple of days after completing the first Perl Image Conversion Script for Jay at Primary Web Services, he came with another spec based on the core functionality of script #1
This time, it needed to output images and update a CSV file with the image names. So, I built on to the original to create a Perl script that would scan a directory of images and output to another directory images compressed just enough to get them under the specified file size (I'd gathered from the filenames that some of these compressed images were destined for mobile phones).
Tags: perl, applications, automation