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

wikicites

v0.0.5

Published

wikicites =========

Downloads

14

Readme

wikicites

wikicites is a module that allows you to get a stream of recent citations out of Wikipedia(s) as JSON. Citations are the foundation of Wikipedia, since editors are strive for verifiability, not truth and citations are what make verification possible. Install

  1. get nodejs
  2. npm install wikicites

Use

CoffeeScript

WikiCites = require('wikicites').WikiCites

w = new WikiCites()
w.listen (citation) ->
  console.log citation

NodeJS

var WikiCites = require('wikicites').WikiCites;

w = new WikiCItes()
w.listen(function(citation) {
  console.log(citation);
});

Data

In these two examples a callback is being passed each citation as it occurs, and it is written to the console. Each citation JavaScript object that will look something like:

{
  "type": "news",
  "last": "Crace",
  "first": "John",
  "title": "David Cesarani: The making of a defiant moderate",
  "url": "http://www.guardian.co.uk/education/2004/oct/12/academicexperts.highereducationprofile?INTCMP=SRCH",
  "accessdate": "19 April 2011",
  "newspaper": "The Guardian",
  "date": "12 October 2004}}",
  "change": {
    "channel": "#en.wikipedia",
    "flag": "",
    "page": "David Cesarani",
    "pageUrl": "http://en.wikipedia.org/wiki/David_Cesarani",
    "url": "http://en.wikipedia.org/w/index.php?diff=567685070&oldid=567623667",
    "delta": 511,
    "comment": "Reverted 1 edit by [[Special:Contributions/Red Stone Arsenal|Red Stone Arsenal]] ([[User talk:Red Stone Arsenal|talk]]): Get consensus for your change, drive by reverts every few months aint that. ([[WP:TW|TW]])",
    "wikipedia": "English Wikipedia",
    "wikipediaUrl": "http://en.wikipedia.org",
    "user": "Nableezy",
    "userUrl": "http://en.wikipedia.org/wiki/User:Nableezy",
    "unpatrolled": false,
    "newPage": false,
    "robot": false,
    "anonymous": false,
    "namespace": "Article"
  }
}

which would represent the following citation:

{{cite news
  |last=Crace
  |first=John
  |title=David Cesarani: The making of a defiant moderate
  |url=http://www.guardian.co.uk/education/2004/oct/12/academicexperts.highereducationprofile?INTCMP=SRCH
  |accessdate=19 April 2011
  |newspaper=The Guardian|date=12 October 2004
}}

You can see that the JSON object also includes information about the change itself, what article it appears in, etc.

License

  • CC0