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

Markdown Export Formatter #12220

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

LinusDietz
Copy link
Member

@LinusDietz LinusDietz commented Nov 22, 2024

I quickly implemented an export format in a specific (admittedly, opinionated) format to Markdown... I find the format useful to put on websites that uses Markdown as input format website.

For anybody who's interested, the command I use to generate the list of the website is:

jabref -n -i literature.bib --exportMatches '(author="dietz"  and (entrytype=="article" or entrytype="inProceedings" or entrytype="inCollection"))',test.md,title-md

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • 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.

@LinusDietz LinusDietz marked this pull request as ready for review November 22, 2024 16:48
github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

One suggestion about Changelog, other things look ok-ish to me.
As noone asked for this feature yet, i guess you will be the only one for a long time to use it, so opinionated implementation is fine for me.
What im not sure of is a custom SaveOrder hardcoded. Opinions?

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Carl Christian Snethlage <[email protected]>
@LinusDietz LinusDietz added type: feature status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers export / save labels Nov 22, 2024
@@ -27,6 +30,7 @@ public static ExporterFactory create(CliPreferences preferences) {
List<TemplateExporter> customFormats = preferences.getExportPreferences().getCustomExporters();
LayoutFormatterPreferences layoutPreferences = preferences.getLayoutFormatterPreferences();
SelfContainedSaveOrder saveOrder = SelfContainedSaveOrder.of(preferences.getSelfContainedExportConfiguration().getSaveOrder());
SelfContainedSaveOrder saveMostRecentFirst = new SelfContainedSaveOrder(SaveOrder.OrderType.SPECIFIED, List.of(new SortCriterion(StandardField.YEAR, true)));
Copy link
Member

Choose a reason for hiding this comment

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

I would simply use the save order from the preferences, just for consistency and to reduce wtfs ;)

@calixtus
Copy link
Member

Yes, preferences save order. Maybe we can make it somewhat customizable in the layout files in a follow up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export / save status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers type: feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants