Python modules required: Pillow, requests
sudo pip install Pillow requests
Fetch comics 150 through 170:
python xkcd_downloader.py -r 150 170
Specify output directory (default: './'):
python xkcd_downloader.py -o images
Fetch the most recent strip:
python xkcd_downloader.py 0
Fetch comic 188:
python xkcd_downloader.py 188
Fetch comics 188, 200, and 350:
python xkcd_downloader.py 188 200 350
Fetch only the image:
python xkcd_downloader.py -d 188
Fetch all comics:
python xkcd_downloader.py -a
Fetch all comics (images-only):
python xkcd_downloader.py -ad
Fetch a random comic:
python xkcd_downloader.py --random
python xkcd_downloader.py --random -d
Fetch 5 random comics:
python xkcd_downloader.py --random 5
python xkcd_downloader.py --random 5 -d
Fetch comics and add them to a specific directory (ex: pictures):
python xkcd_downloader.py -o /user/username/pictures
Title font size, alt text font size, and line offset can be changed through the variables in the top of the script. By default, the script looks for the TTF font file 'xkcd.ttf' located in the script directory.