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

Convert Docbook to reStructuredText for man pages #545

Closed
wants to merge 1 commit into from

Conversation

danyeaw
Copy link
Contributor

@danyeaw danyeaw commented Oct 27, 2023

Removes the dependency on xsltproc and the DocBook style sheets for better cross-platform compatibility. ReStructuredText is more modern than writing XML.

Removes the dependency on xsltproc and the DocBook style sheets for better
cross-platform compatibility.
ReStructuredText is more modern than writing XML.
@ximion
Copy link
Owner

ximion commented Oct 27, 2023

First of all, thank you for the work and creating a patch!
To be honest though, I have a lot of doubts whether it makes any sense at all to merge this.

The entire documentation and specification of AppStream is written in Docbook XML, so these dependencies you mention will be pulled in anyway, either directly, or indirectly via daps on any build that includes documentation builds.

And while for something new I would prefer reST for sure, I think there is value in keeping things consistently in Docbook for this project. That, or converting everything to reST so we do not need to maintain even more tooling and markup languages.

So, by merging this we would gain nothing, but instead make things harder to maintain by having more languages to write documentation in.
I was thinking of rewriting the specification in reST, but I didn't find any compelling reason to justify the huge effort for doing so.

@danyeaw
Copy link
Contributor Author

danyeaw commented Oct 27, 2023

Hi @ximion, thanks for the feedback! If I took on converting all the documentation from Docbook to reST would that be more acceptable?

@ximion
Copy link
Owner

ximion commented Oct 27, 2023

Yes, but why would you even want to do that? What problem does it solve?
If all docs would be converted, we would also need to provide compat links so everything referencing the specification still works (it is linked to from a lot of places), making this a really difficult task to do right. It's a lot of work, so I think it would really need a super strong reason to invest time in it.

@danyeaw
Copy link
Contributor Author

danyeaw commented Oct 27, 2023

My motivation is to get AppStream better supported on macOS and Windows, because while my GTK app that uses libadwaita is primarily used by Linux users, it also is available for those other platforms as well.

I can submit a separate issue, but this is what I run in to on macOS:

[1/21] Generating docs/man-appstreamcli with a custom command
FAILED: docs/appstreamcli.1
/usr/bin/xsltproc --nonet --stringparam man.output.quietly 1 --stringparam funcsynopsis.style ansi --stringparam man.th.extra1.suppress 1 -o docs/appstreamcli.1 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl ../docs/xml/man/appstreamcli.1.xml
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl

I have docbook-xsl installed, but no joy and I don't know why besides well its Docbook and there are better, more readable formats available.

@ximion
Copy link
Owner

ximion commented Oct 30, 2023

Two options might work: We don't build manual pages in Windows, or we find out why this issue happens. The schema should be available locally, so for some reason they are not found on Windows. It would make sense to investigate that.
Can you locale where docbook.xsl was placed, maybe it requires us to set some environment variables.

@danyeaw
Copy link
Contributor Author

danyeaw commented Nov 4, 2023

Replaced by #550.

@danyeaw danyeaw closed this Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants