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

porygonz

v0.3.1

Published

IRC/XMPP bot that works

Downloads

15

Readme

PorygonZ

Build Status

The simple IRC bot that sort of works. It contains an IRC server support, but can be used without IRC (as REPL). It's very configurable by using plugins, and you can even decide whatever command name is used by the plugin.

Plugins available

  • randomness
    • coin - throws a coin, while using random.org
  • help
    • help - allows you to read list of commands, and help for the command. You can overwrite the help, by changing the help property of the object.
  • math
    • math - uses matheval to solve mathematical problem. Takes three configuration arguments, hex, binary, and octal. Those decide whatever the calculator shows the results in other bases.
  • version
    • version - shows pointless version information. Yep.

Installation

If you want to use the stable version, use standard npm install command.

npm install PorygonZ

If you want to use development version, just clone the repository using npm. Following command should be able to install PorygonZ.

npm install git://github.com/GlitchMr/PorygonZ.git

You will need to write some code to load plugins of IRC bot, and its servers. The source code already contains one, available in the porygonz.litcoffee.sample file. You are encouraged to copy it to some other file ending with .litcoffee.

The config file can be put almost anywhere - all it does it running actual code that was installed by npm install command. It's sort of bootstrap, I would say.

Because the configuration file is written in CoffeeScript, you should be aware that it cares about indentation. It's also sort of complex, but it also gives lots of flexibility. If you feel like, you can even monkey punch things while using CoffeeScript syntax. You generally shouldn't have to, but sometimes it's needed. Generally, the configuration file has two things you would have to change.

Plugins

The first would be list of plugins, and the second would be the list of containers. By default, PorygonZ contains list of plugins containing one plugin.

{version} = require 'PorygonZ/plugins/version'

plugins =
  version: version()

This imports the plugin file PorygonZ/plugins/version, and imports the function from it called version. Every plugin is a function you should call to get the function. The reason why you have to call it, is that the plugin can be configured. version doesn't have any sort of configuration, but some plugins, like math can have it.

The plugins array contains the list of commands and the plugins mapped to it. If you would like that version be called like ver, you could add ver: version().

Servers

The second would be list of servers. By default, this bot joins #botters-test on Freenode, and enables REPL. Adding the new servers would be simply adding new entries that follow the pattern. The list of the channels is array, separated by commas.

The prefix is regular expression. It has to be at beginning of the message, otherwise bot won't listen. It uses the regular expressions syntax. To learn more about them, check out [regular-expressions.info] (http://www.regular-expressions.info/). It contains a short tutorial for regular expressions.

If you still cannot survive regular expressions, you can put string here. It's less flexible, but it works. Mostly.

Running

You need to have CoffeeScript installed globally. After doing that, you can do just.

coffee porygonz.litcoffee