Skip to content

doc: Markdown to man conversion - #5358

Closed
petrasovaa wants to merge 14 commits into
OSGeo:mainfrom
petrasovaa:markdown-to-man
Closed

petrasovaa wants to merge 14 commits into
OSGeo:mainfrom
petrasovaa:markdown-to-man

Conversation

@petrasovaa

Copy link
Copy Markdown
Contributor

In order to remove html files, we need to start converting manual pages from markdown. This PR includes the conversion script and some basic makefile modifications. The conversion script is far from perfect, it needs to be tested more and it does not support tables yet. Some nested elements don't work very well, because I (and AI) wrote just a simplified markdown parser. The parser relies on the currently enabled markdown linting rules.

I didn't remove the html built, that's probably a separate PR.

Comment thread utils/markdown2man.py Resolved
Co-authored-by: Markus Neteler <neteler@osgeo.org>
@susi

susi commented Mar 30, 2025

Copy link
Copy Markdown
Contributor

Drive-by comment: Why build a custom thing when pandoc can do the work and more? At least this seems to me to be a more efficient way to acchieve the result? As a further benefit by adopting pandoc it can also output other formats such as HTML and PDF.

It does add a new dependancy, however, it is already well known and well-tested, and very modular.

@echoix

echoix commented Mar 30, 2025

Copy link
Copy Markdown
Member

Drive-by comment: Why build a custom thing when pandoc can do the work and more? At least this seems to me to be a more efficient way to acchieve the result? As a further benefit by adopting pandoc it can also output other formats such as HTML and PDF.

It does add a new dependancy, however, it is already well known and well-tested, and very modular.

If I'm not mistaken, pandoc was used to do the bulk of the conversion, but it wasn't perfect here, but with a custom Lua filter for code blocks it was better

@neteler

neteler commented Mar 30, 2025

Copy link
Copy Markdown
Member

pandoc was used to do the bulk of the conversion

Yes. The script is here:

@petrasovaa

petrasovaa commented Mar 31, 2025 •

Copy link
Copy Markdown
Contributor Author

pandoc was used to do the bulk of the conversion

Yes. The script is here:

This was html to markdown, I am not sure how relevant is that to markdown to man conversion. My assumption was we don't want pandoc as dependency and it would likely require some tweaks.

@nilason nilason removed this from the 8.5.0 milestone Feb 12, 2026
@nilason nilason added this to the 8.6.0 milestone Feb 12, 2026
@petrasovaa

Copy link
Copy Markdown
Contributor Author

Closing in favor of #7540

@petrasovaa petrasovaa closed this Jul 12, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in GRASS Markdown Documentation Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake docs Python Related code is in Python

Projects

Development

Successfully merging this pull request may close these issues.

6 participants