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

dblp-json

v1.1.0

Published

A service for parsing DBLP user pages to JSON

Downloads

85

Readme

dblp-json

Build Status

dblp-json is a nodejs package for parsing dblp user pages (dblp.org) to JSON format.

What is dblp?

dblp is a service that provides bibliographic information on major computer science journals and proceedings. dblp is maintained by Schloss Dagstuhl and has been originally founded at the University of Trier in 1993 (dblp is also available at dblp.uni-trier.de). For more information check out their F.A.Q.

How to use dblp-json

dblp-json started from the necessity of accessing dblp data from within node applications.

It has an easy to use API that allows users to request dblp information for published computer science authors/researchers.

Requiring the package

To use dblp-json just require the package like so:

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

// some dblp-json functions called

Using custom parsing options

There is an option for allowing you to set a custom charkey. After creating a new DBLP instance set the charkey value for the parser parser.

Check the example bellow (which actually corresponds to the default options set in dblp-json):

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

dblp.setCharkey('_value');

// some dblp-json functions called

Then you can use the package as explained next.

Requesting data

There are three ways for requesting information from dblp using dblp-json:

  • getByName
  • getByPID
  • getByHomepage

getByName

getByName requires the first and last name of the researcher according to dblp.

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByName('Tiago', 'Brito');
}

extractInfo();

Note: Some researchers may have their surname appended by some numbers to uniquely identify researchers with the same name. For example, if there were two researchers named Tiago Brito, then you could have Tiago Brito_0001 and Tiago Brito_0002.

getByPID

getByPID requires the PID of the researcher according to dblp (e.g. '188/5658').

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByPID('188/5658');
}

extractInfo();

getByHomepage

getByHomepage requires the key of the researcher according to dblp (e.g. 'homepages/188/5658').

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByHomepage('homepages/188/5658');
}

extractInfo();

Parsing information

After requesting the information using the functions above, there are several functions that parse the dblp data:

  • getRawJSON
  • getJSON
  • getPerson
  • getPublications
  • getCoauthors

Parsing options applied

dblp-json leverages xml2js to parse XML data from dblp to JSON format. The parsing options used are as follows:

const options = {
  charkey: '$value',
  mergeAttrs: true,
  explicitArray: false,
};

getRawJSON

getRawJSON returns a JSON object after parsing dblp with xml2js parser (without modification/standardization).

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByName('Tiago', 'Brito');
  console.log(JSON.stringify(tiago_json.getRawJSON(), null, 2));
}

extractInfo();

getJSON

getJSON returns a JSON object after modification.

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByName('Tiago', 'Brito');
  console.log(JSON.stringify(tiago_json.getJSON(), null, 2));
}

extractInfo();

getPerson

getPerson returns a JSON object with personal information about the researcher.

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByName('Tiago', 'Brito');
  console.log(JSON.stringify(tiago_json.getPerson(), null, 2));
}

extractInfo();

getPublications

getPublications returns a JSON object with a list of publications by the researcher.

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByName('Tiago', 'Brito');
  console.log(JSON.stringify(tiago_json.getPublications(), null, 2));
}

extractInfo();

getCoauthors

getCoauthors returns a JSON object with all co-authors of all publications by the researcher.

const DBLP = require('dblp-json/dblp');

const dblp = new DBLP();

async function extractInfo() {
  const tiago_json = await dblp.getByName('Tiago', 'Brito');
  console.log(JSON.stringify(tiago_json.getCoauthors(), null, 2));
}

extractInfo();

Code examples

Within the examples/ folder there are several examples corresponding to the API calls showed here.