-
-
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
Add logic for parsing references from last page of PDF #11156
Conversation
…FromPdfImporter) - Support more date formats - Increase log level for issues for date parsing
src/main/java/org/jabref/logic/importer/fileformat/BibliopgraphyFromPdfImporter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/gui/maintable/ExtractReferencesAction.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/importer/fileformat/BibliopgraphyFromPdfImporter.java
Outdated
Show resolved
Hide resolved
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.
see comments
for (BibEntry importedEntry : result.getDatabase().getEntries()) { | ||
count++; | ||
Optional<String> citationKey = importedEntry.getCitationKey(); | ||
if (citationKey.isPresent()) { |
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.
citationKey.map(cites:add).orElseGet( () ->
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.
Not sure if new code is more readable --> "orElseGet" result needs to be added to the list, too. Uses outer variable "count", which is non final. I needed to wrap in anonymous object.
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.
then better use the original code
// Y. Shimosaki et al., “Lattice design for 5 MeV – 125 mA CW RFQ operation in LIPAc”, in Proc. IPAC’19, Mel- bourne, Australia, May 2019, pp. 977-979. doi:10.18429/ JACoW-IPAC2019-MOPTS051 | ||
int pos = reference.indexOf("doi:"); | ||
if (pos >= 0) { | ||
String doi = reference.substring(pos + 4).trim(); |
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.
Sure that this are always 4 characters?
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.
I am pretty sure that the constant string "doi:" alwas has 4 characters. But in a parallel universe this might change. Thus, I will change to "doi:'.length() later
You should resolve the conflicts in changelog so that the tests are running |
Example: "I. Podadera, J. M. Carmona, A. Ibarra, and J. Molla"
src/main/java/org/jabref/gui/maintable/ExtractReferencesAction.java
Outdated
Show resolved
Hide resolved
This reverts commit 7adb334.
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
A scientific paper has a "References" section. Especially when reviewing papers, it would be nice if all references from there would appear parsed within JabRef. This PR implements that. Thus, this PR implements #10200 via offline parsing (no online services used!), follow-up to #10437.
How to use:
Pre Condition
Steps
Status
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)