npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

solidbot

v0.0.55

Published

solid robot

Downloads

72

Readme

Solidbot Logo

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.