Wayback
wabarc/wayback
is a tool that supports running as a command-line tool and docker container, purpose to snapshot webpage to time capsules.
Installation
$ go get -u github.com/wabarc/wayback/cmd/wayback
Using Snapcraft (on GNU/Linux)
$ sudo snap install wayback
Usage
- Running as CLI command or Docker container
- Running with telegram bot
Command line
$ wayback -h
A CLI tool for wayback webpages.
Usage:
wayback [flags]
Examples:
wayback https://www.wikipedia.org
wayback https://www.fsf.org https://www.eff.org
wayback --ia https://www.fsf.org
wayback --ip https://www.fsf.org
wayback --ia --is -d telegram -t your-telegram-bot-token
WAYBACK_SLOT=pinata WAYBACK_APIKEY=YOUR-PINATA-APIKEY \
WAYBACK_SECRET=YOUR-PINATA-SECRET wayback --ip https://www.fsf.org
Flags:
-c, --chatid string Channel ID. default: ""
-d, --daemon string Run as daemon service.
--debug Enable debug mode. default: false
-h, --help help for wayback
--ia Wayback webpages to Internet Archive.
--ip Wayback webpages to IPFS. (default false)
--ipfs-host string IPFS daemon host, do not require, unless enable ipfs. (default "127.0.0.1")
-m, --ipfs-mode string IPFS mode. (default "pinner")
-p, --ipfs-port uint IPFS daemon port. (default 5001)
--is Wayback webpages to Archive Today.
-t, --token string Telegram bot API Token, required.
--tor Snapshot webpage use tor proxy.
-v, --version version for wayback
Examples
Wayback one or more url to Internet Archive and archive.today:
$ wayback https://www.wikipedia.org
$ wayback https://www.fsf.org https://www.eff.org
Wayback url to Internet Archive or archive.today or IPFS:
// Internet Archive
$ wayback --ia https://www.fsf.org
// archive.today
$ wayback --is https://www.fsf.org
// IPFS
$ wayback --ip https://www.fsf.org
For the IPFS, also can use a specific pinner service:
$ export WAYBACK_SLOT=pinata
$ export WAYBACK_APIKEY=YOUR-PINATA-APIKEY
$ export WAYBACK_SECRET=YOUR-PINATA-SECRET
$ wayback --ip https://www.fsf.org
// or
$ WAYBACK_SLOT=pinata WAYBACK_APIKEY=YOUR-PINATA-APIKEY \
$ WAYBACK_SECRET=YOUR-PINATA-SECRET wayback --ip https://www.fsf.org
TIP: more details about pinner service.
With telegram bot:
$ wayback --ia --is --ip -d telegram -t your-telegram-bot-token
Publish message to your Telegram channel at the same time:
$ wayback --ia --is --ip -d telegram -t your-telegram-bot-token -c your-telegram-channel-name
Also can run with debug mode:
$ wayback -d telegram -t YOUR-BOT-TOKEN --debug
Docker/Podman
$ docker pull wabarc/wayback
$ docker run -d wabarc/wayback -d telegram -t YOUR-BOT-TOKEN # without telegram channel
$ docker run -d wabarc/wayback -d telegram -t YOUR-BOT-TOKEN -c YOUR-CHANNEL-USERNAME # with telegram channel
Deploy on Heroku
See: wabarc/on-heroku
TODO
Archive.org and Archive.today are currently supported, the next step mind support the followings platform:
Telegram bot
License
Permissive GPL 3.0 license, see the LICENSE file for details.