Wizardry

Thursday afternoons are geek-out time for the CEISMIC team.  That’s when we have what we call our “Wizard Club” (because programming seems very much like magic when you’re learning it) – a combination of staff training and R&D time, which we use for things like building handy apps and tools to improve our workflow, sharing helpful websites and software we’ve stumbled across, or improving our skills by working through tutorials from Code Academy and the like (or just by playing around with code to try putting the stuff from the tutorials into practice) – things that aren’t really core business, but in the long term contribute to the overall team efficiency.  Plus it’s just lots of fun 🙂
For the last few weeks, Lucy-Jane and I have been using the time to work on a tool that will make it easier for our Friends of CEISMIC volunteers to write photo descriptions.  Normally when we’re preparing material to go into the archive, we use what’s called a manifest – basically a huge spreadsheet which has a row for each item (such as a photograph), then up to about 30 columns which hold all the metadata for that item (things like its filename, title, description, what collection it belongs in, copyright and license details, file size, who the photographer is, the location where the photo was taken, the date it was taken, etc etc etc).  We’re used to reading manifests, but for someone coming in as a volunteer, they’re very confusing documents (as I’m sure Lytteltonwitch can attest), and figuring out which photograph you’re up to and where you write the description isn’t easy.
So we had the idea of creating a tool that would read the manifest and show you just one photograph at a time and a box where you could write the description.  Then you’d click a button to go to the next photo, and the description you’d written would be saved back into right place in the manifest.  That way our volunteers wouldn’t have to deal with all the confusion and distractions of a manifest, they’d just have a nice clean user interface to work with.
(Warning, technical stuff follows.  TLDR; version is we’ve almost got it working). Lucy-Jane could easily have built such a tool in Python, but the trouble with Python is that you need to run it in a virtual environment, and the computers we have available for our volunteers are all locked into managed software, which means you can’t do useful things like access the command line or run virtual environments.  So I suggested we try and write something in Javascript instead, which has the advantage that it runs entirely in your browser, so you don’t need to access anything that makes the IT department nervous.  But Javascript isn’t as good as Python at moving information between the browser and other files, so it took a lot of work (mostly by Lucy-Jane) to find a tool that would let us do so.  But she found something that would read from a csv file into a Javascript array, and I’ve written some Javascript that searches through the array for the information we actually need and uses it to display the photo on a webpage (and today I added things like “next” and “previous” buttons to cycle through the photographs, and a few little bells and whistles like a handy link which takes you to a Google map of the location of the photograph if it was taken on a camera with built-in GPS), so all we’ve got to do now is figure out how to write from the array back to the csv once the description is written (which Lucy-Jane thinks she’s found a tool for, but hasn’t properly tested it out yet), and we’ll have done it.
I’m feeling very proud of my little Javascript programme, because it’s my first foray into building something that’s actually going to be of use to the team (as opposed to the playing around with pictures of kittens and graphing Mandelbrot sets which I was doing while I was still trying to learn the basics of Javascript).  Can’t wait until next Thursday when we can add in the csv writer bit and test it out properly!

Similar Posts

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.