HOWTO: Batch Download a Book in PDF Pages from NetLibrary

NetLibrary is an online book resources that universities or other individuals pay to supply them with virtual copies of books. These books are available online, and can be searched, downloaded, and saved. The catch is that NetLibrary’s interface limits you to viewing (in horribly slow Acrobat reader) one page at a time. Given how unresponsive Acrobat makes many computers, this can make printing out a long book take hours.

Therefore, I took the effort to figure out how to batch download a book from NetLibrary, saving me valuable time.

My solution uses a combination of Firefox and Perl, but other solutions are of course available.

After I loaded up the first true page of the book in the NetLibrary interface, I gave the frame with the PDF its own Window used Firefox’s Tools | Page Info | Media properties dialog box to determine the URL of the embedded PDF file. It turns out it’s a call to a program named nlReader.dll, but it takes a book identification number and page number as arguments:

http://0-www.netlibrary.com.library.unl.edu/nlreader/nlReader.dll?BookID=BOOKIDGOESHERE&FileName=FILENAMEGOESHERE

Obviously, the library.unl.edu part requires my university proxy. For normal pages, the filename was in the format of Page_1.pdf, Page_2.pdf, etc. So I wrote a perlscript to create hyperlinks to pages 1 to 499, saved the output to HTML, used the DownloadThemAll! Firefox extention to get them, and…

Then Acrobat crashed trying to print out those hundreds of PDFs. Boo! Fortunately, Perl came to my rescue… I used ppm to install the module Perl::Reuse, then wrote a script to append all those pdfs into one. The final product is about 500 pages ans 70 megs, but quite easy to store, print out, etc.

Thanks, NetLibrary!

Dozier Spam Bot Attacks tdaxp?

Two strange messages (I’ve left them in tact, except for the hyperlink) have appeared in the comments for my posts, Dozier Internet Law harms client’s reputation and Did Dozier Internet Law Misrepresent a Federal Judge?.”

The first comment reads:

Here is the Dozier Internet Law Blog:

[url redacted by tdaxp]

Frankly, it seems pretty insightful.

and the second is:

I don’t know who is right. It looks like it might be Dozier:

[url redacted by tdaxp]

At first blanch, these are merely spam messages. The IPs of the two comments (left with the same nick and email account) are quite different… the 128.241.*.* range resolves to NTT America (a “global IP solutions company”), while the range of 207.195.240.0 to .255.255 resoles to Global Tac, LLC. Global Tac has been implemented in spam messages before. It appears that Global Tac hides behind150 different IP messages to conduct its spam campaigns, so the discrepancy between the IP addresses is smaller than it appears.

Dozier Internet Law is no stranger to spam as a means of advertising – they’ve long generated spam websites with nonsensical information. Still, escalating this to include spam comments on private blogs comes dangerously close to trespass and hacking.

Legalize Dope, Annex Mexico

An excellent article by George Friedman

This leaves the option of treating the issue as a military rather than police action. That would mean attacking the cartels as if they were a military force rather than a criminal group. It would mean that procedural rules would not be in place, and that the cartels would be treated as an enemy army. Leaving aside the complexities of U.S.-Mexican relations, cartels flourish by being hard to distinguish from the general population. This strategy not only would turn the cartels into a guerrilla force, it would treat northern Mexico as hostile occupied territory. Don’t even think of that possibility, absent a draft under which college-age Americans from upper-middle-class families would be sent to patrol Mexico — and be killed and wounded. The United States does not need a Gaza Strip on its southern border, so this won’t happen.

The likely course is a multigenerational pattern of instability along the border. More important, there will be a substantial transfer of wealth from the United States to Mexico in return for an intrinsically low-cost consumable product — drugs. This will be one of the sources of capital that will build the Mexican economy, which today is 14th largest in the world. The accumulation of drug money is and will continue finding its way into the Mexican economy, creating a pool of investment capital. The children and grandchildren of the Zetas will be running banks, running for president, building art museums and telling amusing anecdotes about how grandpa made his money running blow into Nuevo Laredo.

