-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
docs: Generate manual from markdown using mkdocs #3849
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Hi @landam! After discussion with @wenzeslaus, we would like to propose to remove the auto-converted MD manual pages from this PR to reduce its size. Once the software part of this PR is working
This way it is easier to handle/review and less work in this PR. What do you think? |
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -9,79 +9,101 @@ | |||
import sys | |||
import os | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ruff] reported by reviewdog 🐶
import operator | |
prefix = cmd.split(".")[0] | ||
if prefix not in [item[0] for item in classes]: | ||
classes.append((prefix, class_labels.get(prefix, prefix))) | ||
classes.sort(key=lambda tup: tup[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ruff] reported by reviewdog 🐶
classes.sort(key=lambda tup: tup[0]) | |
classes.sort(key=operator.itemgetter(0)) |
get_desc, | ||
) | ||
|
||
build_full_index("md") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ruff] reported by reviewdog 🐶
build_full_index("md") | |
build_full_index("md") |
for k in sorted(char_list.keys()): | ||
test_length += 1 | ||
# toc += '<li><a href="#%s" class="toc">%s</a></li>' % (char_list[k], k) | ||
if test_length % 4 == 0 and not test_length == all_keys: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ruff] reported by reviewdog 🐶
if test_length % 4 == 0 and not test_length == all_keys: | |
if test_length % 4 == 0 and test_length != all_keys: |
""" | ||
try: | ||
response = urlopen(url, *args, **kwargs) | ||
if not response.code == 200: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ruff] reported by reviewdog 🐶
if not response.code == 200: | |
if response.code != 200: |
Goal
Build user manual from Markdown using mkdocs
How to test
man/mkdocs/requirements.txt
/tmp/code.lua
:dist.x86_64-pc-linux-gnu/docs/mkdocs/site/index.html
in web browserTasks
Critical:
man
: integrate changes frommain
gui/script/
compilationraster
man
--md-description
Important:
build_md.py
and indicesmeta page
comments to MD files (as YAML metadata block)g.extension
for the addonssite_name
to "GRASS GIS 8.5.0dev Reference Manual"Nice to have:
man
dir:GISBASE="/home/martin/src/grass/dist.x86_64-pc-linux-gnu" ARCH="x86_64-pc-linux-gnu" ARCH_DISTDIR="/home/martin/src/grass/dist.x86_64-pc-linux-gnu" VERSION_NUMBER=8.5.0dev VERSION_DATE=2024 python3 ./build_manual_gallery.py
) and seedist.x86_64-pc-linux-gnu/docs/markdown/site/manual_gallery.html
and https://grass.osgeo.org/grass84/manuals/manual_gallery.htmlTasks before merge
Tasks after merge(?)