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

metainfo-to-news: Change text output format to be Markdown #405

Closed
pwithnall opened this issue May 30, 2022 · 2 comments
Closed

metainfo-to-news: Change text output format to be Markdown #405

pwithnall opened this issue May 30, 2022 · 2 comments

Comments

@pwithnall
Copy link
Contributor

A lot of projects use Markdown formatting for their NEWS file now, since it’s human-readable, but also well defined as machine readable, and is rendered automatically when viewed online in GitHub or GitLab.

It would be useful if appstreamcli metainfo-to-news outputted valid Markdown, either by changing what the text format outputs, or adding a new markdown output format.

The main issue I’ve noticed with the existing text format is that the underline for the header is ~~~~~~ rather than the ====== or ------ stipulated by Markdown. I’m not sure if any other changes in the formatting would be required to make it valid Markdown.

@ximion
Copy link
Owner

ximion commented May 30, 2022

[Markdown is] well defined as machine readable

That's quite the statement given the huge amount of different styles and interpretations, depending on which Markdown flavor you have ^^

But having this would indeed make sense, possibly even as default. appstreamcli metainfo-to-news already has a --format flag anyway, so adding a Markdown option should be possible.
The only thing I do remember that would need to be changed is indeed the tilde to some other header separator, but while we're at it, adding ### to sections to render them properly may also be useful.
The only question is whether news-to-metainfo should also be able to read the new Markdown format. I think the answer to that question is yes, but it will make this task a bit more annoying to implement ;-)

@pwithnall
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants