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
WikiCites = require('wikicites').WikiCites

w = new WikiCites()
w.listen (citation) ->
  console.log citation
var WikiCites = require('wikicites').WikiCites;

w = new WikiCItes()
w.listen(function(citation) {

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": "",
  "accessdate": "19 April 2011",
  "newspaper": "The Guardian",
  "date": "12 October 2004}}",
  "change": {
    "channel": "#en.wikipedia",
    "flag": "",
    "page": "David Cesarani",
    "pageUrl": "",
    "url": "",
    "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": "",
    "user": "Nableezy",
    "userUrl": "",
    "unpatrolled": false,
    "newPage": false,
    "robot": false,
    "anonymous": false,
    "namespace": "Article"

which would represent the following citation:

{{cite news
  |title=David Cesarani: The making of a defiant moderate
  |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.

  • CC0