Giter Site home page Giter Site logo

wabarc / wbipfs Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 9.72 MB

A command-line tool and Go package interface for wayback webpage to IPFS

License: GNU General Public License v3.0

Go 91.77% Makefile 8.23%
ipfs wayback archive anticensorship no-more-404 memento golang

wbipfs's Introduction

A Golang and Command-Line Interface to IPFS

This package has been migrated to rivet.

This package is a command-line tool named wbipfs saving webpage to IPFS. It also supports imports as a Golang package for a programmatic. Please report all bugs and issues on Github.

Installation

$ go get -u -v github.com/wabarc/wbipfs/cmd/wbipfs

Usage

Command-line

$ wbipfs --help
version: 0.1.0
date: 2020/09/19

Usage of wbipfs:
  -host string
        IPFS host (default "127.0.0.1")
  -mode string
        IPFS running mode supports daemon and pinner, daemon requires to run an ipfs standalone daemon. (default "pinner")
  -port uint
        IPFS port (default 5001)
  -tor
        Wayback webpage with Tor proxy, it requires tor executable
$ wbipfs https://www.google.com https://www.bbc.com

Output:
version: 0.1.0
date: 2020/09/19

https://www.google.com => https://ipfs.io/ipfs/QmSGvyuAGiwQHTeAzYEhfhhZbhvyCN6PX1kCq3vgwmkPmU
https://www.bbc.com => https://ipfs.io/ipfs/QmXvUs1ic7uPtfxn7iQHfbefzcrrmnSYP8YDE4BU6jEUab

Go package interfaces

package main

import (
	"fmt"

	"github.com/wabarc/wbipfs"
)

func main() {
        wbrc := &wbipfs.Archiver{}
        links := []string{"https://www.google.com", "https://www.bbc.com"}
        urls, _ := wbrc.Wayback(args)
        for orig, dest := range urls {
                fmt.Println(orig, "=>", dest)
        }
}

// Output:
// https://www.google.com => https://ipfs.io/ipfs/QmSAQ2DYMfRaPgnoWnAgyBYhJXEV5G4dApeukf6yYbnqyE
// https://www.bbc.com => https://ipfs.io/ipfs/QmUXFPSJEXcXaZB9WthxbkmYWvUw1JCiNYGWDAAr7jd88p

FAQ

Optional to disable JavaScript for some URI?

If you prefer to disable JavaScript on saving webpage, you could add environmental variables DISABLEJS_URIS and set the values with the following formats:

export DISABLEJS_URIS=wikipedia.org|eff.org/tags

It will disable JavaScript for domain of the wikipedia.org and path of the eff.org/tags if matching it.

Credits

License

This software is released under the terms of the GNU General Public License v3.0, see the LICENSE file for details.

wbipfs's People

Contributors

dependabot[bot] avatar waybackarchiver avatar web-flow avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.