Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Hayagriva use CSL internally? #132

Open
retorquere opened this issue Jan 26, 2024 · 4 comments
Open

Does Hayagriva use CSL internally? #132

retorquere opened this issue Jan 26, 2024 · 4 comments

Comments

@retorquere
Copy link

It looks like Hayagriva uses CSL styles, does that mean it uses CSL as its internal model, and is the yaml format then just syntactic sugar over CSL (since CSL styles won't be able to use anything but what's expressible in CSL)?

I have a user request for Hayagriva YAML support for Zotero, but if Hayagriva uses CSL internally, it seems more productive to have it also accept CSL as a input format, rather than the conversion pipeline Zotero -> CSL -> Hayagriva -> CSL.

@laurmaedje
Copy link
Member

The data model is independent, but the formatting is dependant. Supporting CSL as input would be feasible for hayagriva.

@retorquere
Copy link
Author

Right, I understand the data model can be independent, but no styles from https://citationstyles.org/ will know what to do with data that cannot be expressed in CSL fields; if that is true there wouldn't be much use in adding non-CSL-conforming data.

@janosh
Copy link
Sponsor

janosh commented Feb 11, 2024

not sure if this was clear to others from this thread (wasn't to me) so I just tried to read a YAML file created by zotero-better-bibtex CSL Better YAML export. doesn't work:

error: failed to parse YAML (references: invalid type: sequence, expected struct NakedEntry at line 3 column 1)
78 │ bibliography("refs.yaml")

@retorquere
Copy link
Author

retorquere commented Feb 11, 2024

The yaml formats aren't the same, they express the same information but in very different ways. The way it seems to me, hayagriva is essentially a preprocessor for CSL-JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants