-
-
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
Fix issue #12000: Parsing arXiv Id when importing a PDF with arXiv Id #12079
Open
XYZ567AB
wants to merge
9
commits into
JabRef:main
Choose a base branch
from
XYZ567AB:12000-fetch-arxiv-info-from-pdf
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+59
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
19dcb44
1. Add 'ARXIVID' field to 'StandardField' enum class
Simon7878912 36107f6
Merge branch 'JabRef:main' into 12000-fetch-arxiv-info-from-pdf
XYZ567AB 5d04b96
Merge branch 'main' into 12000-fetch-arxiv-info-from-pdf
XYZ567AB 31e2619
Updated the implementation to use the 'EPRINT' StandardField for arXi…
Simon7878912 d32ee7a
Merge remote-tracking branch 'origin/12000-fetch-arxiv-info-from-pdf'…
Simon7878912 353f44e
Merge branch 'main' into 12000-fetch-arxiv-info-from-pdf
XYZ567AB 478d8be
Since ArxivId is stored in the eprint field, getArxivId has changed a…
Simon7878912 19e62f6
Fix wrong indentation.
Simon7878912 1565cc2
Remove the log in CHANGELOG
Simon7878912 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,4 +123,38 @@ British Journal of Nutrition (2008), 99, 1–11 doi: 10.1017/S0007114507795296 | |
|
||
assertEquals(Optional.of(entry), importer.getEntryFromPDFContent(firstPageContent, "\n")); | ||
} | ||
|
||
@Test | ||
void extractArxivIdFromPage1() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please also use a real arXiv PDF. I think, there is a link to one in the issue? |
||
BibEntry entry = new BibEntry(StandardEntryType.InProceedings) | ||
.withField(StandardField.DOI, "10.1017/S0007114507795296") | ||
.withField(StandardField.AUTHOR, "Review Article") | ||
.withField(StandardField.TITLE, "British Journal of Nutrition (2008), 99, 1–11 doi: 10.1017/S0007114507795296 arXiv:2408.06224v1 q The Authors") | ||
.withField(StandardField.YEAR, "2024") | ||
.withField(StandardField.EPRINT, "2408.06224v1"); | ||
|
||
String firstPageContent = """ | ||
British Journal of Nutrition (2008), 99, 1–11 doi: 10.1017/S0007114507795296 arXiv:2408.06224v1 | ||
q The Authors 2024 | ||
|
||
Review Article | ||
|
||
Cocoa and health: a decade of research | ||
|
||
Karen A. Cooper1, Jennifer L. Donovan2, Andrew L. Waterhouse3 and Gary Williamson1* | ||
1Nestlé Research Center, Vers-Chez-les-Blanc, PO Box 44, CH-1000 Lausanne 26, Switzerland | ||
2Department of Psychiatry and Behavioural Sciences, Medical University of South Carolina, Charleston, SC 29425, USA | ||
3Department of Viticulture & Enology, University of California, Davis, CA 95616, USA | ||
|
||
(Received 5 December 2006 – Revised 29 May 2007 – Accepted 31 May 2007) | ||
|
||
Abbreviations: FMD, flow-mediated dilation; NO, nitirc oxide. | ||
|
||
*Corresponding author: Dr Gary Williamson, fax þ41 21 785 8544, email [email protected] | ||
|
||
British Journal of Nutrition | ||
https://doi.org/10.1017/S0007114507795296 Published online by Cambridge University Press"""; | ||
|
||
assertEquals(Optional.of(entry), importer.getEntryFromPDFContent(firstPageContent, "\n")); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No! We have the class org.jabref.model.entry.identifier.ArXivIdentifier use this.