https://github.com/orcid/bibtexparsejs
A JavaScript library that parses BibTeX parser.
https://github.com/orcid/bibtexparsejs
Last synced: 10 months ago
JSON representation
A JavaScript library that parses BibTeX parser.
- Host: GitHub
- URL: https://github.com/orcid/bibtexparsejs
- Owner: ORCID
- License: mit
- Created: 2013-09-17T22:42:59.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2023-09-08T12:32:15.000Z (almost 3 years ago)
- Last Synced: 2025-03-30T15:09:13.900Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 639 KB
- Stars: 109
- Watchers: 18
- Forks: 42
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bibtexParseJs
=============
A JavaScript library that parses BibTeX parser. Forked from
[bibtex-parser](https://github.com/mikolalysenko/bibtex-parser).
## Using in Browser
Include bibtexParse.js and call
```
bibtexParse.toJSON('@article{sample1,title={sample title}}');
```
## Using in [Node.js](http://nodejs.org/)
(Note: prior to v0.0.25, bibtex-parser-js was an uncoped package in npm. From v0.0.25 onwards it is published under the @orcid organization.)
Install ```npm install @orcid/bibtex-parse-js```
```
var bibtexParse = require('@orcid/bibtex-parse-js');
var sample = bibtexParse.toJSON('@article{sample1,title={sample title}}');
console.log(sample);
```
**Returns** A parsed bibtex file as a JSON Array Object
```
[ { citationKey: 'SAMPLE1',
entryType: 'ARTICLE',
entryTags: { TITLE: 'sample title' } } ]
```
## Contributing
Contributions are welcome. Please make sure the unit test(test/runTest.js) reflects the
changes and completes successfully.
#### Travis CI
See the latest build and results at [https://travis-ci.org/ORCID/bibtexParseJs](https://travis-ci.org/ORCID/bibtexParseJs)
## Credits
(c) 2010 Henrik Muehe. MIT License
[visit](https://code.google.com/p/bibtex-js/)
CommonJS port maintained by Mikola Lysenko
[visit](https://github.com/mikolalysenko/bibtex-parser)