Monday, September 19, 2016

Palacios Historic Home Tour - Part 1

I volunteer as a docent at the local historical museum.  It's a great way to learn about Palacios, Texas and meet interesting people from the area, as well as visitors from other lands.

A few years ago, the museum produced an Historic Homes Tour audio CD and I have been looking at how that might be used on the web and (safely) with mobile devices.

Currently, people come by the museum and "rent" the CD for a small donation ($5), take the tour and then drop the CD back off in the museum's door slot.

The CD consists of 51 audio tracks containing driving directions, home descriptions and a few bonus music tracks.

Ideally, we would like to make it available to more people, raise awareness about the museum and solicit support in the way of donations.  Having the content on the web reduces production costs and makes it easier to make additions (for example, a building was recently restored and could be added to the tour).

I plan to write a series of posts of how we go about breathing new life into this fun museum digital asset.

So how do we best accomplish our goals?

One approach might be to use a service like CD Baby or TuneCore, but I'd prefer to do this using open source tools and with minimal costs.

So our first approach will be to use the Internet Archive and build a playlist or feed that can be easily used by most people. For now, donations will be accomplished by simply linking to the museum's donation page where appropriate.

The next step is to rip the CD into mp3 files.  Use your favorite tool for this. You can even use Windows Media Maker or iTunes if you have those.  I converted the files using the a 192Kbs VBR bit rate setting.

The original CD tracks have very little metadata (just track numbers, no titles, subtitles, album, etc) and so we will want to add that.

As we will see, a whole lot of issues can be addressed using simple shell tools and scripts. Having a comma separate file of the metadata can help automate repetitive tasks for each track and so I created one.

You can use a tool like mid3v2 to set mp3 metadata. The track names on the CD were of the form "01 Track 1" and so I wrote a simple shell script to read the csv, find the mp2 track based on the track number and rewrite the metadata using the track title.

You can see the benefit of having the added metadata in the snapshot of the folder with the audio tracks. Note the titles, album, etc.

Now we can upload everything to the Internet Archive.  We'll do that in the next post using the "ia" command line tool.

In later posts, we will create some slide images from the metadata and use that with historic photos and the audio tracks to generate some MPEG 4 videos suitable for uploading to the Internet Archive or YouTube.

Then we will look at how to turn these into mobile (responsive) players and we'll even generate some of those cool audio signal graphs like this:

Lots of fun stuff and all can be done with a few simple command line tools such as mid3v2, ia, ffmpeg, sox, convert and gnuplot.

More soon ...

Friday, December 04, 2015

I got a message from my old friend Laurie Kurilla via LinkedIn.

All LinkedIn goes to spam, but I happened to notice this one before it got deleted. I never login to LinkedIn anymore. I don't care about that site or that kind of networking. It has never been useful to me.

I tried to send an email to Laurie, but all the email addresses in my contacts are out of date, from old jobs.

I know she's on Facebook, but I gave that up over a year ago now.

I don't think she's on Twitter or, more importantly, Github.

So I guess I'll just post here and let her find my reply in it's own good time. What's the hurry anyway?

We're doing fine. In Texas at the moment. What's 'retired' mean? I work until I drop. Hope you are doing well too. Best to all.

Friday, October 23, 2015

Boring Data Can Be Fun

I was helping out with a site redesign and found a document in the assets that was a poorly formatted table of times to help a bicyclist calculate their speed on a known course.  It looked like it had been hit with the 'ugly stick'.

I thought, "this could be used to make something interactive and fun" and so I put together a little demonstration of what I mean: an interactive calculator with a sense of humor.

In a nutshell, it is simply an HTML 'range' element or slider that triggers the display of the corresponding speed. The widget displays the same information as the table, but some styling makes it look nice.

Normally, the slider is restricted to a reasonable range of values (who can typically bicycle comfortably at speeds greater than 30 mph?). But allowing people to make silly choices gives an opportunity for education and fun and so we display various 'speed' facts from Wikipedia as the speed gets higher.

The widget also offers links to rides of the indicated speed if you have a back-end that supports it (e.g., Drupal).

You can find the code on GitHub and test drive it/play with it on JSFiddle as well. Now I have to figure out how to tie those two together :)

Labels: , , , , , , ,

Tuesday, October 20, 2015

Hacking the Internet Archive - Managing Contributions

When it comes to online content management, we've come a long way since the early days of videoblogging. In particular, there are now quite a few tools to manage your Internet Archive contributions and many old ones have changed.

Here's a list of ways I am aware of to create, upload, edit, update and remove items and their metadata:

  • FTP - use tools like filezilla or cyberduck to manage your content. No longer used for downloading and it appears that uploading may no longer be supported. I have yet to find an official announcement of that yet.

  • - web forms to manage your content and your metadata. These forms have gotten easier to use over time and allow you to do lots of cool things. On the other hand, I hate forms.

  • - a powerful interface similar to the Amazon web service. For the truly geeky at heart.  Mainly useful to programmers.  Not so much code as a standard to make calls against using tools and libraries like 'curl'.
    Python interface - built on, used with curl and programming languages, powerful but very geeky. Mainly for programmers, but can be used at a higher level to make cool scripts or use within other applications. Also a great way to learn about the internal working of the Internet Archive and the Python programming language.

  • ia command line interface - based on the python interface, great for managing lots of items and their metadata, powerful, easy to install and use, geeky, but not too geeky. Works on mac, pc and gnu/linux. I really like this tool. Open source.

  • other libraries and interfaces, such as @diffalot's gem at

  • various desktop clients - can be easy to use, there have been many, they come, they go, commercial and open source projects

Recently, I've been using and studying the ia command line interface and it is a great tool.

We'll take a look at using the Python-based command line interface in the next several posts to learn more about Internet Archive features and capabilities that we can use to do cool things with our content.

Labels: ,

Hacking the Internet Archive - Python

Python is a popular programming language, used in many situations these days.

Some wonderful folks have created a powerful command line interface to the Internet Archive that is built using Python.

We will talk about installing the 'ia' tool in the next post.

But first, we need to have a compatible version of Python on our computer in order to install and use the 'ia' command line interface. So that't the purpose of this post: just make sure python is installed.

This was easy on my Ubuntu servers. I already had Python 2.7.6 installed and that works fine for now. I may upgrade this, but I was able then to proceed with the 'ia' installation after that and, as they say, "if it's not broke ...".

My older MacBook with OSX 10.6 already had python 2.5 installed and in use. This would not install ia when I tried it and so I thought it would be best to upgrade python. The current version of Python is 3.5. You can install 3.5 alongside 2.5 (do not remove the older one! your mac needs it). Just visit and download their Mac installer version. Once it is installed, you must type 'python3' in all instructions where you see 'python'. I was able then to proceed with the 'ia' installation after that.

On my Windows 7 box, I installed python via the windows installer, which I downloaded and ran. On windows, you need to add the python install folder to your Path environmental variable (right click on your 'Computer' icon, select 'Properties', then click 'Advanced System Settings', then 'Environmental Variables', scroll to and select 'Path' in lower 'System Variables', double click to edit. Add a semi-colon (;) and then the new path to your python install directory binaries.

On windows, type 'py' to run python. On 'mac', type python3. Just type 'python' on Ubuntu. In all cases, you should see something like this:

Once you verify that python is running, you can either play around and type things like 'print(1+1)' if that gets you exicted. Type a 'Ctrl-D' ('Ctrl-Z' on windows) to exit or type 'exit()'. I guess everything is a function in python. :)

Learning the 'ia' tool will give us an opportunity to learn more about python as we continue out explorations.

If you want to learn more about python, check out this cool learning guide that is also on GitHub.

Labels: ,

Monday, October 19, 2015

Hacking the Internet Archive - Icons

The Internet Archive has some cool new glyphs like this:







See their post Customized font with Glyphs!.

You can use them too! Like I did here. I just inserted a link to the Internet Archive's style sheet into my blogger template. :)

Labels: ,

Friday, October 16, 2015

Hacking the Internet Archive - URL's

I've been playing around with the Internet Archive again lately.  I though it would be fun to share some of the things I have discovered along the way and so I intend to write up a series of posts on "Hacking the Internet Archive".

By hacking, I mean using various tools, api's, tips and techniques to do some cool things with your media.  While many of these are documented, many are not and so I'll use these blog posts to share what I find.

To start out, I decided to poke around inside the HTML source code for a details page, In this case a simple image upload.

Using the browser's 'Inspect element' or 'View source' commands, we see something like this (image is example from Chrome desktop browser):

One thing to notice, is that is now using jQueryBootstrap and other interesting frameworks. Fun stuff! We'll come back to that in a later post.

When the detail page is for a book (mediatype: texts), there are lots of interesting things to say. I'll devote an entire post or two to this topic.

An easy thing to do in most browsers is search for the detail's identifier, preceded by a slash to find interesting url's related to the item.  Here are some that I found so far:

Some of these url's, such as '/edit' and '/manage' assume that you are already signed in.  They are used to edit the metadata or manage the files using the IA admin pages.  More on these features later (boy! are we gunna have a lot of follow-up posts).

The item home page is located at '/details', followed by the unique id for your upload item.  By default, shows single images in the 'theater' area of the page if it can find one.

If there are multiple images, inserts a bootstrap slide carousel.  If the item is a 'book' (texts), inserts a book reader.  Video and audio also have players associated with their details page.

BTW, here is the full list of media types as show in the media type select pull down on the advanced search page (/advancedsearch.php):

Notice that you can get a thumbnail, if it exists, using '/services/img'. Here's an example: I simply asked blogger to insert an image from a url, then typed in '' and presto!

I wonder what other services there are?

You can access a specific file by using '/download'. This is useful for image or video 'src' attributes, 'json' data and more.  Here's an example:

I have not made use of the '/compress' feature yet, but it looks handy. More to come on that one for sure.

I'm not sure what '/embed' does at this time. I think it is for embedding an iframe into another webpage, but it seems to be broken as of this writing. :(

That's the iframe above, that big white space. The main div inside the embed appears to be empty on this and other detail pages I have tried today.

Ok, that's it for the first post. Just a simple introduction to some important features. In future posts, we'll look at some cool tools for working with the Internet Archive and some ways to use them to create some interesting web pages.

Labels: , , , ,

Monday, July 07, 2014

So long and thanks for all the fish!

I've closed my Facebook and Twitter accounts. There are lots of reasons. Mostly, it's a time sink and I'd rather spend my time coding, blogging, reading, exploring the coast, cooking and woodworking.

Those who know me, know how to get in touch with me using Skype, google chat, phone or email.  I'm still on tumblr, YouTube and (for the moment) Flickr. I will probably can Flickr and, eventually, YouTube by moving everything to the Internet Archive and this blog.

Just finished a few books this week: First was Pop. 1280 by Jim Thompson and the other was Darker Than Amber by John D. MacDonald.  I enjoyed both.  Nothing special, just good, fun reads.

Took a short drive into Palacios today with Alicia and stopped at a little burger dive. Nice spot, but nothing special. Alicia had the chicken-fried steak, which was good, but had a rather smokey gravy that we don't really care for. I had a decent burger and fries, but nothing to write home about. Mainly it was just a beautiful day and nice to get out and explore.

Hopefully, I'll be blogging more here from time to time.

Labels: , , , ,