GithubHelp home page GithubHelp logo

http2ipfs's Introduction

http2ipfs - fetch an HTTP url, add it to IPFS

curl stuff to IPFS.

effectively:

curl $url | ipfs add
  1. fetch a url
  2. ipfs add
  3. print url to the HTTP gateway
  4. prefetch on the gateway

(note: no clipboard yet-- need a shell package manager)

Install

# install from ipfs
ipfs cat QmQdZK1zzaZgDMd2XgJZPC7mehDqafB9zRAcnM7GgRZgsj >/usr/local/bin/ipfs-paste
chmod +x /usr/local/bin/ipfs-paste

# install from git
git clone https://github.com/jbenet/http2ipfs
cd http2ipfs
./install.sh

# install from http
curl -s https://github.com/jbenet/http2ipfs/blob/master/http2ipfs >/usr/local/bin/http2ipfs
chmod +x /usr/local/bin/ipfs-paste

Note: requires running IPFS daemon.

Usage

> http2ipfs -h
http2ipfs [-v] <HTTP-URL> [<name>]
republish http URL to ipfs

Examples

# url to ipfs
> http2ipfs http://i.imgur.com/Nye85xd.jpg
http://gateway.ipfs.io/ipfs/QmPKKzi5bUpLo5QHe2BaVq1SFNmosiAq4aedF15yFVJu2w/Nye85xd.jpg

# set a name to file
> http2ipfs http://i.imgur.com/Nye85xd.jpg aliens.jpg
http://gateway.ipfs.io/ipfs/QmeQK8j66WexBySKPU6DmjX4gTfRT1wMJ144qrzqM36MQv/aliens.jpg

# verbose
> http2ipfs -v http://i.imgur.com/Nye85xd.jpg aliens.jpg
adding to ipfs ... QmYQudmNYQ5qQacZkicQhAAriRGZTR6ws223nRiApghEn7
constructing dir... QmeQK8j66WexBySKPU6DmjX4gTfRT1wMJ144qrzqM36MQv
http://gateway.ipfs.io/ipfs/QmeQK8j66WexBySKPU6DmjX4gTfRT1wMJ144qrzqM36MQv/aliens.jpg
preloading on the gateways... ok

http2ipfs's People

Contributors

jbenet avatar

Stargazers

 avatar Mat Kelly avatar Diego Souza avatar Álvaro Justen avatar Zach avatar Boris Cherny avatar

Watchers

 avatar James Cloos avatar  avatar

http2ipfs's Issues

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.