mattmakai / fullstackpython.com

Full Stack Python source with Pelican, Bootstrap and Markdown.
https://www.fullstackpython.com/
MIT License
2.88k stars 627 forks source link

Add support for argparse #200

Closed huangsam closed 5 years ago

huangsam commented 5 years ago

This pull request was part of the next steps that I intended to make from my blog post. Finally got around to it! It looks like this:

usage: check_urls.py [-h] [-timeout TIMEOUT] [-retries RETRIES]
                     [-threads THREADS]

Check correctness of url links.

optional arguments:
  -h, --help            show this help message and exit
  -timeout TIMEOUT, --url-timeout TIMEOUT
                        Timeout in seconds to wait for url
  -retries RETRIES, --url-retries RETRIES
                        Number of url retries
  -threads THREADS, --num-threads THREADS
                        Number of threads to run with
mattmakai commented 5 years ago

awesome. this script has been super helpful with all of the end-of-year link rot. thanks @huangsam!