Skip to content

Conversation

@koppor
Copy link
Member

@koppor koppor commented Nov 5, 2025

With the modularization we got "jablib". Now, its time to offer it as "useful" library.

I tried to write some scripts in JBang, but the API of JabRef was less than OKish, so I refactored.

Aim for this PR:

  • Extract references from PDF
  • DOI to BibTeX --> follow-up PR

Additional Changes

IEEE as explicit rule-based parser available

grafik

Mandatory checks

InAnYan
InAnYan previously approved these changes Nov 6, 2025
@koppor koppor enabled auto-merge November 6, 2025 16:47
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 6, 2025
@koppor koppor added the automerge PR is tagged with that label will be merged if workflows are green label Nov 6, 2025
@koppor koppor added this pull request to the merge queue Nov 6, 2025
Merged via the queue into main with commit 0dc6dd7 Nov 6, 2025
52 checks passed
@koppor koppor deleted the add-jablib-examples branch November 6, 2025 22:08
return CitationSplitter.splitCitations(text)
.map(Unchecked.function(this::parsePlainCitation))
.flatMap(Optional::stream)
.collect(Collectors.toList());
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.collect(Collectors.toList());
.toList();

Copy link
Member

Choose a reason for hiding this comment

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

ah, just in time 😁

Copy link
Member Author

Choose a reason for hiding this comment

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

follow-up :)

merlinymy pushed a commit to merlinymy/jabref that referenced this pull request Nov 19, 2025
* Initial framework for jablib-examples

* Rename "serializeAll" to "writeAll"

* Add some `@NonNull` annotations

* Even more consistent

* More renamings

* Add convenience constructor

* Add some nullable annotations

* Add cross-links

* Fix typo

* Fix class name

* Have BibliographyFromPdfImporter implementing PlainCitationParser

* Add "IEEE" as another rule option

* Fix method name (and visibility)

* Compilefix

* Fix casing in BibTeX

* Enable LLM to be used to parse references

* Refine code

- BibliographyFromPdfImporter is also an PdfImporter
- importDatabase returns ParserResult (for consistency)

* Move pdf related importers to pdf sub package

* Initial PdfImporterWithPlainCitationParser

* WIP: ieee_pdf_references_to_bibtex

* Add link to CHANGELOG.md

* Refine PlainCitationParser interface

* Move methods to PdfUtils

* Make LlmPlainCitationParser a real importer

(and fix BibligraphyFromPdfImporter method use)

* Add missing class

* Wire all availble importers

* Rename BibliographyFromPdfImporter to RuleBasedBibliographyPdfImporter

* Introdue intermediate class BibliographyFromPdfImporter

* Fix PdfGrobitImporter (to really extract the references)

* Add comment

* Fix JavaFX graphics dependency in ProgressCounter

* Remove routing method

* Remove obsolete test file

* Add development hint to README.md

* First version of to BibTeX conversion

* Adapt test to new behavior

* Apply format

* Fix NullAway warning

* Fix Moderinzer

* Refine checkstyle supressions

* Fix typo

* Use release version of action-checkstyle

* Move complete file ignores to checkstyle.xml

* Also run if jbang scripts themselves have changed

* Add link

* Update checkstyle version in checkstyle-idea.xml

* Remove obsolete comment

* Apply suggestions from code review

Co-authored-by: Ruslan <ruslanpopov1512@gmail.com>

* Fix checkstyle

* Increase IntelliJ version

* Switch to other formatter

* Fix checkstyle

* Fix reference

* Apply renaming also in script

* Fix jbang build command (double .java)

* Workaround for formatter issue

* Switch back to other formatter (better output)

* Remove one more ".java"

* Try to list all files

* Rename "simple" to "general"

* Debug: output modified files

* Add missing }

* Try other way for debugging

* Ohter debug

* Fix debug

* Fix copy and paste error

* Output script

* Remove obsolete ".java"

* Remove debug

* Remove "build"

* Fix source adaption

* Refine tests

* Better grouping

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Ruslan <ruslanpopov1512@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge PR is tagged with that label will be merged if workflows are green component: jablib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants