Coder Social home page Coder Social logo

wswfg_archiver's Introduction

"Will Save World for Gold" Archiver

This simple command-line utility downloads the comic images to an archive directory from www.willsaveworldforgold.com.

Installation

Installation takes advantage of the pipx project.

The following will install git and pipx for your system if not installed.

MacOS

If not installed, install homebrew.

$ brew install git pipx
$ pipx ensurepath
Arch Linux based distros
$ pacman -S git python-pipx
$ pipx ensurepath

Note: you need to close and reopen your terminal after pipx ensurepath

Install

The following command will install the utility.

$ pipx install git+https://github.com/amas0/wswfg_archiver.git

Usage

Installation will give you the command line tool wswfg:

$ wswfg -h

usage: wswfg [-h] [-s START_DATE] [-e END_DATE] [--download-all] [--overwrite] output

Downloads the web comic "Will Save World For Gold"

positional arguments:
  output                directory path to store the downloaded comics

optional arguments:
  -h, --help            show this help message and exit
  -s START_DATE, --start-date START_DATE
                        Format: YYYY-MM-DD. Comic date to start archiving, omitting this will pull comics from the past week
  -e END_DATE, --end-date END_DATE
                        Format: YYYY-MM-DD. Comic date to end archiving, omitting this will set today's date at the end
  --download-all        Enable this flag to download the full comic archive starting from 2011/09. This will override start and end date args. Use responsibly to avoid straining the server.
  --overwrite           Overwrite existing archived images.

Basic usage to download all comics from the past 7 days just requires specifying the directory you'd like to save them to:

$ wswfg archive_dir/

Downloading 6 images...done.
Saving 6 to archive_dir...done.

As seen in the help, you can specify the start and end dates to archive:

$ wswfg -s 2020-01-01 -e 2020-01-31 jan_archive/

Downloading 23 images...done.
Saving 23 to jan_archive...done.

For a full archive, you can use the --download-all flag:

$ wswfg --download_all full_archive/

By default, the tool looks in the provided output directory and checks for existing archived images. If found, it will only update newer images than those already found. Passing the --overwrite flag will ignore this behavior.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.