Skip to content

planetary-social/ssb-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssb-reader

Process batches of SSB messages with promises.

Usage

const ssbReader = require('ssb-reader')

ssbReader({
  name: `vacuum`,
  max: 1000,
  write: (messages) => new Promise((resolve) => {
    console.log(messages)
    resolve()
  })
})

Installation

ssb-reader wants write access to $HOME/.config/ssb-to-pubsub/status.json so it can save the timestamp of the last processed message. This allows it to pick up where it left off after a restart.

Source code

git clone https://github.com/planetary-social/ssb-reader.git
cd ssb-reader

Dependencies

With npm:

npm install

With yarn:

yarn

License

Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published