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

pigeons

v0.2.7

Published

i can haz timetables

Downloads

4

Readme

Pigeons

Pigeons are flying (web)rats which live in every major city. Their job is to watch closely every bus stop (or tram stop for that matter) and report back any changes in timetables to the headquarter.

Features

  • Compatibility with every major public transport company's website in Poland.
  • It's live on my server. Visit http://api.bagate.la/_utils to access all the data pigeons have been gathering for some time now.

Installation

$ npm install pigeons

Testing

$ node specs.js

Usage

To get data from any source:

var Pigeons = require('pigeons'),
    config = { ... }; // See Configuration section below

new Pigeons(config, function(){
  // This function is called after logs database has been created.
  this.getAll(function(){
    // This function is called after all timetables have been
    // downloaded, parsed and saved to the database.
  });
});

There is also a couchapp which displays logs. Works only if you enable logging to couchdb. To generate couchapp type:

$ couchapp push couch/app.js http://localhost:5984/pigeons

Since it uses couchapp module, you might have to install it (npm install couchapp).

Configuration

In order to read any type of timetables from almost any source, you need to provide a few lines of configuration. That is CSS selectors of some key elements on pages we will traverse. Visit https://gist.github.com/887597 to see some examples.

CAUTION

API might change in the future.

Want some more?

Check out Bagatela - Polish public transport RESTful search API.

License

Copyright (c) 2010 Stanisław Wasiutyński

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.