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

Curly braces not removed from the doi field #183

Open
deinal opened this issue Aug 25, 2023 · 0 comments
Open

Curly braces not removed from the doi field #183

deinal opened this issue Aug 25, 2023 · 0 comments
Assignees
Labels

Comments

@deinal
Copy link

deinal commented Aug 25, 2023

Issue Description

The current BibTeX parser fails to remove curly braces { and } from the doi field in the parsed output.

E.g. entry DCTRGAN: Improving the Precision of Generative Models with Reweighting gets the following doi address https://doi.org/%7B10.1088/1748-0221/15/11/p11004 because it has doi with curly braces in HEPML.bib. The %7 character suggests that the first curly brace is not removed.

For entry Jet Energy Calibration with Deep Learning as a Kubeflow Pipeline both opening and closing curly braces are left in the url produced by make_md.py: https://www.doi.org/%7B10.1007/s41781-023-00103-y%7D. The difference as we can see from here is that this entry doesn't have a trailing comma at the end of the line like DCTRGAN does.

Suggested Fix

I believe a fix could be introduced here in the parser code to remove the curly braces from the doi field.

if "{" in myentry_dict["doi"]:
    myentry_dict["doi"] = myentry_dict["doi"][1:]
if "}" in myentry_dict["doi"]:
    myentry_dict["doi"] = myentry_dict["doi"][:-1]

A similar thing is done for the opening bracket in myentry_dict["eprint"] a few lines earlier.

@ramonpeter ramonpeter self-assigned this Aug 29, 2023
@ramonpeter ramonpeter added the fix label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants