Good IT People are Lazy….

Good IT folks are lazy. What I mean by that is that they will find ways to automate boring tasks. That means they will solve problems with programs written in languages like Python or with scripts in PowerShell or Bash. This skill is what lets people truly unlock the power of computers.

So it was that I was faced with a boring task. I had purchased an archive of issues of a popular computer magazine. All of its previous issues were contained as html pages, one for every page of every issue of the magazine. But I did not want html pages, I wanted PDFs, and only one for every issue.

Bash scripting (and some Open Source Software) to the rescue. Using a command-line tool called wkhtmltopdf, I was able to create a script that turned every html page into a PDF, spitting out a file for every issue (this was facilitated in part by the file structure on the DVD).

This script completed its task in about a minute. There is no telling how long this would have taken using a GUI. Yes some time was taken up finding the tool and writing the script, but that helped build resources and skills that can be used again in the future. Time spent clicking in the GUI would not have done that.

I’m not saying writing a script like this is always the right way to solve a problem, though I believe that is often (not always) the case. What I am saying is the sense of satisfaction gained by solving a problem this way is well worth the effort.

Below is a shot of the script I wrote.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s