It will also destabilize the U.S. Southwest while grandpa makes his pile. As is frequently the case, it is a problem for which there are no good solutions, or for which the solution is one without real support.

.. confirms what I said before.

A Good Day

Day started with a phone conference with a thinker and doer I respect immensley, helping lay the foundations for something that will not only help the country, but be a blast.

Then, a gift a books for Lady of tdaxp and myself came, and we immediately began reading a Dilbert book and a book of essays by S.T. Joshi on H.P. Lovecraft.

And now, McCain wins Florida.

A good day.

The Quantitative Revolution

Revolutions break eggs to make omelets. Omelets are tasty. Broken eggs are messy. Hence, the essential problem of revolutions.

Of all the controversies I have learned about since entering the University of Nebraska, none has fascinated me so much as the Quantitative Revolution. The Quantitative Revolution, or QR, has radically transformed social research in academia. It is as much of a revolt against all that has gone before as Marxism. QR is a rejection of all that would interest a bright adolescent in social research. It is also, I think, all that can save social research from Marxism.

To understand this war, think about politics, or psychology, or geography, or any of those subjects that interested you when you read an Encyclopedia as a kid. Think of the Plato and Machiavelli pondering Politics, Freud and Adler plumbing the subconscious, and explorers and theorists deciding what is a Sea and what is a Bay. This is social research as it existed from antiquity to sometime in the 20th century.

Now throw that out. Instead measure things, and note what varies with what.

That’s the Quantitative Revolution. It’s very powerful, because it’s actually science: It provides a way of showing you when you are wrong, and a methodical way for supporting your intuition when it is right. Is man, for instance, truly a political animal? Well, measure where his nature comes from (neatly dividing it into biological influences, non-biological influences shared with one’s siblings, and non-biological influences not shared with one’s siblings) among a diverse enough population, regress it, and suddenly you get answers. More than that, you get repeatable answers which allow you move on to something else without throwing your old work away.

Yet QR is a profoundly dull revolution. All the great questions become matters for vertical thinkers and technicians. An academic career in the era of the QR essentially is the process of limiting your imagination to one or two good tools, and measuring variation with those tools. The sort of people who enjoy being accountants, I think, love life under the Quantitative Revolutionaries.

Yet the enemy of my enemy is my friend, and QR targets its wrath most consistently against the Marxists, dead-ender followers of a 19th century Revolution that have burrowed themselves deep into academia. Marxists have spent a century developing a self-consistent toolbox of rhetoric that has dispatched non-Marxists in nearly every academic field. Every place the Quantitative Revolution has not taken and held, it seems, is territory in which Marxists rapidly make their home.

I despise, I think, the Quantitative Revolution for depriving academia of the qualitative give-and-take that is so common in the better parts of the blogosphere. But I delight in the ease at which the Quantitative Revolution unseats the Marxists every time it gains a foothold, overwhelming the Marxist immune system through dull questions of covariation and how-do-you-know-if-you-are-wrong?

Batch Upload to Google Docs

Back in March ’07, I requested two new features for Google Docs: automatic synching between openoffice and Google Docs, and batch uploading to Google Docs.

Well, batch uploading has just come true.


Batch Upload to Google Docs

Even cooler, the batch uploader is really just a tech demo for the new and improved Google Docs API, so advanced functionality like the add-in background uploader to Google Docs isn’t too far away.

Thanks Google!

Did Dozier Internet Law misrepresent a federal judge?

Brendan of I Hate Linux emailed in this disturbing story: Dozier Internet Law got a judge to agree one can copyright a cease-and-desist letter

… or, maybe not: According to Public Citizen:

The hearing transcript is not online, so we cannot be sure exactly what arguments were conceded, but there is every reason to believe that the judge did NOT reject either the First Amendment or the fair use arguments – he seems to have avoided them by ruling for the one party on whose behalf they were still being pressed by the end of the hearing. Nothing supports Dozier’s claim that the case stands for the proposition that a cease and desist letter is copyrightable, not to speak of the propositions that posting of such letters is neither fair use nor protected by the First Amendment.

I will try to read the PDF of the original decision, and come to my own conclusion.