Skip to main content

A no-brainer pastebin on IPFS - think distributed http://sprunge.us

Project description

https://img.shields.io/travis/drozdziak1/merkleshare.svg https://img.shields.io/pypi/v/merkleshare.svg

A no-brainer pastebin on IPFS - think distributed http://sprunge.us

Why this if there’s ipfs add?

Good question! ipfs add currently doesn’t support showing a full link, let alone xclip-compatible output - the user has to select the hash, paste it in a browser and manually add the rest of their preferred IPFS link format.

Installation

merkleshare is available through PyPI:

$ pip install merkleshare

But if you want, you can install it directly from the repo:

$ pip install git+https://github.com/drozdziak1/merkleshare

Requirements

In order for MerkleShare to work, you need to bring up a local IPFS node using ipfs daemon.

Usage

A typical stdin pipe situation:

$ echo "Hello, world" | mersh -t gateway
https://ipfs.io/ipfs/QmaMLRsvmDRCezZe2iebcKWtEzKNjBaQfwcu7mcpdm8eY2

How about some file input?

$ echo "Hello, friends." > file.txt
$ mersh file.txt
/ipfs/QmZRyLRgWiXN2Zks6rjH5jPYQzbWj3BYTWERa9m7QQc3kW

Or maybe you only need the hash? No problem:

$ echo "Rollin' with the hash\!" | mersh -t hash
QmWjZ4dF4brEPqjtWx2EqZbeAmcpHiCVkhAxJyi51TPJzh

Got security needs? You’ll be happy to know that MerkleShare supports Fernet encryption (via the cryptography module):

$ echo "Lizard people live at the edge of flat earth" | mersh -e
/ipfs/QmcXM8gCqeJA2qjnVmFYkFFc2sMjDvT21p8UwGBwzWxva8/#fT7jn4eDJLgHcM3wva4KS4eUMyJ19zuxRJhy5Lp5xwZsVzA4Q6AzoEEEZxUt
                                                     # `----------------------------------------------------------'
                                                     #        Your data is guarded by a disposable secret

It’s not possible to reach your data without the secret, which is only present in the link…

$ ipfs cat /ipfs/QmcXM8gCqeJA2qjnVmFYkFFc2sMjDvT21p8UwGBwzWxva8
gAAAAABaAMt-gZCub5HYjOXvGbNZP7GaBDJL1ViYFSX9LiWAZAVLK6_o5I2lO3Bq86yHEvmuq-iI179Ficnzwvxug--9_xKFwfXzmv6NUm9tIFf64ukMETuwhWKJJJh9ytmsPJZaRPyA

…but if you do have it then retrieving your stuff with MerkleShare becomes about as easy as it gets:

$ mersh -d /ipfs/QmcXM8gCqeJA2qjnVmFYkFFc2sMjDvT21p8UwGBwzWxva8/#fT7jn4eDJLgHcM3wva4KS4eUMyJ19zuxRJhy5Lp5xwZsVzA4Q6AzoEEEZxUt
Lizard people live at the edge of flat Earth

Features

  • Read from stdin or a specified file

  • Only the link gets printed to stdout, everything else is stderr - effortlessly pipe it to your favourite clipboard manager!

  • Seamless data encryption

  • Output the link in the format you need:

    • Regular: /ipfs/<hash>

    • Gateway: https://ipfs.io/ipfs/<hash> - great for sharing links with non-IPFS friends

    • Local: http://localhost:8080/ipfs/<hash>

    • Bare: <hash>

  • Optional static WebUI (Enabled with the -g flag)

Planned Features

  • Built-in clipboard support

  • Pure Python IPFS backend (once py-ipfs is ready)

  • Binary blob support for WebUI uploads

History

MerkleShare started as an attempt to make IPFS more convenient and let the user securely share whatever they need.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

merkleshare-0.4.4-py2.py3-none-any.whl (117.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file merkleshare-0.4.4-py2.py3-none-any.whl.

File metadata

  • Download URL: merkleshare-0.4.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 117.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for merkleshare-0.4.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1e8dbec381886f4717ee8537dd23fd3c63159ee22706d55abe18b767d2690fbf
MD5 92de041fa15bc8c68f093c5d56acc5b4
BLAKE2b-256 0b7a41cd2c68accbf51c655b11ca7187d5700bc004b946543268eb7320849c4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page