Giter VIP home page Giter VIP logo

ipfs-paste's Introduction

ipfs-paste - paste to ipfs

Paste stuff to IPFS.

  1. ipfs add stdin (or clipboard with --paste)
  2. print + copy url to the HTTP gateway
  3. prefetch on the gateway

(note: Today, clipboard only on {OSX, Linux}. Tomorrow, cross platform).

Install

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

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

Note: requires running IPFS daemon.

Usage

> ipfs-paste -h
ipfs-paste [-v] [--paste] [<name>]
publish stdin (or pasteboard) to ipfs

Examples

# stdin to ipfs
> echo hello mars | ipfs-paste
http://gateway.ipfs.io/ipfs/QmZd56pN6zKvFrqp3ojRHHJQ2x2NWKTLmsEQbni37cDgvx/paste

# clipboard to ipfs
> echo hello mars | pbcopy
> pbpaste
hello mars
> ipfs-paste --paste
http://gateway.ipfs.io/ipfs/QmV3pQbmx9ziGt4r7i6wyJuSg7hovT6Znxo9PAEoo6M8qB/paste

# set a name to file
> head -c 1024 /dev/random | ipfs-paste rand-kb
http://gateway.ipfs.io/ipfs/QmctPRXHkmoQfZSKExNvcpPS7g1BQciarzWVM7QYdzS6eJ/rand-kb

# verbose
> cat ipfs-paste | ipfs-paste -v
stdin to ipfs... QmbSV3f1T5qbdfxfhSgrudRSv3YiJBxKFGthPAEDZVEhpj
constructing dir... QmYXNKmW7vyvpcTEtAUXGjJ8X9wmh1BgqmZLutFQYLhUev
copying url to clipboard... copied
http://gateway.ipfs.io/ipfs/QmYXNKmW7vyvpcTEtAUXGjJ8X9wmh1BgqmZLutFQYLhUev/paste
preloading on the gateways... ok

ipfs-paste's People

Contributors

chriscool avatar jbenet avatar hackergrrl avatar

Watchers

James Cloos 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.