Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #48 from ipfs/feature/standardize-readme
Browse files Browse the repository at this point in the history
Standardize README
  • Loading branch information
dignifiedquire authored Jun 26, 2016
2 parents 4e11dfc + 97b0291 commit 138990f
Showing 1 changed file with 41 additions and 19 deletions.
60 changes: 41 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
IPFS unixFS Engine
===================

> Import & Export data to/from an IPFS [DAG Service][]
# IPFS unixFS Engine

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![Build Status](https://travis-ci.org/ipfs/js-ipfs-unixfs-engine.svg?style=flat-square)](https://travis-ci.org/ipfs/js-ipfs-unixfs-engine)
[![Coverage Status](https://coveralls.io/repos/github/ipfs/js-ipfs-unixfs-engine/badge.svg?branch=master)](https://coveralls.io/github/ipfs/js-ipfs-unixfs-engine?branch=master)
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-unixfs-engine.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs-engine)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)

## Example Importer
> JavaScript implementation of the layout and chunking mechanisms used by IPFS
## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Example Importer](#example-importer)
- [Importer API](#importer-api)
- [const add = new Importer(dag)](#const-add--new-importerdag)
- [Example Exporter](#example-exporter)
- [Exporter: API](#exporter-api)
- [new Exporter(hash, dagService)](#new-exporterhash-dagservice)
- [Contribute](#contribute)
- [License](#license)

## Install

With [npm](https://npmjs.org/) installed, run

```
$ npm install ipfs-unixfs-engine
```

## Usage

### Example Importer

Let's create a little directory to import:
```sh
Expand Down Expand Up @@ -91,13 +115,13 @@ When run, the stat of DAG Node is outputted for each file on data event until th
```

## Importer API
### Importer API

```js
const Importer = require('ipfs-unixfs-engine').importer
```

### const add = new Importer(dag)
#### const add = new Importer(dag)

The importer is a object Transform stream that accepts objects of the form

Expand All @@ -116,7 +140,7 @@ The input's file paths and directory structure will be preserved in the DAG
Nodes.


## Example Exporter
### Example Exporter

```
const ipfsRepo = require('ipfs-repo')
Expand All @@ -139,7 +163,7 @@ exportEvent.on('data', (result) => {
}
```

## Exporter: API
### Exporter: API
```js
const Exporter = require('ipfs-unixfs-engine').exporter
```
Expand All @@ -163,19 +187,17 @@ Errors are received as with a normal stream, by listening on the `'error'` event
to be emitted.


## Install

With [npm](https://npmjs.org/) installed, run
[DAG Service]: https://github.com/vijayee/js-ipfs-merkle-dag/
[UnixFS]: https://github.com/ipfs/specs/tree/master/unixfs

```
$ npm install ipfs-unixfs-engine
```
## Contribute

## License
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs-engine/issues)!

ISC
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)

[DAG Service]: https://github.com/vijayee/js-ipfs-merkle-dag/
[UnixFS]: https://github.com/ipfs/specs/tree/master/unixfs
## License

[MIT](LICENSE)

0 comments on commit 138990f

Please sign in to comment.