-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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-meta storage in bib file should be improved (by switching to embedded JSON) #10371
Comments
Sorry I'm new here and I want to work on this issue, I try to break this issue into some small steps, please check if I understand this issue right.
|
Yes
The JSON content itself. Maybe the GSon library is your friend. I made good experiences in the http server part with it.
The place is ´org.jabref.logic.importer.fileformat.BibtexParser#parseJabRefComment`.
The hole
See above. There will be many unit tests for that. |
OK, it is clear now, please assign to me. |
/assign @leaf-soba |
👋 Hey @leaf-soba, thank you for your interest in this issue! 🎉 We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly. In case you encounter failing tests during development, please check our developer FAQs! Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. Happy coding! 🚀 ⏳ Please note, you will be automatically unassigned if the issue isn't closed within 30 days (by 29 November 2024). A maintainer can also add the "📌 Pinned"" label to prevent automatic unassignment. |
Context
While seeing that diff, I thought, something is really wrong:
The semicolon on position 1 indicates that multiple meta data items are can be written into
@Comment
. This was clear to me today (and not in 2016 #960). This would be great as this would minimize the number of@Comment
entries. However, thesaveActions
also use;
as delimiter (position 2).The "feature" of non-merging the meta fields is long time present. See e.g., an old issue report #250.
Thus, a straight-forward merge is most probably not possible.
Code hint: Separation according to
;
is done at org.jabref.logic.importer.util.MetaDataParser#getNextUnitCall for new metadata storage
Single JSON in @comment field
Example:
Content:
Decision outcome: Use "Single JSON in @comment field"
Migration path:
After this is implemented, we can work on #8701
ADR
Single JSON in @comment field
@Comment
element is enoughMultiple JSON
Each preference could have a separate JSON nesting.
BibTeX
Example (From JabRef#232)
old:
new:
normalize_date, action2
) is a custom format.@comment and then nested
JabRef v5.9 (and before) used that format.
JSON at the end of the file
New entries always start with @. Anything outside the “argument” of a “command” starting
with an @ is considered as a comment. This gives an easy way to comment a given entry: just
remove the initial @. As usual when a language allows comments, don’t hesitate to use them so
that you have a clean, ordered, and easy-to-maintain database. Conversely, anything starting
with an @ is considered as being a new entry
The text was updated successfully, but these errors were encountered: