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

wiki-infobox-parser

v0.1.11

Published

Parser for Wikipedia Infobox.

Downloads

412

Readme

Wikipedia Infobox Parser

build status npm version

A parser for Wikipedia Inforbox, as described in Wikipedia help page:

An infobox is a fixed-format table designed to be added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share and sometimes to improve navigation to other interrelated articles.

Features

It's still on development, it needs to support more markup templates.

  • Get Wikipedia Infobox by keyword
  • Support keyword redirection
  • Convert Wikipedia Markup text to JSON text

Installation

npm install wiki-infobox-parser

Usage

var wikiParser = require('wiki-infobox-parser');

wikiParser('france', function(err, result) {
  if (err) {
		console.error(err.message);
	} else {
		console.log(result);
	}
});

Result

The parsed result is

{
    "name": "Node.js",
    "logo": "frameless",
    "author": "Ryan Dahl",
    "developer": "[https://github.com/ry/node/blob/master/AUTHORS Node.js Developers], Joyent, [https://github.com/joyent/node/graphs/contributors GitHub Contributors]",
    "operating system": "OS X, Linux, Solaris, FreeBSD, OpenBSD, Microsoft Windows (older versions require Cygwin), webOS, NonStop OS",
    "status": "Active",
    "released": "2009/05/27",
    "latest release version": "4.2.1",
    "latest release date": "2015/10/13",
    "programming language": "C, C++, JavaScript",
    "genre": "Event-driven networking",
    "license": "MIT",
    "website": "http://nodejs.org"
}

How to contribute

Todo

  • Support map caption
  • Support link & free link
  • Support picture
  • Support template: {{fake clarify}}
  • Support template: {{fake citation needed}}
  • Support template: {{fake elucidate}}
  • Support template: {{fake heading}}
  • Support template: {{fake notes and references}}
  • Support template: {{dummy ref}}
  • Support template: {{dummy backlink}}
  • Support template: {{dummy footnote}}
  • Support template: {{break}}
  • Support template: {{break|5}}
  • Support template: {{clear}}
  • Support template: {{clear|left}}
  • Support template: {{clear|right}}
  • Support template: {{plainlist}}
  • Support template: {{startflatlist}}
  • Support template: {{flatlist}}
  • Support template: {{hlist|first item|second item|third item|...}}
  • Support template: {{bulleted list |item1 |item2 |...}}
  • Support template: {{pagelist}}
  • Support template: {{nowrap}}
  • Support template: {{italics}}
  • Support template: {{smallcaps|small caps}}
  • Support template: {{pad|4.0em}}

Issue tracker

img

Don't hesitate to contact me when you have any issue or idea about this parser, both PivotalTracker and Github issue are welcomed!

Tests

# Test with a small test cases set
make test

# Test with a full test cases set
# It will take ~2mins, depending on the network
make test-all

Before sending a PR please add corresponding tests, thanks!

Contributors

Reference