wayback

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

README

Wayback

wabarc/wayback is a tool that supports running as a command-line tool and docker container, purpose to snapshot webpage to time capsules.

Prerequisites

  • Golang
  • Telegram bot
  • Telegram channel (optional)

Installation

$ go get -u github.com/wabarc/wayback

Usage

  1. Running the command-line or Docker container.
  2. Start a chat with the bot and Send URL.
Command line
$ wayback -h
A CLI tool for wayback webpages.

Usage:
  wayback [flags]
  wayback [command]

Available Commands:
  help        Help about any command
  telegram    A CLI tool for wayback webpages on Telegram bot.

Flags:
  -h, --help          help for wayback
      --host string   IPFS daemon host. (default "127.0.0.1")
      --port uint     IPFS daemon port. (default 5001)
      --tor           Saving webpage use tor proxy.

Use "wayback [command] --help" for more information about a command.

$ wayback telegram -t YOUR-BOT-TOKEN

Publish message to your Telegram channel at the same time:

$ wayback telegram
A CLI tool for wayback webpages on Telegram bot.

Usage:
  wayback telegram [flags]

Flags:
  -c, --chatid string   Channel ID. default: ""
  -d, --debug           Enable debug mode. default: false
  -h, --help            help for telegram
  -t, --token string    Telegram bot API Token, required.

$ wayback telegram -t YOUR-BOT-TOKEN -c YOUR-CHANNEL-USERNAME

Also can run with debug mode:

$ wayback telegram -t YOUR-BOT-TOKEN -d
Docker/Podman
$ docker pull wabarc/wayback
$ docker run -d wabarc/wayback telegram -t YOUR-BOT-TOKEN # without telegram channel
$ docker run -d wabarc/wayback telegram -t YOUR-BOT-TOKEN -c YOUR-CHANNEL-USERNAME # with telegram channel

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Token  string
	ChatID string
	Debug  bool
	IPFS   *IPFS
}

func NewConfig

func NewConfig(token string, debug bool, chatid string, ipfs *IPFS) *Config

func (*Config) Telegram

func (cfg *Config) Telegram()

type IPFS added in v0.0.2

type IPFS struct {
	Host   string
	Port   uint
	UseTor bool
}

type Message

type Message struct {
	Archiver []string
	URL      []map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL