Available Downloads

reader
Fetch a URL and pretty-print its XML or JSON, saving the result to a file. (uses only the Python standard library)
python reader.py <url> [-o FILE] [--timeout SECONDS]
<url> — URL of the XML or JSON document to fetch (required)
-o, --output FILE — write the formatted document to FILE; if FILE has no extension, the detected type extension (.xml/.json) is appended
--timeout SECONDS — request timeout in seconds (default: 30)
validate_xml
Validate that an XML file (relative path) is well-formed. Prints an OK message or a clear error with exit status.
python validate_xml.py <path>
<path> — relative path to the XML file to validate (required, no optional params)
validate_json
Validate that a JSON file (relative path) is valid. Prints an OK message or a clear error with line/column and exit status.
python validate_json.py <path>
<path> — relative path to the JSON file to validate (required, no optional params)
scrape_images
Scrape all the images on a web page, download them, and bundle them into a zip archive. (uses only the Python standard library)
python scrape_images.py <url> [-o FILE] [--max N] [--min-bytes N] [--timeout SECONDS]
<url> — URL of the web page to scrape images from (required)
-o, --output FILE — write the zip archive to FILE; if FILE has no extension, .zip is appended
--max N — stop after downloading at most N images (default: no limit)
--min-bytes N — skip any image whose body is smaller than N bytes (default: 0)
--timeout SECONDS — request timeout in seconds (default: 30)