-
Notifications
You must be signed in to change notification settings - Fork 11
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
JabRef groups format 4 #79
Comments
We have something like 80-100 lines dealing with the previous format so far. We should probably have an overall strategy -- if you want to move all the jabref parsing into your code, that's fine with me. Or we can keep it all here and then add for other formats. For how long do we need to support different versions of the format? Is the format we currently support version 3? |
Oh please keep the jabref parsing! There's tons of people still using the "old" format; it's available in Jabref as an option, and it really is the superior option. Right now I just let this parser do it's thing, and then I do roughly this to whenever I find a
This could in principle be added after all the refs have been parsed and then you'd have seamless jabref groups 3 and 4 parsing. |
and yes, the format we currently support is 3; the new format doesn't have a version number. |
Ok, why don't we add it here then? Just have one, outdated version seems a bit odd. |
(I call it 4 to distinguish it from 3, but that's a misnomer the JabRef authors wouldn't recognize) |
Version 3 is odd, but version 4 is almost as odd and fundamentally broken on top of that. See the ignored complaints in those two jabref issues. |
I can have a stab at adding the 4 code to the parser, yeah? |
yeah, let me remove it from the main file first |
You don't want my code for this in any case 🙄 It would look roughly like this:
|
Ok, I'm done. It's split into its own file. Precaution in case we end up supporting 15 different group formats. Could you add your code on top of that? |
I've added it on a separate branch, but I'm not happy with it for several reasons:
Can you have a look what I did wrong? I lifted the code to resolve the JR4 groups from BBT and there it does work. |
I have fixed it somewhat. Also, I have split the jabref3 and jabref4 filters as much as possible, just so that it will be as easy as possible to remove one of them in the future, should that be necessary. I am not sure whether the output is what you need. Please feel free to continue working n this until you feel satisfied and then send me a PR. |
It's good as-is, I've submitted a PR. All my tests pass, would love to see an npm update for this. |
Sorry, the version was released a few days ago. |
JabRef version after 3.8.1 have a new groups format; I can't say I'm a fan, but it's there going forward. I've attached a sample file. In the new format:
@comment{jabref-meta: groupsversion:3;}
; instead, there's either@Comment{jabref-meta: databaseType:bibtex;}
(if the DB was in bibtex format) or@Comment{jabref-meta: databaseType:biblatex;}
(if the DB was in biblatex format)groups
field which contains a comma-separated list of group names. References belong to the first group that has that name, regardless of how the groups are nested. More details are here and here. I don't know whether JabRef's assignment is depth-first or breadth-first but the bare fact that this could matter makes the format broken from my POV. Anyhow.I don't really need support for this in the parser as I have a simple workaround I can apply post-parse, but I thought I'd give you a heads-up.
jr381.bib.txt
The text was updated successfully, but these errors were encountered: