Skip to content

Instantly share code, notes, and snippets.

@jerrykan
Created February 7, 2014 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerrykan/8857054 to your computer and use it in GitHub Desktop.
Save jerrykan/8857054 to your computer and use it in GitHub Desktop.
#!/bin/bash
RECIPE="$(dirname $0)/lwn_weekly.recipe"
OUTPUT="/tmp/LWN.net Weekly Edition [$(date +'%a, %d %b %Y')].mobi"
if [[ -z $LWN_USERNAME ]]; then
read -p "LWN Username: " LWN_USERNAME
fi
if [[ -z $LWN_PASSWORD ]]; then
read -s -p "LWN Password: " LWN_PASSWORD
fi
ebook-convert "$RECIPE" "$OUTPUT" \
--series "LWN.net" \
--username "$LWN_USERNAME" \
--password "$LWN_PASSWORD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment