Skip to content

Export for academicpages 12727#15262

Merged
Siedlerchr merged 37 commits into
JabRef:mainfrom
LoayTarek5:export-for-academicpages-12727
Mar 16, 2026
Merged

Export for academicpages 12727#15262
Siedlerchr merged 37 commits into
JabRef:mainfrom
LoayTarek5:export-for-academicpages-12727

Conversation

@LoayTarek5

Copy link
Copy Markdown
Collaborator

Related issues and pull requests

Closes #12727

PR Description

Implements an exporter for the academicpages.
The exporter generates one Markdown file per entry with YAML front matter (title, venue, date, IEEE citation, category) and copies attached PDFs

Steps to test

1- Open library .bib
2- Select some entries
3- Click File -> Export -> Export selected entries
3- Choose Academic Pages (*.md), type a folder name, click Save, output folder contains:

  • _publications/.md files
  • files/.bib and .pdf files
image image image image

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Add academicpages export format for JabRef

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Implements new academicpages Jekyll template export format
• Generates individual Markdown files with YAML front matter per entry
• Automatically copies attached PDFs and creates .bib files
• Sorts entries by type and generates IEEE-style citations
Diagram
flowchart LR
  BibEntry["BibEntry"] -->|"extract metadata"| Markdown["Markdown File<br/>with YAML Front Matter"]
  BibEntry -->|"copy PDF"| FilesDir["files/ directory"]
  BibEntry -->|"generate .bib"| BibFile[".bib file"]
  Markdown --> PublicationsDir["_publications/<br/>directory"]
  FilesDir --> OutputDir["Output Directory"]
  BibFile --> OutputDir
  PublicationsDir --> OutputDir
Loading

Grey Divider

File Changes

1. jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java ✨ Enhancement +283/-0

Core academicpages exporter implementation

• New exporter class implementing academicpages Jekyll template format
• Generates Markdown files with YAML front matter containing title, venue, date, citation, and
 category
• Copies attached PDFs to files directory and creates .bib files
• Sorts entries by type (book, article, incollection, inproceedings)
• Handles month normalization, LaTeX escape removal, and quote escaping

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java


2. jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java ✨ Enhancement +1/-0

Register academicpages exporter in factory

• Registers new AcademicPagesExporter in the exporter factory
• Instantiates exporter with field preferences and entry types manager

jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java


3. jablib/src/test/java/org/jabref/logic/exporter/AcademicPagesExporterTest.java 🧪 Tests +269/-0

Complete test coverage for academicpages exporter

• Comprehensive test suite with 18 test cases covering export functionality
• Tests file generation, YAML front matter content, category mapping, and edge cases
• Validates handling of missing fields, multiple entries, and venue priority
• Tests month normalization, date field extraction, and abstract handling

jablib/src/test/java/org/jabref/logic/exporter/AcademicPagesExporterTest.java


View more (1)
4. CHANGELOG.md 📝 Documentation +1/-0

Update changelog with new export format

• Documents new academicpages export format feature
• References issue #12727

CHANGELOG.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (3)

Grey Divider


Action required

1. paperurl missing without PDF 📎 Requirement gap ✓ Correctness
Description
The exporter only writes paperurl when a PDF attachment is found, and otherwise omits the key
entirely instead of falling back to DOI/URL. This can produce AcademicPages-incompatible front
matter missing required fields and broken links.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R184-188]

+        buildVenue(entry).ifPresent(venue ->
+                sb.append("venue: '").append(escapeSingleQuotes(removeLatexEscapes(venue))).append("'\n"));
+        copyPdfAndGetUrl(entry, outputDir, key, fileDirForDatabase).ifPresent(paperUrl ->
+                sb.append("paperurl: '/files/").append(paperUrl).append("'\n"));
+        writeBibFile(entry, outputDir, key).ifPresent(bibUrl ->
Evidence
Compliance requires paperurl to be present in the front matter and mapped from attachment or
DOI/URL. The new code only appends paperurl when copyPdfAndGetUrl(...) returns a value and
returns empty if no PDF attachment is present, with no DOI/URL fallback implemented.

Export creates AcademicPages-compatible publication Markdown files with required front matter and body
Front matter mapping from BibTeX fields follows the specified AcademicPages mapping rules
Paperurl is backed by a copied adjacent attachment file when available
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[184-188]
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[208-214]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The exporter currently writes `paperurl` only when it can copy a PDF attachment; if no PDF is attached (or attachment cannot be resolved), the `paperurl` YAML key is omitted entirely and there is no fallback to DOI/URL.
## Issue Context
AcademicPages front matter requires `paperurl` and the mapping requires choosing it from a copied adjacent attachment when available, otherwise falling back to DOI/URL.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[184-190]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[206-228]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. DATE month/day ignored📎 Requirement gap ✓ Correctness
Description
buildDate ignores month/day information in BibTeX date values and always outputs YYYY-MM-01.
This produces incorrect dates when full dates are provided and violates the required YYYY-MM-DD
normalization rules.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R107-114]

+    private String buildDate(BibEntry entry) {
+        String year = entry.getField(StandardField.YEAR)
+                           .or(() -> entry.getField(StandardField.DATE)
+                                          .map(date -> date.length() >= 4 ? date.substring(0, 4) : date))
+                           .orElse("0000");
+        String month = normalizeMonth(entry.getField(StandardField.MONTH).orElse("01"));
+        return year + "-" + month + "-01";
+    }
Evidence
Compliance requires exporting a complete YYYY-MM-DD date, using full dates when present and
defaulting missing parts to 01. The implementation extracts only the year from date and forces
day 01, losing provided month/day information.

Front matter mapping from BibTeX fields follows the specified AcademicPages mapping rules
Date formatting defaults month/day to '01' when missing
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[107-114]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`buildDate` currently forces day `01` and ignores month/day contained in `StandardField.DATE`.
## Issue Context
AcademicPages expects `date` to be complete (`YYYY-MM-DD`). When BibTeX provides only partial date components, month/day default to `01`, but when full dates are provided they must be preserved.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[107-114]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Citation not preview-based 📎 Requirement gap ✓ Correctness
Description
The exporter generates citation via CSL default style bibliography generation rather than using
JabRef’s preview rendering (or an approved short alternative). This can cause citation output to
differ from JabRef preview expectations.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R246-255]

+    /// Generates a citation string from the entry using citation style IEEE
+    private String buildCitation(BibEntry entry, BibDatabaseContext databaseContext) {
+        BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(List.of(entry)));
+        context.setMode(databaseContext.getMode());
+        String style = CSLStyleLoader.getDefaultStyle().getSource();
+        return CitationStyleGenerator.generateBibliography(
+                                             List.of(entry), style, CitationStyleOutputFormat.TEXT, context, entryTypesManager)
+                                     .getFirst()
+                                     .trim();
+    }
Evidence
Compliance requires citation to be generated using JabRef preview style (or an explicitly approved
alternative). The new code uses CSLStyleLoader.getDefaultStyle() and
CitationStyleGenerator.generateBibliography(...), which is a CSL bibliography path rather than the
preview renderer.

Citation field is generated using JabRef preview style (or approved short alternative)
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[246-255]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `citation` YAML value is currently produced via CSL default bibliography generation rather than the JabRef preview renderer required by compliance.
## Issue Context
AcademicPages export is expected to produce citations consistent with JabRef preview output.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[246-255]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[171-198]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (4)
4. Unsafe .getFirst() usage 📘 Rule violation ⛯ Reliability
Description
buildCitation calls .getFirst() on the generated bibliography list without checking whether it
is empty. If bibliography generation returns an empty list for any entry, export can crash at
runtime.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R251-254]

+        return CitationStyleGenerator.generateBibliography(
+                                             List.of(entry), style, CitationStyleOutputFormat.TEXT, context, entryTypesManager)
+                                     .getFirst()
+                                     .trim();
Evidence
Compliance requires guarding against unsafe list access. The code directly calls .getFirst() on
the bibliography output without verifying it is non-empty, which can throw at runtime.

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[251-254]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The exporter uses `.getFirst()` on a list returned by citation generation without checking that the list contains an element.
## Issue Context
If citation generation fails or returns no entries for certain BibTeX data, export should not crash.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[246-255]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. No academicpages layout folder📎 Requirement gap ⛯ Reliability
Description
The export format is implemented via a hard-coded Java exporter and this PR does not add a dedicated
academicpages layout folder under the existing resource/layout mechanism. This reduces
maintainability and does not meet the requirement to implement the format as a dedicated layout
folder using existing export mechanisms where possible.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R171-198]

+    /// Builds the full Markdown file content: YAML front matter + abstract body
+    private String buildContent(BibEntry entry, Path outputDir, BibDatabaseContext databaseContext, List<Path> fileDirForDatabase) {
+        String date = buildDate(entry);
+        String key = entry.getCitationKey().orElse("unknown");
+
+        StringBuilder sb = new StringBuilder();
+        sb.append("---\n");
+        sb.append("title: \"").append(escapeDoubleQuotes(entry.getField(StandardField.TITLE).orElse(""))).append("\"\n");
+        sb.append("collection: ").append(COLLECTION).append("\n");
+        sb.append("permalink: /publication/").append(date).append("-").append(key).append("\n");
+        entry.getField(StandardField.NOTE).ifPresent(note ->
+                sb.append("excerpt: '").append(escapeSingleQuotes(note)).append("'\n"));
+        sb.append("date: ").append(date).append("\n");
+        buildVenue(entry).ifPresent(venue ->
+                sb.append("venue: '").append(escapeSingleQuotes(removeLatexEscapes(venue))).append("'\n"));
+        copyPdfAndGetUrl(entry, outputDir, key, fileDirForDatabase).ifPresent(paperUrl ->
+                sb.append("paperurl: '/files/").append(paperUrl).append("'\n"));
+        writeBibFile(entry, outputDir, key).ifPresent(bibUrl ->
+                sb.append("bibtexurl: '/files/").append(bibUrl).append("'\n"));
+        sb.append("citation: '").append(escapeSingleQuotes(buildCitation(entry, databaseContext))).append("'\n");
+        sb.append("category: ").append(mapCategory(entry.getType())).append("\n");
+        sb.append("---\n");
+
+        entry.getField(StandardField.ABSTRACT).ifPresent(abstract_ ->
+                sb.append(abstract_).append("\n"));
+
+        return sb.toString();
+    }
Evidence
Compliance requires implementing AcademicPages export as a dedicated academicpages layout folder
using JabRef’s layout-based custom export mechanism where possible. The new exporter builds
YAML/Markdown manually using a StringBuilder, indicating the layout mechanism is not being used in
this implementation.

Export format is implemented as a dedicated 'academicpages' layout folder and uses existing custom export mechanisms where possible
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[171-198]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The AcademicPages export is currently implemented as a hard-coded Java string builder without adding a dedicated `academicpages` layout folder.
## Issue Context
JabRef already uses `resource/layout/*` for export formats; adding an `academicpages` folder aligns with the required maintainability and reuse of existing export mechanisms.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[171-198]
- jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[66-66]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Path traversal via citekey🐞 Bug ⛨ Security
Description
Raw citation keys are used to form .md/.bib/.pdf filenames and resolved paths. Since citation keys
are not restricted from containing path separators, a crafted/dirty key can escape the export
directory or create invalid paths, resulting in arbitrary file write outside the target folder or
export failures.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R102-105]

+    private String buildFileName(BibEntry entry) {
+        String key = entry.getCitationKey().orElse("unknown");
+        return buildDate(entry) + "-" + key + ".md";
+    }
Evidence
The exporter concatenates the citation key directly into filenames for markdown, PDF, and BibTeX
outputs. JabRef’s citation key sanitization disallows characters like '{', '}', '\\', etc., but does
not disallow '/' (path separator) or '..', enabling path traversal when these keys are used with
Path.resolve.

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[102-105]
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[221-224]
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[237-240]
jablib/src/main/java/org/jabref/logic/citationkeypattern/CitationKeyGenerator.java[33-38]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
AcademicPagesExporter builds output file paths from `citationKey` without sanitization. Citation keys can contain path separators (e.g., `/`) or traversal segments (`..`), so `outputDir.resolve(citationKey + &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;.pdf&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;)` can write outside `files/`.
### Issue Context
JabRef’s citation key validation does not disallow `/` (see `DISALLOWED_CHARACTERS`), so keys are not guaranteed safe as filenames.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[102-105]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[206-224]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[232-240]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[176-191]
### Suggested approach
1. Create a helper like `sanitizeForFileName(String)` using existing utilities (e.g., `FileNameCleaner.cleanFileName` / `FileUtil.getValidFileName`) and additionally strip path separators and `..`.
2. When resolving, normalize and assert containment:
- `Path target = outputDir.resolve(safeName).normalize();`
- `if (!target.startsWith(outputDir)) { /* skip or fail */ }`
3. Use the sanitized key for `.md/.bib/.pdf` filenames; consider a separate URL slug (or encode) for `permalink:` and `paperurl/bibtexurl`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. Month format misparsed🐞 Bug ✓ Correctness
Description
Month normalization does not handle JabRef’s standard month storage format (#jan#, #mar#) and will
default most exported dates to January. This produces incorrect YAML front matter dates, permalinks,
and filenames for common entries created/edited in JabRef.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R107-113]

+    private String buildDate(BibEntry entry) {
+        String year = entry.getField(StandardField.YEAR)
+                           .or(() -> entry.getField(StandardField.DATE)
+                                          .map(date -> date.length() >= 4 ? date.substring(0, 4) : date))
+                           .orElse("0000");
+        String month = normalizeMonth(entry.getField(StandardField.MONTH).orElse("01"));
+        return year + "-" + month + "-01";
Evidence
AcademicPagesExporter reads StandardField.MONTH and normalizes it via a switch over values like
"mar"/"march"/"3". JabRef stores months as #<short># (e.g., #mar#), so the exporter’s switch will
fall into default and return "01". JabRef already provides Month.parse which explicitly supports
strings "possibly with # prepended".

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[107-113]
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[116-169]
jablib/src/main/java/org/jabref/model/entry/Month.java[158-168]
jablib/src/main/java/org/jabref/model/entry/Month.java[64-98]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`normalizeMonth` does not handle JabRef’s `#mar#` month format, causing incorrect dates.
### Issue Context
JabRef provides `Month.parse(String)` which explicitly supports months with `#`.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[107-114]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[116-169]
### Suggested approach
- Replace `normalizeMonth` with something like:
- `Month.parse(monthRaw).map(Month::getTwoDigitNumber).orElse(&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;01&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;)`
- Optionally: if `StandardField.DATE` is present and parseable, derive both year and month from it rather than mixing YEAR/DATE with MONTH.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

8. Type sort lacks tie-breaker 📎 Requirement gap ⛯ Reliability
Description
Entries are sorted only by publication-type precedence, with no secondary ordering within each type.
This can lead to non-deterministic processing order depending on the input list order, contrary to
the deterministic ordering requirement.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R38-51]

+    private static final Comparator<BibEntry> ENTRY_TYPE_ORDER = Comparator.comparingInt(
+            entry -> switch (entry.getType().getName()) {
+                case "book" ->
+                        0;
+                case "article" ->
+                        1;
+                case "incollection" ->
+                        2;
+                case "inproceedings" ->
+                        3;
+                default ->
+                        4;
+            }
+    );
Evidence
Compliance requires the specified type precedence and deterministic ordering within each type. The
comparator only assigns a precedence rank per type and does not add a stable secondary sort key
(e.g., by normalized date + citation key).

Export ordering uses publication-type precedence for timestamp creation
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[38-51]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Sorting currently only uses a type-rank comparator and lacks a deterministic tie-breaker within a type.
## Issue Context
The export should be deterministic for the same input set and follow the specified precedence.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[38-51]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[90-90]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


9. Changelog bullet missing space📘 Rule violation ✓ Correctness
Description
The new changelog bullet is formatted as -Added ... without a space after -, which breaks the
project’s changelog formatting conventions. This is user-facing text and should be cleanly
formatted.
Code

CHANGELOG.md[15]

+-Added export format for academicpages. [#12727](https://github.com/JabRef/jabref/issues/12727)
Evidence
Compliance requires changelog entries to be end-user oriented and formatted consistently. The added
line lacks a space after the list marker, deviating from the established bullet style.

AGENTS.md
CHANGELOG.md[15-15]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The added changelog entry is missing a space after the list marker (`-`).
## Issue Context
The changelog is user-facing and should follow consistent Markdown list formatting.
## Fix Focus Areas
- CHANGELOG.md[15-15]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


10. StringBuilder used for joins📘 Rule violation ➹ Performance
Description
buildContent constructs a newline-delimited YAML block using StringBuilder, which is a join-like
pattern where StringJoiner would be clearer. This reduces readability for delimiter-based string
construction.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R176-193]

+        StringBuilder sb = new StringBuilder();
+        sb.append("---\n");
+        sb.append("title: \"").append(escapeDoubleQuotes(entry.getField(StandardField.TITLE).orElse(""))).append("\"\n");
+        sb.append("collection: ").append(COLLECTION).append("\n");
+        sb.append("permalink: /publication/").append(date).append("-").append(key).append("\n");
+        entry.getField(StandardField.NOTE).ifPresent(note ->
+                sb.append("excerpt: '").append(escapeSingleQuotes(note)).append("'\n"));
+        sb.append("date: ").append(date).append("\n");
+        buildVenue(entry).ifPresent(venue ->
+                sb.append("venue: '").append(escapeSingleQuotes(removeLatexEscapes(venue))).append("'\n"));
+        copyPdfAndGetUrl(entry, outputDir, key, fileDirForDatabase).ifPresent(paperUrl ->
+                sb.append("paperurl: '/files/").append(paperUrl).append("'\n"));
+        writeBibFile(entry, outputDir, key).ifPresent(bibUrl ->
+                sb.append("bibtexurl: '/files/").append(bibUrl).append("'\n"));
+        sb.append("citation: '").append(escapeSingleQuotes(buildCitation(entry, databaseContext))).append("'\n");
+        sb.append("category: ").append(mapCategory(entry.getType())).append("\n");
+        sb.append("---\n");
+
Evidence
Compliance prefers StringJoiner for join-like string construction. The new code appends many
newline-delimited fragments to form front matter, which fits StringJoiner usage.

AGENTS.md
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[176-193]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The YAML front matter is built via repeated `StringBuilder.append(...)` calls in a join-like pattern.
## Issue Context
This is a newline-delimited construction that can be expressed more clearly with `StringJoiner`.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[176-193]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (3)
11. Invalid YAML quoting🐞 Bug ✓ Correctness
Description
YAML front matter is hand-built and uses \' to escape apostrophes inside single-quoted scalars.
This is not valid YAML single-quote escaping (should be doubled), and unquoted permalink values can
also break YAML if the key contains special characters (e.g., ':' or '#').
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R176-191]

+        StringBuilder sb = new StringBuilder();
+        sb.append("---\n");
+        sb.append("title: \"").append(escapeDoubleQuotes(entry.getField(StandardField.TITLE).orElse(""))).append("\"\n");
+        sb.append("collection: ").append(COLLECTION).append("\n");
+        sb.append("permalink: /publication/").append(date).append("-").append(key).append("\n");
+        entry.getField(StandardField.NOTE).ifPresent(note ->
+                sb.append("excerpt: '").append(escapeSingleQuotes(note)).append("'\n"));
+        sb.append("date: ").append(date).append("\n");
+        buildVenue(entry).ifPresent(venue ->
+                sb.append("venue: '").append(escapeSingleQuotes(removeLatexEscapes(venue))).append("'\n"));
+        copyPdfAndGetUrl(entry, outputDir, key, fileDirForDatabase).ifPresent(paperUrl ->
+                sb.append("paperurl: '/files/").append(paperUrl).append("'\n"));
+        writeBibFile(entry, outputDir, key).ifPresent(bibUrl ->
+                sb.append("bibtexurl: '/files/").append(bibUrl).append("'\n"));
+        sb.append("citation: '").append(escapeSingleQuotes(buildCitation(entry, databaseContext))).append("'\n");
+        sb.append("category: ").append(mapCategory(entry.getType())).append("\n");
Evidence
The exporter writes YAML scalars with single quotes and escapes by inserting backslashes. It also
emits an unquoted permalink containing the citation key. The codebase already demonstrates using a
YAML library (SnakeYAML) to avoid manual escaping.

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[180-190]
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[269-271]
jablib/src/main/java/org/jabref/logic/exporter/CffExporter.java[98-106]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Front matter YAML is built via string concatenation and uses incorrect escaping for apostrophes in single-quoted scalars, and `permalink` is emitted unquoted while embedding the citation key.
### Issue Context
The project already uses SnakeYAML in `CffExporter`, which avoids these escaping pitfalls.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[171-198]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[265-271]
### Suggested approach
- Preferred: build a `Map&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;String, Object&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;` of front-matter fields and dump it via SnakeYAML (then wrap with `---` lines).
- If staying with strings: change single-quote escaping to YAML-compliant `value.replace(&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#x27;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;, &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#x27;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#x27;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;)` and quote `permalink:` (and possibly `collection/category`) as needed.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


12. Reveal points to missing file🐞 Bug ⛯ Reliability
Description
Exporter treats the chosen output path as a naming seed for an output directory and never creates
the selected file. The GUI success action tries to reveal/select that chosen file path, which may
not exist and can fail to open/select in OS file managers.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R79-96]

