There's an old saying, "anything worth doing, is worth automating"—or something like that. Downloading and reading Linux Journal always has been worth doing, and now you can automate it with our new autolj script, which you can get here.
Follow these few simple steps, and you can be downloading the PDF (or the .epub or the .mobi file) with the greatest of ease each month:
1) First download the script and save it somewhere; ~/bin is a good choice. You can name it whatever you like; it doesn't need to be called autolj.sh.
2) Open a terminal/shell and execute the following commands:
$ chmod +x ~/bin/autolj.sh $ ~/bin/autolj.sh --init Enter the email and zip/postal code associated with your Linux Journal subscription EMail: email@example.com # Enter your email address Zip : 88888 # Enter your zip/postal code Creating initial config file. Change your preferences in '/home/YOU/.config/autolj.cfg'. Sample crontab configuration is in '/home/YOU/.config/autolj.crontab'.
If you want to run the script from cron automatically each month, you can do this:
$ cp /home/YOU/.config/autolj.crontab mycrontab $ crontab -l >>mycrontab $ crontab
When you first run the script, use the
option to initialize the configuration file for the script.
It will prompt for the email and zip/postal code associated with
your Linux Journal subscription.
It saves that information in a file named ~/.config/autolj.cfg (if you saved the script with a different name, the base name of the config file will match the name that you saved the script under).
You can edit the configuration file with any text editor that you have
on hand, or you can rerun the script with the
option to re-create
the config file (any existing changes that you've made will be lost).
The config file is a bash script that is sourced by the autolj script, so maintain valid bash syntax in the file. The config file contains a few other options that you may also want to change (the default value for each is shown):