xkcd-cli
A simple CLI application to download and display xkcd comics.
Used urfave/cli for the cli magic.
I originally planned to use cobra for this project. However, on the day I started development, a dependency of
cobrawas down (the developer was hosting it on a private server), preventing me from downloading it. So, I started withurfave/cliinstead.
Usage
Display Command
Display the latest comic using your system’s default image viewer:
xkcd-cli display latestDisplay a specific comic by number:
xkcd-cli display 42Display a random comic:
xkcd-cli display randomGet Command
Download the latest comic to the current directory:
xkcd-cli get latestDownload a specific comic:
xkcd-cli get 42Download a random comic:
xkcd-cli get randomInstallation
Prebuilt Binaries
Download the binary for your system in Releases Page
Install via Go
go install github.com/AliGaygisiz/xkcd-cli@latestBuild from Source
git clone https://github.com/AliGaygisiz/xkcd-cli.git
cd xkcd-cli
go build .To install the binary to your $GOPATH/bin:
go install .
