1995eaton / xkcd_downloader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XKCD Downloader

Python modules required: Pillow, requests

sudo pip install Pillow requests

Example-usage

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

Configuration

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.

About


Languages

Language:Python 100.0%