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

astrocite-ris

v0.16.4

Published

Parser and AST for converting RIS to CSL JSON

Downloads

461

Readme

astrocite-ris

An AST and parser for parsing RIS files to CSL JSON.

See astrocite for more details.

API

astrociteRIS.parse(ris)

ris

Type: String

Raw RIS to be parsed to CSL JSON

astrociteBibtex.AST(ris)

ris

Type: String

Raw RIS to be parsed to an AST

Usage

import { parse } from 'astrocite-ris';
const cslJson = parse(`
TY  - ICOMM
T1  - Some Blog Title
A1  - Doe, John
Y1  - 2015///
UR  - https://google.com
ER  -
`);
// cslJson is now valid CSL JSON

Schema

The full schema specification can be found here.

Example

Input

TY  - ICOMM
T1  - The Final Nail in Early Goal Directed Therapy’s Coffin?
A1  - Allen-Dicker, Joshua
Y1  - 2015///
JF  - Now @ NEJM
UR  - http://blogs.nejm.org/now/index.php/the-final-nail-in-early-goal-directed-therapys-coffin/2015/03/24/
ER  -
TY  - ICOMM
T1  - The ProMISe Study: EGDT RIP?
A1  - Body, Rick
Y1  - 2015///
Y2  - 2016///
JF  - St. Emlyn's website
UR  - http://stemlynsblog.org/the-promise-study-egdt-rip/; http://blogs.nejm.org/now/index.php/the-final-nail-in-early-goal-directed-therapys-coffin/2015/03/24/
ER  -
TY  - ICOMM
T1  - NephMadness 2015: ProCESS ARISE ProMISe and the promise of Early Goal Directed Therapy
A1  - Boka, Kamran
Y1  - 2015///
JF  - AJKD blog
UR  - http://ajkdblog.org/2015/03/18/nephmadness-2015-process-arise-promise-and-the-promise-of-early-goal-directed-therapy/
ER  -

Output

{
   "kind": "File",
   "loc": {
      "start": {
         "offset": 0,
         "line": 1,
         "column": 1
      },
      "end": {
         "offset": 814,
         "line": 22,
         "column": 6
      }
   },
   "children": [
      {
         "kind": "Entry",
         "loc": {
            "start": {
               "offset": 0,
               "line": 1,
               "column": 1
            },
            "end": {
               "offset": 246,
               "line": 8,
               "column": 1
            }
         },
         "type": "ICOMM",
         "properties": [
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 12,
                     "line": 2,
                     "column": 1
                  },
                  "end": {
                     "offset": 74,
                     "line": 3,
                     "column": 1
                  }
               },
               "key": "T1",
               "value": "The Final Nail in Early Goal Directed Therapy’s Coffin?"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 74,
                     "line": 3,
                     "column": 1
                  },
                  "end": {
                     "offset": 101,
                     "line": 4,
                     "column": 1
                  }
               },
               "key": "A1",
               "value": "Allen-Dicker, Joshua"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 101,
                     "line": 4,
                     "column": 1
                  },
                  "end": {
                     "offset": 115,
                     "line": 5,
                     "column": 1
                  }
               },
               "key": "Y1",
               "value": "2015///"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 115,
                     "line": 5,
                     "column": 1
                  },
                  "end": {
                     "offset": 132,
                     "line": 6,
                     "column": 1
                  }
               },
               "key": "JF",
               "value": "Now @ NEJM"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 132,
                     "line": 6,
                     "column": 1
                  },
                  "end": {
                     "offset": 240,
                     "line": 7,
                     "column": 1
                  }
               },
               "key": "UR",
               "value": "http://blogs.nejm.org/now/index.php/the-final-nail-in-early-goal-directed-therapys-coffin/2015/03/24/"
            }
         ]
      },
      {
         "kind": "Entry",
         "loc": {
            "start": {
               "offset": 246,
               "line": 8,
               "column": 1
            },
            "end": {
               "offset": 531,
               "line": 16,
               "column": 1
            }
         },
         "type": "ICOMM",
         "properties": [
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 258,
                     "line": 9,
                     "column": 1
                  },
                  "end": {
                     "offset": 293,
                     "line": 10,
                     "column": 1
                  }
               },
               "key": "T1",
               "value": "The ProMISe Study: EGDT RIP?"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 293,
                     "line": 10,
                     "column": 1
                  },
                  "end": {
                     "offset": 310,
                     "line": 11,
                     "column": 1
                  }
               },
               "key": "A1",
               "value": "Body, Rick"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 310,
                     "line": 11,
                     "column": 1
                  },
                  "end": {
                     "offset": 324,
                     "line": 12,
                     "column": 1
                  }
               },
               "key": "Y1",
               "value": "2015///"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 324,
                     "line": 12,
                     "column": 1
                  },
                  "end": {
                     "offset": 338,
                     "line": 13,
                     "column": 1
                  }
               },
               "key": "Y2",
               "value": "2016///"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 338,
                     "line": 13,
                     "column": 1
                  },
                  "end": {
                     "offset": 364,
                     "line": 14,
                     "column": 1
                  }
               },
               "key": "JF",
               "value": "St. Emlyn's website"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 364,
                     "line": 14,
                     "column": 1
                  },
                  "end": {
                     "offset": 525,
                     "line": 15,
                     "column": 1
                  }
               },
               "key": "UR",
               "value": "http://stemlynsblog.org/the-promise-study-egdt-rip/; http://blogs.nejm.org/now/index.php/the-final-nail-in-early-goal-directed-therapys-coffin/2015/03/24/"
            }
         ]
      },
      {
         "kind": "Entry",
         "loc": {
            "start": {
               "offset": 531,
               "line": 16,
               "column": 1
            },
            "end": {
               "offset": 814,
               "line": 22,
               "column": 6
            }
         },
         "type": "ICOMM",
         "properties": [
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 543,
                     "line": 17,
                     "column": 1
                  },
                  "end": {
                     "offset": 636,
                     "line": 18,
                     "column": 1
                  }
               },
               "key": "T1",
               "value": "NephMadness 2015: ProCESS ARISE ProMISe and the promise of Early Goal Directed Therapy"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 636,
                     "line": 18,
                     "column": 1
                  },
                  "end": {
                     "offset": 655,
                     "line": 19,
                     "column": 1
                  }
               },
               "key": "A1",
               "value": "Boka, Kamran"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 655,
                     "line": 19,
                     "column": 1
                  },
                  "end": {
                     "offset": 669,
                     "line": 20,
                     "column": 1
                  }
               },
               "key": "Y1",
               "value": "2015///"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 669,
                     "line": 20,
                     "column": 1
                  },
                  "end": {
                     "offset": 685,
                     "line": 21,
                     "column": 1
                  }
               },
               "key": "JF",
               "value": "AJKD blog"
            },
            {
               "type": "Property",
               "loc": {
                  "start": {
                     "offset": 685,
                     "line": 21,
                     "column": 1
                  },
                  "end": {
                     "offset": 809,
                     "line": 22,
                     "column": 1
                  }
               },
               "key": "UR",
               "value": "http://ajkdblog.org/2015/03/18/nephmadness-2015-process-arise-promise-and-the-promise-of-early-goal-directed-therapy/"
            }
         ]
      }
   ]
}