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

Fix AuthorListParser#parse for two authors with comma #8694

Closed
wants to merge 1 commit into from

Conversation

koppor
Copy link
Member

@koppor koppor commented Apr 18, 2022

While reading #8652, I found that ebook.de returns an "OKish" BibTeX:

https://www.ebook.de/de/tools/isbn2bibtex?isbn=9783110702125

@book{9783110702125,
  Author = {Hans-Joachim Habermann, Frank Leymann},
  Title = {Repository},
  Publisher = {Gruyter, Walter de GmbH},
  Year = {2020},
  Date = {2020-10-12},
  PageTotal = {294 Seiten},
  EAN = {9783110702125},
  URL = {https://www.ebook.de/de/product/41373251/hans_joachim_habermann_frank_leymann_repository.html}
}

We convert that to "good" BibTeX by using https://github.com/JabRef/jabref/blob/main/src/main/java/org/jabref/logic/importer/AuthorListParser.java. This code, however, did not work in the special case of two authors. I added a new heuristics for that case and added more test cases for that.

In the concrete case, {Hans-Joachim Habermann, Frank Leymann} needs to be converted to {Habermann, Hans-Joachim AND Leymann, Frank}

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.jabref.model.entry.AuthorListTest

Test correctNamesWithOneComma() FAILED

@ThiloteE ThiloteE added component: fetcher [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs labels Apr 20, 2022
@Siedlerchr Siedlerchr added the status: changes required Pull requests that are not yet complete label Apr 25, 2022
@@ -47,6 +47,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where opening the changelog from withing JabRef led to a 404 error [#8563](https://github.com/JabRef/jabref/issues/8563)
- We fixed an issue where not all found unlinked local files were imported correctly due to some race condition. [#8444](https://github.com/JabRef/jabref/issues/8444)
- We fixed an issue where Merge entries dialog exceeds screen boundaries.
- We fixe dan issue where the ISBN fetcher should have returned two authors, but returned only one.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like English with a french accent to my inner voice...

@Siedlerchr
Copy link
Member

I close this for the moment, until we find time to improve the algorithm

@Siedlerchr Siedlerchr closed this May 10, 2022
@koppor koppor deleted the fixAuthorListParser branch December 18, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: fetcher [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs status: changes required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants