Skip to content

Markdown Export Formatter #12220

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

Merged
merged 9 commits into from
Nov 25, 2024
Merged

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?

Co-authored-by: Carl Christian Snethlage <[email protected]>
@LinusDietz LinusDietz added [outdated] type: feature status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers component: export-or-save labels Nov 22, 2024
Siedlerchr
Siedlerchr previously approved these changes Nov 22, 2024
@calixtus
Copy link
Member

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

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.

Please use prefs save order. That can and should be customizable in the future by layouts.

@Siedlerchr
Copy link
Member

You can define the export save order here:
grafik

Siedlerchr
Siedlerchr previously approved these changes Nov 25, 2024
@Siedlerchr Siedlerchr enabled auto-merge November 25, 2024 20:49
@LinusDietz
Copy link
Member Author

but... can you do it in the cli from e.g. a github action?

You can define the export save order here: grafik

@Siedlerchr
Copy link
Member

Currently not possible, create a preferences file (export xml) and then you can import it via cli , "-p prefs.xml"

@Siedlerchr Siedlerchr added this pull request to the merge queue Nov 25, 2024
Merged via the queue into JabRef:main with commit b453985 Nov 25, 2024
@LinusDietz LinusDietz deleted the website-html-export branch November 25, 2024 21:37
@koppor
Copy link
Member

koppor commented Nov 25, 2024

Typically, CSL styles are used for it - and one can select "copy as text"

image

Result:

[1]O. Kopp, C. C. Snethlage, and C. Schwentker, “JabRef: BibTeX-based literature management software,” TUGboat, vol. 44, no. 3, pp. 441–447, 2023, doi: 10.47397/tb/44-3/tb138kopp-jabref.
[2]O. Kopp, “The LaTeXtemplate generator: How micro-templates reduce template maintenance effort,” TUGboat, vol. 44, no. 2, pp. 203–207, 2023, doi: 10.47397/tb/44-2/tb137kopp-microtemplates.
[3]M. Stötzner et al., “A Systematic Technology Review of General-Purpose Open-Source TOSCA Orchestrators,” in Proceedings of the IEEE/ACM 16th International Conference on Utility and Cloud Computing, in UCC ’23. ACM, Dec. 2023. doi: 10.1145/3603166.3632130.
[4]S. König et al., “BPMN4Cars: A Car-Tailored Workflow Engine,” in 2023 IEEE 21st International Conference on Industrial Informatics (INDIN), IEEE, Jul. 2023. doi: 10.1109/indin51400.2023.10218082.

With some RegEx magic, this can be transformed to:

* O. Kopp, C. C. Snethlage, and C. Schwentker, “JabRef: BibTeX-based literature management software,” TUGboat, vol. 44, no. 3, pp. 441–447, 2023, doi: 10.47397/tb/44-3/tb138kopp-jabref.
* O. Kopp, “The LaTeXtemplate generator: How micro-templates reduce template maintenance effort,” TUGboat, vol. 44, no. 2, pp. 203–207, 2023, doi: 10.47397/tb/44-2/tb137kopp-microtemplates.
* M. Stötzner et al., “A Systematic Technology Review of General-Purpose Open-Source TOSCA Orchestrators,” in Proceedings of the IEEE/ACM 16th International Conference on Utility and Cloud Computing, in UCC ’23. ACM, Dec. 2023. doi: 10.1145/3603166.3632130.
* S. König et al., “BPMN4Cars: A Car-Tailored Workflow Engine,” in 2023 IEEE 21st International Conference on Industrial Informatics (INDIN), IEEE, Jul. 2023. doi: 10.1109/indin51400.2023.10218082.

I know, the DOI is not linked. I filed a feature request upstream: michel-kraemer/citeproc-java#252

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

Successfully merging this pull request may close these issues.

5 participants