+        String folderName = outputFile.getFileName().toString().replaceAll("\\.md$", "");
+        Path parent = outputFile.getParent() != null ? outputFile.getParent() : outputFile;
+        Path outputDir = parent.resolve(folderName);
+        Path publicationsDir = outputDir.resolve("_publications");
+        Path filesDir = outputDir.resolve("files");
+        try {
+            Files.createDirectories(publicationsDir);
+            Files.createDirectories(filesDir);
+        } catch (IOException ex) {
+            throw new SaveException(ex);
+        }
+        List<BibEntry> sorted = entries.stream().sorted(ENTRY_TYPE_ORDER).toList();
+
+        for (BibEntry entry : sorted) {
+            Path mdFile = publicationsDir.resolve(buildFileName(entry));
+            try {
+                Files.writeString(mdFile, buildContent(entry, filesDir, databaseContext, fileDirForDatabase));
+            } catch (IOException ex) {
Evidence
AcademicPagesExporter writes markdown files under a derived outputDir (folder) and does not write
outputFile at all. ExportCommand’s “Reveal in File Explorer” passes the original chosen file to
openFolderAndSelectFile, and OS-specific implementations attempt to select that exact path.

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[79-96]
jabgui/src/main/java/org/jabref/gui/exporter/ExportCommand.java[125-140]
jabgui/src/main/java/org/jabref/gui/desktop/os/Windows.java[70-73]
jabgui/src/main/java/org/jabref/gui/desktop/os/OSX.java[40-44]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The exporter creates an `output/` directory based on the selected `output.md` name but never creates `output.md`, while the GUI tries to reveal/select `output.md`.
### Issue Context
This breaks the post-export UX. Additionally, current `parent` fallback can produce `output.md/output` when `outputFile` is relative.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[79-83]
- jabgui/src/main/java/org/jabref/gui/exporter/ExportCommand.java[132-145]
### Suggested approach
- Compute `outputDir` safely via `outputFile.resolveSibling(folderName)` (works for absolute and relative paths).
- Option A (exporter-only): create a small marker file at `outputFile` (e.g., containing the output directory path) so the OS can reveal/select something.
- Option B (better UX): adjust the GUI reveal behavior to open/reveal `outputDir` (or `_publications/`) for this exporter.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


13. Output overwrites on collisions🐞 Bug ⛯ Reliability
Description
Entries missing citation keys (or with duplicate keys) will overwrite each other’s
markdown/PDF/BibTeX outputs because filenames are derived solely from date + key (or "unknown") and
PDFs/BIBs are just key.pdf / key.bib.
Code

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[R102-105]

+    private String buildFileName(BibEntry entry) {
+        String key = entry.getCitationKey().orElse("unknown");
+        return buildDate(entry) + "-" + key + ".md";
+    }
Evidence
The exporter hardcodes fallback key "unknown" and uses citation key alone for PDF/BIB filenames.
JabRef code explicitly handles citation key duplicates by appending letters, indicating duplicates
can exist; export selection could contain multiple entries without keys or duplicates, leading to
silent overwrites.

jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[102-105]
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[221-223]
jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[237-240]
jablib/src/main/java/org/jabref/logic/citationkeypattern/CitationKeyGenerator.java[135-166]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Filename scheme can collide (&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;unknown&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot; fallback; duplicate keys), causing silent overwrites of .md/.bib/.pdf outputs.
### Issue Context
JabRef supports duplicate detection for citation keys (see `getNumberOfCitationKeyOccurrences`), so collisions are possible.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[102-105]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[221-244]
### Suggested approach
- If citation key is missing, generate a stable unique suffix (e.g., entry ID) for filenames.
- If a target path already exists, append `-a`, `-b`, ... (similar to citation key generator) instead of overwriting.
- Consider keeping `REPLACE_EXISTING` only if user explicitly opts in.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +184 to +188
buildVenue(entry).ifPresent(venue ->
sb.append("venue: '").append(escapeSingleQuotes(removeLatexEscapes(venue))).append("'\n"));
copyPdfAndGetUrl(entry, outputDir, key, fileDirForDatabase).ifPresent(paperUrl ->
sb.append("paperurl: '/files/").append(paperUrl).append("'\n"));
writeBibFile(entry, outputDir, key).ifPresent(bibUrl ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Action required

1. paperurl missing without pdf 📎 Requirement gap ✓ Correctness

The exporter only writes paperurl when a PDF attachment is found, and otherwise omits the key
entirely instead of falling back to DOI/URL. This can produce AcademicPages-incompatible front
matter missing required fields and broken links.
Agent Prompt
## Issue description
The exporter currently writes `paperurl` only when it can copy a PDF attachment; if no PDF is attached (or attachment cannot be resolved), the `paperurl` YAML key is omitted entirely and there is no fallback to DOI/URL.

## Issue Context
AcademicPages front matter requires `paperurl` and the mapping requires choosing it from a copied adjacent attachment when available, otherwise falling back to DOI/URL.

## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[184-190]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[206-228]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java Outdated
Comment on lines +246 to +255
/// Generates a citation string from the entry using citation style IEEE
private String buildCitation(BibEntry entry, BibDatabaseContext databaseContext) {
BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(List.of(entry)));
context.setMode(databaseContext.getMode());
String style = CSLStyleLoader.getDefaultStyle().getSource();
return CitationStyleGenerator.generateBibliography(
List.of(entry), style, CitationStyleOutputFormat.TEXT, context, entryTypesManager)
.getFirst()
.trim();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Action required

3. Citation not preview-based 📎 Requirement gap ✓ Correctness

The exporter generates citation via CSL default style bibliography generation rather than using
JabRef’s preview rendering (or an approved short alternative). This can cause citation output to
differ from JabRef preview expectations.
Agent Prompt
## Issue description
The `citation` YAML value is currently produced via CSL default bibliography generation rather than the JabRef preview renderer required by compliance.

## Issue Context
AcademicPages export is expected to produce citations consistent with JabRef preview output.

## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[246-255]
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[171-198]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +251 to +254
return CitationStyleGenerator.generateBibliography(
List.of(entry), style, CitationStyleOutputFormat.TEXT, context, entryTypesManager)
.getFirst()
.trim();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Action required

4. Unsafe .getfirst() usage 📘 Rule violation ⛯ Reliability

buildCitation calls .getFirst() on the generated bibliography list without checking whether it
is empty. If bibliography generation returns an empty list for any entry, export can crash at
runtime.
Agent Prompt
## Issue description
The exporter uses `.getFirst()` on a list returned by citation generation without checking that the list contains an element.

## Issue Context
If citation generation fails or returns no entries for certain BibTeX data, export should not crash.

## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java[246-255]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java Outdated
Comment thread jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java Outdated
@testlens-app

This comment has been minimized.

koppor
koppor previously requested changes Mar 3, 2026

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good first step. Still many JabRef tooling (BbiEntry.getFieldOrAlias, FileUtil, FileUniqueness) unknown. Also unknown that SnakeYaml exists and used in JabRef. -- I commented inside.


private static final String COLLECTION = "publications";

private static final Comparator<BibEntry> ENTRY_TYPE_ORDER = Comparator.comparingInt(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add JavaDoc comment please


/// Exports a JabRef library to the <a href="https://academicpages.github.io">academicpages</a> Jekyll template format.
/// Each {@link BibEntry} is written to a separate Markdown file in the given output directory.
/// The file name follows the pattern {@code YYYY-MM-DD-citationkey.md}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use Markdown

Suggested change
/// The file name follows the pattern {@code YYYY-MM-DD-citationkey.md}.
/// The file name follows the pattern `YYYY-MM-DD-citationkey.md`.


import org.jspecify.annotations.NonNull;

/// Exports a JabRef library to the <a href="https://academicpages.github.io">academicpages</a> Jekyll template format.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use Markdown. Links are different in Markdown.

Comment thread jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java Outdated
}

/// Builds the full Markdown file content: YAML front matter + abstract body
private String buildContent(BibEntry entry, Path outputDir, BibDatabaseContext databaseContext, List<Path> fileDirForDatabase) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note: This method is the main reason why this is NOT a good first or second issue.

}

/// Removes common LaTeX escape sequences for use in plain text contexts
private String removeLatexEscapes(String value) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No - Use org.jabref.model.entry.BibEntry#getFieldOrAliasLatexFree when reading field content

Comment on lines +201 to +202
return entry.getField(StandardField.JOURNAL)
.or(() -> entry.getField(StandardField.JOURNALTITLE))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Combine in getFieldOrAliasLatexFree

public void export(@NonNull BibDatabaseContext databaseContext,
@NonNull Path outputFile,
@NonNull List<BibEntry> entries,
List<Path> fileDirForDatabase,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OMG - this parameter is wrong - it should be removed.

The constructor should get FilePreferences and store it.

Here, org.jabref.model.database.BibDatabaseContext#getFileDirectories should be used.

However, this might be too complex for now (because other classes also need to be rewritten) --> follow-up.

assertTrue(Files.exists(generated));

String content = Files.readString(generated);
assertTrue(content.contains("title: \"A Great Paper\""));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please test a complete export - not with "contains".

You can have multi line java string constants with """

You can replace placeholders before checking. Maybe {test-temp-dir} could be such a placeholder

@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Mar 3, 2026
…porter.java

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
@testlens-app

This comment has been minimized.

@github-actions github-actions Bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Mar 3, 2026
Comment on lines +39 to +50
entry -> switch (entry.getType().getName()) {
case "book" ->
0;
case "article" ->
1;
case "incollection" ->
2;
case "inproceedings" ->
3;
default ->
4;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a possibility of more entry types being supported here in future? In that case, 0 should go to default to ensure a better backward compatibility practice.

private String buildDate(BibEntry entry) {
String year = entry.getField(StandardField.YEAR)
.or(() -> entry.getField(StandardField.DATE)
.map(date -> date.length() >= 4 ? date.substring(0, 4) : date))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This may need a bit of an explanation in a comment. Just document an example.

return year + "-" + month + "-01";
}

/// Normalizes a BibTeX month value to a two-digit string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use org.jabref.model.entry.Month

Comment on lines +117 to +169
private String normalizeMonth(String month) {
return switch (month.toLowerCase(Locale.ROOT).trim()) {
case "1",
"jan",
"january" ->
"01";
case "2",
"feb",
"february" ->
"02";
case "3",
"mar",
"march" ->
"03";
case "4",
"apr",
"april" ->
"04";
case "5",
"may" ->
"05";
case "6",
"jun",
"june" ->
"06";
case "7",
"jul",
"july" ->
"07";
case "8",
"aug",
"august" ->
"08";
case "9",
"sep",
"september" ->
"09";
case "10",
"oct",
"october" ->
"10";
case "11",
"nov",
"november" ->
"11";
case "12",
"dec",
"december" ->
"12";
default ->
"01";
};
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should then become just:

Suggested change
private String normalizeMonth(String month) {
return switch (month.toLowerCase(Locale.ROOT).trim()) {
case "1",
"jan",
"january" ->
"01";
case "2",
"feb",
"february" ->
"02";
case "3",
"mar",
"march" ->
"03";
case "4",
"apr",
"april" ->
"04";
case "5",
"may" ->
"05";
case "6",
"jun",
"june" ->
"06";
case "7",
"jul",
"july" ->
"07";
case "8",
"aug",
"august" ->
"08";
case "9",
"sep",
"september" ->
"09";
case "10",
"oct",
"october" ->
"10";
case "11",
"nov",
"november" ->
"11";
case "12",
"dec",
"december" ->
"12";
default ->
"01";
};
}
private String normalizeMonth(String month) {
return Month.parse(month)
.map(Month::getTwoDigitNumber)
.orElse("01");
}

(check the indentation)

}

/// Builds the full Markdown file content: YAML front matter + abstract body
private String buildContent(BibEntry entry, Path outputDir, BibDatabaseContext databaseContext, List<Path> fileDirForDatabase) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Name all of these "build" methods to something more precise as they sound like void methods.
I can think of "buildAndGetContent" but open to better ideas.

return sb.toString();
}

private Optional<String> buildVenue(BibEntry entry) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

}

/// Generates a citation string from the entry using citation style IEEE
private String buildCitation(BibEntry entry, BibDatabaseContext databaseContext) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And here

@subhramit subhramit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comments as above.

@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Mar 3, 2026
…5/jabref into export-for-academicpages-12727
@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@koppor koppor added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: no-bot-comments labels Mar 16, 2026
Siedlerchr
Siedlerchr previously approved these changes Mar 16, 2026
@testlens-app

This comment has been minimized.

Siedlerchr
Siedlerchr previously approved these changes Mar 16, 2026
Comment thread jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java Outdated
@testlens-app

testlens-app Bot commented Mar 16, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 7f44514
▶️ Tests: 10177 executed
⚪️ Checks: 52/52 completed


Learn more about TestLens at testlens.app.

@Siedlerchr Siedlerchr enabled auto-merge March 16, 2026 18:00
@Siedlerchr Siedlerchr dismissed stale reviews from koppor and subhramit March 16, 2026 18:00

obsolete

@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 16, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Mar 16, 2026
Merged via the queue into JabRef:main with commit 664a6fa Mar 16, 2026
52 checks passed
faneeshh pushed a commit to faneeshh/jabref that referenced this pull request Mar 16, 2026
* Add new export format for academicpages

* exporting JabRef libraries to academicpages format

* includes various test cases to validate the export functionality

* Add AcademicPagesExporter for enhanced export functionality

* Update jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* methods for unique file name generation and enhanced date handling using TemporalAccessor

* improve YAML output validation and test coverage for different entry types. Updated expected output format and added assertions for citation and file generation.

* renamed methods for file name generation, content building, and venue resolution to better reflect their functionality

* Add space to 12727 description

* created new layout files for various academic publication types including articles, books, incollections, and inproceedings. Each layout includes fields for title, collection, excerpt, and venue.

* adding mock for LayoutFormatterPreferences and updating expected YAML output format

* integrate layout preferences and enhance file management

* include layout preferences in constructor

* Update CHANGELOG

* Restore formatDate back to be clean and more readable

* Refactor layout handling in AcademicPagesExporter to use TemplateExporter constants for layout prefix and extension.

* Reorder the final varialbe

* restore some missed files

* Update academic layout files to categorize entries as 'manuscripts' and 'conferences' where applicable

* improve entry type ordering and enhance date handling. Introduced a map for entry type priority and updated date resolution to return an Optional, ensuring cleaner permalink generation.

* Remove test for missing month defaulting to January and add new test to verify that missing date omits date and permalink in exported files

* Update CHANGELOG.md

* use entrytype

---------

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
AnvitaPrasad pushed a commit to AnvitaPrasad/jabref that referenced this pull request Mar 18, 2026
* Add new export format for academicpages

* exporting JabRef libraries to academicpages format

* includes various test cases to validate the export functionality

* Add AcademicPagesExporter for enhanced export functionality

* Update jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* methods for unique file name generation and enhanced date handling using TemporalAccessor

* improve YAML output validation and test coverage for different entry types. Updated expected output format and added assertions for citation and file generation.

* renamed methods for file name generation, content building, and venue resolution to better reflect their functionality

* Add space to 12727 description

* created new layout files for various academic publication types including articles, books, incollections, and inproceedings. Each layout includes fields for title, collection, excerpt, and venue.

* adding mock for LayoutFormatterPreferences and updating expected YAML output format

* integrate layout preferences and enhance file management

* include layout preferences in constructor

* Update CHANGELOG

* Restore formatDate back to be clean and more readable

* Refactor layout handling in AcademicPagesExporter to use TemplateExporter constants for layout prefix and extension.

* Reorder the final varialbe

* restore some missed files

* Update academic layout files to categorize entries as 'manuscripts' and 'conferences' where applicable

* improve entry type ordering and enhance date handling. Introduced a map for entry type priority and updated date resolution to return an Optional, ensuring cleaner permalink generation.

* Remove test for missing month defaulting to January and add new test to verify that missing date omits date and permalink in exported files

* Update CHANGELOG.md

* use entrytype

---------

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
FynnianB pushed a commit to FynnianB/jabref that referenced this pull request Mar 19, 2026
* Add new export format for academicpages

* exporting JabRef libraries to academicpages format

* includes various test cases to validate the export functionality

* Add AcademicPagesExporter for enhanced export functionality

* Update jablib/src/main/java/org/jabref/logic/exporter/AcademicPagesExporter.java

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* methods for unique file name generation and enhanced date handling using TemporalAccessor

* improve YAML output validation and test coverage for different entry types. Updated expected output format and added assertions for citation and file generation.

* renamed methods for file name generation, content building, and venue resolution to better reflect their functionality

* Add space to 12727 description

* created new layout files for various academic publication types including articles, books, incollections, and inproceedings. Each layout includes fields for title, collection, excerpt, and venue.

* adding mock for LayoutFormatterPreferences and updating expected YAML output format

* integrate layout preferences and enhance file management

* include layout preferences in constructor

* Update CHANGELOG

* Restore formatDate back to be clean and more readable

* Refactor layout handling in AcademicPagesExporter to use TemplateExporter constants for layout prefix and extension.

* Reorder the final varialbe

* restore some missed files

* Update academic layout files to categorize entries as 'manuscripts' and 'conferences' where applicable

* improve entry type ordering and enhance date handling. Introduced a map for entry type priority and updated date resolution to return an Optional, ensuring cleaner permalink generation.

* Remove test for missing month defaulting to January and add new test to verify that missing date omits date and permalink in exported files

* Update CHANGELOG.md

* use entrytype

---------

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

Labels

good third issue status: no-bot-comments status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export for academicpages.github.io

5 participants