Thursday, 2006-01-12

The Complete New Yorker on your hard drive

Mr. Jalopy mentions that you can store the contents of the Complete New Yorker on your hard drive. (I got this link from BoingBoing.)

However, the mention is a bit sketchy.

What you have to do is update the table Issues in the SQLite database used by the application. A value of 9 in the field DiskID means hard drive. The rest of the IDs refer to the different disks.

I didn’t notice this, but the very first issue is on the hard drive, which gave anyone with some nous a clue about how this stuff works. If you look in the “Issues” folder of the intallation folder you’ll see a file called 1925_02_21.djvu. This is the first issue.

So you have to copy all the *.djvu files from the separate DVDs (located in the “Issues” folder there) to the “Issues” folder on the harddrive, then update the database.

Warning: I take no responsibility for any stuff that may happen to your installation if you follow these instructions. This said, I believe that if you mess up, you can reinstall the app.

You have to install a SQLite client. I use Cygwin and downloaded the source, compiled and installed. There are precompiled Windows binaries, that I suppose can be used from the Windows command prompt. Mr. Jalopy mentions a graphical application on the internet.

The file you use is ny-sqlite-3.db. Making a backup of this file is a good idea.

$ /usr/local/bin/sqlite3.exe ny-sqlite-3.db

There are two ways to approach this.

Brute force

Simply copy every single file from every DVD to your harddrive. This is a good approach if you have the space (around 50 GB). When you’ve done that, simply run

sqlite> update Issues set DiskID = 9 where DiskID <> 9;

Now all your issues are available from the harddrive.

Disk by Disk

If you don’t have the space, like me, maybe two or three disks will be enough. You’ll have to find which issues are on which disk and update the Issues table accordingly.

Here’s how to find which years have a specific DiskID:

sqlite> select  min(Year), max(Year), DiskID from Issues
        group by DiskID order by min(Year);

Below are the contents of my database.

  • Hard drive: 9
  • DVD 1 (1998—2004): 8
  • DVD 2 (1984—1997): 4
  • DVD 3 (1974—1983): 7
  • DVD 4 (1965—1973): 2
  • DVD 5 (1957—1964): 6
  • DVD 6 (1948—1956): 1
  • DVD 7 (1937—1947): 5
  • DVD 8 (1925—1936): 3

To move DVD 3 to the harddrive, copy all the files, then run

sqlite> update Issues set DiskID = 9 where DiskID = 7;

More SQLite tips

To see the contents of the database:

sqlite> .tables

To see the structure of a specific table:

sqlite> .schema <table>

Update 2006-01-13: I got a mention on BoingBoing. Also, Nick posted an update on how to do this on a Mac, including moving the files to another location! Wow, wish I had symlinks on this OS…

Update 2006-03-02: I got a mention on Securityfocus. The whole article is great, it really points out the absurdity of DRM:

If the goal is just to frustrate users, then why use DRM at all, since you must realize that un-DRM’d copies of your materials are going to circulate? And even if Joe can’t break the DRM, he’ll eventually figure out how to use a P2P network, or ask his nerd friend for help, and then you’ve got another unauthorized copy and an upset and now more knowledgeable former customer. What publisher wants that?

Thanks to all the commenters with their tips and tricks on getting this to work on various hardware and software platforms.

Update 2008-05-13: The instructions on how to make this work on a Mac were in a comment that disappeared when I moved to another commenting system. Here are the instructions:

Here is how to do it on a Mac (at least, this is what I did), including putting the files on a separate drive from the Application.

  1. Installed sqlite3 using Fink.
  2. Copied all the Issues files from the DVD’s to my spare hard drive.
  3. Ran the sqlite commands as described above - note that the ny-sqlite-3.db file is located in /Library/Application Support/The New Yorker, as is the Issues folder.
  4. Copied the contents of /Library/Application Support/The New Yorker/Issues to the Issues folder on my spare drive.
  5. Made a soft link from /Library/Application Support/The New Yorker/Issues to my copy of Issues (note that an alias in the finder did not work - I had to create the soft link on the commandline).
  6. Voila! Speedy New Yorker with no DVD swapping.