ORCID / bibtexParseJs

A JavaScript library that parses BibTeX parser.
MIT License
107 stars 39 forks source link

Thinking about sending a PR. Want to make sure the idea is welcomed before spending time on it. #13

Closed dsifford closed 7 years ago

dsifford commented 7 years ago

Hi there. Thanks for your work on this.

I think I may start using this project with my wordpress reference manager project that I've been working on called Academic Blogger's Toolkit.

This project seems to do its job nicely, but with one little annoyance; the author field is not formatted in CSL JSON.

Would that be something that you'd be interested in changing?

If you're not familiar, the CSL JSON author field is an array of Person typed objects, where Person has the following shape:

interface Person {
    family?: string;
    given?: string;
    'dropping-particle'?: string;
    'non-dropping-particle'?: string;
    suffix?: string;
    'comma-suffix'?: string|number|boolean;
    'static-ordering'?: string|number|boolean;
    literal?: string;
    'parse-names'?: string|number|boolean;
}

Let me know! 👍

rcpeters commented 7 years ago

Parsing bibtex "author" to CSL JSON author seems fraught with errors when we consider international names. Sorry.

dsifford commented 7 years ago

@rcpeters How do you go about it internally? I imagine you all use this library somewhere, correct?

A long string of "and"s doesn't seem like it would be very useful. Am I missing some important detail?

Thanks for the clarification.

rcpeters commented 7 years ago

Author[bibtex] = Author[json] no parsing of the value author. We only use this lib to display bibtex as html.

dsifford commented 7 years ago

@rcpeters fair enough! Thanks again for the clarification 😄

If you have any suggestion on how to best handle import and conversion of bibtex to CSL JSON, I'm all ears! I'll be using this library with the CSL author hack in the meantime.

johanneswilm commented 7 years ago

@dsifford checkout https://github.com/fiduswriter/biblatex-csl-converter/