0.0.55 • Published 7 years ago

solidbot v0.0.55

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

Solidbot Logo

npm.io Join the chat at https://gitter.im/solid-live/solidbot NPM Version Stories in Ready

Solidbot

Solidbot is a framework for running different kind of robots as a background daemon

This is a very early working prototype and work in progress

Features

  • It is extensible in a similar way to express handlers
  • It is modular so that many different robots can run in one framework
  • It is highly robust working on the kue framework, to prioritize jobs
  • It is highly scalable using a redis database backend
  • It has a UI front end to monitor jobs
  • It has APIs, via command line, javascript and HTTP REST

Installation

Prerequisite it to install redis database and run that service

npm install solidbot

In the bin directory there is an executable

bin/solidbot.js

Adding a job

There are a number of ways to add a job based on the API of the kue framework

Default bots

A few default bots are included in the package that will be described below

Cmd

Is of type "cmd" will run arbitrary commands in a queue.

  • data.cmd = the command to rune

Crawler

Is of type "crawler" and will crawl given URIs and optionally convert them to linked data

Currently this is implemented as a cmd type module above, but will evolve to pure JS

Inbox

Inbox processing is a job of type "inbox" and follows the W3C LDN Consumer Specification.

An inbox processor can be started using the command

bin/inbox.js

A convenience method is included to ping an inbox (pinbbox)

bin/pingbox.js <uri> [cert]
  • data.uri = the uri of the inbox
  • data.cert = optionally a certificate to use for authentication

The consumer will go the the inbox and display all the items in that inbox.

Further work will be to process inbox items according to their content.

Extending solidbot

Bot extensions are stored in the

lib/bots

Directory.

A bot takes two parameter, a job which is a kue job, and a function done which is called when the job is completed. It is possible to throttle jobs by delaying when done() is called.

New bots are then added to the daemon with the simple line:

    queue.process('crawler', crawler.bots.crawler)

Where crawler here is the name of the job type.

0.0.55

7 years ago

0.0.54

8 years ago

0.0.53

8 years ago

0.0.52

8 years ago

0.0.51

8 years ago

0.0.50

8 years ago

0.0.49

8 years ago

0.0.48

8 years ago

0.0.47

8 years ago

0.0.46

8 years ago

0.0.45

8 years ago

0.0.44

8 years ago

0.0.43

8 years ago

0.0.42

8 years ago

0.0.41

8 years ago

0.0.40

8 years ago

0.0.39

8 years ago

0.0.38

8 years ago

0.0.37

8 years ago

0.0.36

8 years ago

0.0.35

8 years ago

0.0.34

8 years ago

0.0.33

8 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago