Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hackergrrl/osm-p2p-diff

Generate a diff of OSM documents in two osm-p2p-db instances.
https://github.com/hackergrrl/osm-p2p-diff

Last synced: 1 day ago
JSON representation

Generate a diff of OSM documents in two osm-p2p-db instances.

Awesome Lists containing this project

README

        

# osm-p2p-diff

> Generate a diff of OSM documents in two osm-p2p-db instances.

Writes, to standard out, all of the OSM documents that appear in the second DB
that don't appear in the first, as newline-delimited JSON.

Can be used in conjunction with
[osm-p2p-append](https://github.com/noffle/osm-p2p-append) to merge two
osm-p2p-db databases together.

## CLI

```
USAGE: osm-p2p-diff
```

Point this at two [hyperlog](https://github.com/mafintosh/hyperlog) leveldb
directories. If you're working with an osm-p2p-db, this will be `osm-dir/log`.

To perform a merge between two `osm-p2p-db`s, combine with `osm-p2p-diff`:

```
$ osm-p2p-diff osm1/log osm2/log > diff
$ osm-p2p-append osm1 < diff
```

## API

```js
var diff = require('osm-p2p-diff')
```

### var readable = diff(log1, log2)

Accepts two hyperlog instances of two `osm-p2p-db`s. Returns a Readable stream
of newline-delimited JSON containing the documents that are in `log2` but not
`log1`.

## Install

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

```
$ npm install -g osm-p2p-diff
```

## See Also

- [osm-p2p-append](https://github.com/noffle/osm-p2p-append)

## License

ISC