jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Added a custom Export for academicpages.github.io

Open GreLucie opened this issue 3 weeks ago • 6 comments

Closes #12727

This PR is to add a custom exporter for academicpages.github.io by adding the corresponding layouts. It also implements a way to export multiple files to this format.

Steps to test

When jabref is running, go to file->Export->Export selected entries ( or all entries) and choose "Academic Pages Markdowns" for the export type.

image

You can then add the markdown file(s) to your academic page to see it on your own page. image

More information about academic pages on the page : https://academicpages.github.io/

Mandatory checks

  • [x] I own the copyright of the code submitted and I license it under the MIT license
  • [x] I manually tested my changes in running JabRef (always required)
  • [x] I added JUnit tests for changes (if applicable)
  • [x] I added screenshots in the PR description (if change is visible to the user)
  • [x] I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [x] I checked the user 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 updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

GreLucie avatar Nov 29 '25 10:11 GreLucie

Hey @GreLucie!

Thank you for contributing to JabRef! Your help is truly appreciated :heart:

We have automated checks in place, based on which you will soon get feedback if any of them are failing. In a while, maintainers will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs.

Please re-check our contribution guide in case of any other doubts related to our contribution workflow.

github-actions[bot] avatar Nov 29 '25 10:11 github-actions[bot]

Hi, we just wanted to clarify the mechanism that we chose to implement for this new AcademicPagesExporter so that we can have your opinion on it and know whether or not it meets your expectations : This exporter actually creates a folder at first (even when there's only one entry selected) with the name typed by the user in the export dialog and then exports all the entries selected one by one inside this folder, giving them names that match exactly what is defined by the academicpages layout as their file names in the permalink field of the markdown (that way it facilitates instant integration in the personal academic pages repository). So is this logic fine with you or is there something we need to change especially about the creation of a folder... ?

sadok-lajmi avatar Dec 02 '25 19:12 sadok-lajmi

Yep that sound reasonable. Go ahead

Siedlerchr avatar Dec 02 '25 19:12 Siedlerchr

@sadok-lajmi Please merge upstream/main. You can do it with the button "Update branch" here on this page or using your GitHub CLI.

koppor avatar Dec 04 '25 13:12 koppor

Please fix the failing tests°!

Siedlerchr avatar Dec 09 '25 19:12 Siedlerchr

Hello everybody, since we are extremely busy with other projects during this period we would like to apologize for the time it's taking to make the rest of the modifications and we promise to start making more progress, specifically on the layout changes, starting from next week. Sorry again for the inconvenience...

sadok-lajmi avatar Dec 12 '25 13:12 sadok-lajmi

The exporter should be "intelligent"

Currently, if no PDF exists, it exports

paperurl: 'https://[insert username].github.io/files/[insert filename].pdf'

This is wrong - it has to omit paperurl if there is no PDF.

slidesurl has to be omitted in all cases, because there is "no standard" in JabRef for this.

bibtexurl can always be provided. -- Write the BibEntry to a file.

Use following method:

https://github.com/JabRef/jabref/blob/058767a58148ff0acfbd2287bbd94ef23d747d67/jablib/src/main/java/org/jabref/model/entry/BibEntry.java#L738

For InProceedings, the venue has to be read from booktitle. That means: If journal (getFieldOrAlias) is empty, use Booktitleas venue. DO NOT use Unknownleave it empty.

category should also be mapped: InProceedings is conferences, Article is journals, all other can go into manuscripts.

citation needs to be generaed out of the entry preview

Right part at

grafik `paperurl` is a file **next to** the markdown file - just copy the first attached file next to it and link it.

--

insert username is not acceptable. Two options:

  1. Use user from org.jabref.logic.preferences.JabRefCliPreferences#getUserHostInfo - make this method public
  2. Make it configurable in the preferences (for the export for acamdemic pages)
  3. Ask at each export using a dialog

I think, the first option is best.

you can try out the export for yourself using https://github.com/JabRef/jabref-demonstration-libraries/blob/main/chocolate/Chocolate.bib - it has even attached files.

Hi, I didn't quite understand what we're supposed to do to make these fixes specifically :

  • "writing BibEntry to a file" to provide a bibtexurl
  • generating the citation based on the preview
  • "paperurl is a file next to the markdown file - just copy the first attached file next to it and link it."
  • the use of the user constant from preferences (based on the first fixes demanded there should be no case where we would have to write [insert username] anymore...) So could you please explain a little bit more ?.. Thank you

sadok-lajmi avatar Dec 15 '25 23:12 sadok-lajmi

JUnit tests of jablib are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Source Code Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

jabref-machine avatar Dec 15 '25 23:12 jabref-machine