Resurrecting a Lost Website

In a somewhat irrational move, back in 2004 I migrated from using Flickr to share my photos to using an installation of the open source Gallery project. In theory this should have been a perfectly fine migration, except that, at least at the time, Gallery wasn’t really satisfying in any way other than being not Flickr, and so, after a while, I abandoned it. And, a while after that, the Gallery install didn’t survive the transition to a new machine, and so the content was lost.

This wouldn’t have been a serious issue but for two things: first, the photos involved were, at least emotionally, valuable to me, as they were of a trip I took with my brother Mike to the U.S. southwest and of my exploits as a blogger during the 2004 U.S. election, including photos from the Democratic National Convention. There are links over that summer to those photos from posts here that have been broken for almost a decade, and I decided that I wanted to fix that.

Fortunately, the Wayback Machine has a complete copy of the site in its archive and so all that remained was getting the images out of that archive and into somewhere — likely Flickr — less susceptible to decay.

And, more fortunate still, there’s a handy tool called Warrick designed to do just that — to resurrect websites from archives like the Wayback Machine so they can live another day.

Warrick is working its way through scraping the site out of the Wayback Machine as I type, but should you wish to resurrect your own dead site from the past, here’s a quick summary if how I got it working.

  1. To ensure I had a relatively modern version of Linux at hand, I started up an Amazon EC2 instance, using the stock Amazon Linux AMI.
  2. Installed some missing parts inside the instance:
sudo yum  -y install
sudo perl -MCPAN -e 'install HTML::TagParser'
sudo perl -MCPAN -e 'install HTML::LinkExtractor'
  1. With these in place, then it was simply a matter of:
chmod +x ./warrick.pl
./warrick.pl "http://photos.reinvented.net"

The result is the Warrick starts up and pulls a complete mirror of the archived site from the Wayback Machine and dumps on on the local disk. From there I can pull the full-sized JPEGs out of the Gallery installation, and upload them wherever I like.

Jim Hancock on Island Morning

Former Director of Computer Services at the University of PEI, Jim Hancock, appeared on Island Morning today to talk about the 25th anniversary of the upei.ca domain.

Canada's First Domain Name: Twenty-five Years of upei.ca

One of the unsung aspects of the University of Prince Edward Island is its pioneering involvement in the early Internet: under the leadership of Jim Hancock (Director of Computer Services from 1972 to 1997), UPEI, among other things, participated in the NetNorth, CA*Net and CANARIE initiatives, hosted Prince Edward Island’s first connection to the Internet, and registered the country’s first “.ca” domain, upei.ca, in 1988.

The upei.ca domain name registration’s anniversary is coming up on Sunday: 25 years ago, on January 12, 1988, the domain was registered with John Demco at the University of BC, a name well-known to any of us involved in the early Internet in Canada, as he was the go-to guy for all .ca domain name registrations for many years (back when they were free, but encumbered by many restrictions; that’s how I ended up, for a time, with the domain name digitalisland.kingston.pe.ca).

While the university’s work in this regard had tremendous benefits for the institution itself, it benefited Prince Edward Island as a whole in many other ways. In my case it made for my first contact with PEI when I was applying for a job here – an email from Morley Pinsent using the CA*Net email system hosted by UPEI that was free to any Islander who asked – and, once I relocated here, it was my conduit to the greater world through my email address caprukav@atlas.cs.upei.ca (I still remember the day in 1993 when, as a meek 27 year old, Earlene Gallant handled the paperwork to sign me up for this).

UPEI’s work led to PEINet, which became (via a 14.4 kbps leased line connection) the conduit for the first webserver on PEI, at the PEI Crafts Council, to join the network; later, it was on PEINet’s web host that I created the first versions of www.gov.pe.ca. Through this all, the counsel of Jim’s successor as Director of Computer Services, Dave Cairns, was extremely valuable (the best piece of advice Dave ever gave me: hard drives will always fail, eventually, and maybe tomorrow).

All Islanders owe a great debt to the University of PEI for its vision in this regard; to help mark the occasion, I printed up a ceremonial poster on the letterpress this afternoon, and I’ll stick them up around town and campus over the next few days:

Celebrate 24 Years of UPEI.CA Poster

Celebrate 24 Years of UPEI.CA Poster

Celebrate 24 Years of UPEI.CA Poster

Hacker in Residence

I began a new appointment today, as Hacker in Residence at Robertson Library, University of Prince Edward Island. Under the aegis of the university’s “visiting scholar” program, I’ll be a part-time member of the library community for the next year, with a mandate:

To bring the spirit and application of the ‘hacker ethic’ to the Robertson Library where the hacker ethic is defined as “access, freedom of information, and improvement to quality of life.”

That’s intentionally open-ended: while I have a grasp of the terrain I’d like to wander, what I’ll be doing specifically is to be seen. In general, I’ll be seeking to take the infrastructure, facilities, systems and special projects of the library apart and shed light on them by remixing, mashing-up, communicating and enlivening. I will be a “user in residence,” “patron in residence,” and “developer in residence” by times (and no, I will have nothing to do with “testing the library’s security systems,” which reflects a different (mis)use of the term “hacker”).

The appointment has its roots in conversations that University Librarian Mark Leggott and I started having when he was first appointed 6 years ago: I’ve long sought a way of becoming more deeply engaged with the work the library is doing, and it took 6 years for us to hack together a model that worked. In innumerable ways, it’s a dream position for me.

My role isn’t operational – which is good, because I’m not getting paid! – and has no specific research goals. If that sounds an awful lot like “hanging out around the library and doing stuff I find interesting,” that’s good, because that’s what I’m planning on doing. Beyond scratching my personal interests and  and curiousities, I’m a strong believer that a hacker presence inside any organization can be a force for good, and this is a good opportunity to put that belief to the test.

Hacker in Residence Office

I’ll be on the University of PEI campus two or three times a week, working out of tiny room 322 of Robertson Library on the second floor beside the stacks, 50 square feet of highly-concentrated hackerspace that, right now, has a desk chair and an Ethernet jack waiting for me. Some time later this week there will be a website attached to me, where various reports of my exploits will begin to flow.

A brief summary of day one’s activities:

  • Sampled the cinnamon-raisin bagels of the in-library café, a facility that, alas, does not serve espresso-based beverages (a coffee drought that afflicts the entire campus, it seems) and met the friendly café staff (man does that place get busy between classes!).
  • Got a tour of the library, and introductions to most of the staff, from the ever-helpful and efficient Pauline MacPherson, library administrator.
  • Met briefly with Peter Lux, a colleague from many projects in the past, to get a general lay of the systems and to talk about getting a virtual server set up for me.
  • Met briefly with Don Moses, another longtime colleague and now Digitization Initiatives & Systems head at the library, about the general lay of his land.
  • Took the measurements of my office (92” x 80” with a 92” x 25” counter/desk, a bookshelf, a single electrical outlet, a single Ethernet port, a wastepaper basket and a bulletin board).
  • Make a request from Special Collections Librarian Simon Lloyd for blueprints of the library building (not currently in the collection, but perhaps available from the facilities branch of the university); figured a good way to start my term was to get a handle on the physical plant at the same time as I’m checking out the digital plant.
  • Got myself hooked up to the wifi (only the barest dribble of a signal in my office, which I’ll have to fix somehow).
  • Tracked down the history of Robertson Library.
  • Bought a 10-pack of bus tickets to get me to and from the library.

Various bits of paperwork and bureaucracy are still in the works: security needs to cut me a key to my office and arrange for 24/7 access via the back door (so I can host raves, etc.), computer services needs to rejig my campus account so I can do things like print and access server resources. But, otherwise, I’m ready to roll.

Turning LEDs on and off with Python

I am one of those “never quite got the hang of electronics” kids. Sure, I built myself a crystal radio. Got that drugstore prescription printer to work with my TRS-80 Model I. And I’ve wired up my share of connectors and cables. But soldering was always a roadblock. And don’t get me started on decrypting the coloured bands on resistors. It’s not that any of this was particularly impenetrable; it’s just that I never took the time, perhaps because sticking to software allowed me to do much more delightful things. But, now I’ve got a Raspberry Pi, and we’re in the Internet of Things era, so the least I can do is get some LEDs turning on and off with Python.

I used this tutorial as the basis for my coding – I just stripped out the IMAP-checking bits; the code looks like this:

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GREEN_LED = 18
RED_LED = 23
GPIO.setup(GREEN_LED, GPIO.OUT)
GPIO.setup(RED_LED, GPIO.OUT)
GPIO.output(GREEN_LED, True)
GPIO.output(RED_LED, True)

Can a “are we getting more than 100% of our electricity from the wind” alert system be too far behind?