# tre-import

> cli tool that reads a double-newline-delimited JSON file containing ssb message content objects and publishes them to an ssb network

Latest version **1.0.2** (published 2020-10-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install tre-import
pnpm add tre-import
yarn add tre-import
bun add tre-import
```

Provides the command `tre-import`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-10-09 |
| First published | 2020-10-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jan Bölsche |
| Maintainers | regular |

## Links

- npm: https://www.npmjs.com/package/tre-import
- Repository: https://github.com/regular/tre-import
- Homepage: https://github.com/regular/tre-import#readme
- Issues: https://github.com/regular/tre-import/issues
- npm.io page: https://npm.io/package/tre-import

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^4.2.0
- [ssb-keys](https://npm.io/package/ssb-keys.md) ^8.0.0
- [pull-file](https://npm.io/package/pull-file.md) ^1.1.0
- [pull-stdio](https://npm.io/package/pull-stdio.md) ^1.0.0
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.6.14
- [pull-json-doubleline](https://npm.io/package/pull-json-doubleline.md) ^2.0.0
- [ssb-zero-conf-client](https://npm.io/package/ssb-zero-conf-client.md) ^1.0.1

## Recent versions

- 1.0.2 (latest) — 2020-10-09
- 1.0.1 — 2020-10-09
- 1.0.0 — 2020-10-09

## README

# tre-import

simple tool to publish messages stored as double-newline-delimited json.
For importing files and more complex features see tre-init/bin/import.js

```
USAGE

  tre-import INPUT_FILE|- [--dryRun] [--config CONFIG] [--help]

DESCRIPTION

  tre-import reads a double-newline-delimited JSON file containing ssb message content objects and publishes them to an ssb network.

  INPUT_FILE           name of the input file or - for stdin
  --dryRun             do not publish any messages and show diagnostic output
  --config CONFIG      path to JSON file with caps.shs, defaults to .trerc (see FILES)
  --help               show help

FILES
  
  If --config CONFIG is not given, tre-import looks for a file named .trerc in the current directory or above. (and other locations, see rc on npm for details)
  That JSON formatted file must have a property called csps.shs (the network key). The network key is used to discover a ssb server on the local network that shares its manifest with us. This usually only is the case, if it uses the same ssb id (e.g. tre server started from the same directory), or our ssb id is authorized by the server to call manifest() (e.g. bay-of-pleny started with --authorize or ssb-server started with our public key in config.master)

  Auto-discovery ony works if the server uses ssb-lan to broadcasts its address. Bay-of-plenty and tre server do this.

EXAMPLE

  cat messages.jsondnld | tre-import - --dryRun

```

---
License: MIT Copyright 2020 Jan Bölsche <jan@lagomorph.de> (https://regular.codes/)

---
_Source: https://npm.io/package/tre-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
