Skip to content

Commit

Permalink
Move Markdown manual to manual/dev/manual.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Dec 9, 2024
1 parent 2de38c8 commit 6300bc0
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 3,835 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ check_DATA = tests/man.test
# Making changes to the manpage without having the python deps means your
# tests won't run. If you aren't making changes to the examples, you probably
# don't care. But if you are, then you need to run the tests anyway.
tests/man.test tests/manonig.test: $(srcdir)/docs/content/manual/manual.md
tests/man.test tests/manonig.test: $(srcdir)/docs/content/manual/dev/manual.md
if ENABLE_DOCS
$(AM_V_GEN) ( cd ${abs_srcdir}/docs && ./build_mantests.sh )
else
Expand All @@ -174,7 +174,7 @@ endif
# manpage, then we'll end up using the cached version. Otherwise, we need to
# rebuild it.
man_MANS = jq.1
jq.1.prebuilt: $(srcdir)/docs/content/manual/manual.md $(srcdir)/docs/man/*
jq.1.prebuilt: $(srcdir)/docs/content/manual/dev/manual.md $(srcdir)/docs/man/*
if ENABLE_DOCS
$(AM_V_GEN) ( cd ${abs_srcdir}/docs && ./build_manpage.sh ) > $@
else
Expand Down
2 changes: 1 addition & 1 deletion docs/build_manpage.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
pandoc man/prologue.md content/manual/manual.md man/epilogue.md -s --to=man --lua-filter filters/filter.lua
pandoc man/prologue.md content/manual/dev/manual.md man/epilogue.md -s --to=man --lua-filter filters/filter.lua
2 changes: 1 addition & 1 deletion docs/build_mantests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
mkdir -p tests
pandoc content/manual/manual.md --lua-filter filters/tests.lua | split --separator='\0' -l1 - tests/
pandoc content/manual/dev/manual.md --lua-filter filters/tests.lua | split --separator='\0' -l1 - tests/
REGEX="test|match|capture|scan|split|splits|sub|gsub"
grep -L -E $REGEX tests/* | xargs cat | sed 's/\x0/\n/g' > ../tests/man.test
grep -l -E $REGEX tests/* | xargs cat | sed 's/\x0/\n/g' > ../tests/manonig.test
Expand Down
4 changes: 2 additions & 2 deletions docs/build_manual.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
echo "headline: jq Manual"
echo "body: |"
pandoc content/manual/manual.md --lua-filter filters/filter.lua \
pandoc content/manual/dev/manual.md --lua-filter filters/filter.lua \
--shift-heading-level-by=1 --section-divs | \
sed 's/\(.*\)/ \1/g'
echo "toc:"
pandoc content/manual/manual.md --lua-filter filters/toc.lua
pandoc content/manual/dev/manual.md --lua-filter filters/toc.lua
4 changes: 2 additions & 2 deletions docs/build_website.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ def copy_public_files(root=''):
os.makedirs('output', exist_ok=True)
copy_public_files()

os.system("./build_manual.sh > content/manual/manual.yml")
os.system("./build_manual.sh > content/manual/dev/manual.yml")

for fn in glob.glob('content/**/*.yml', recursive=True):
generate_file(env, fn)

os.remove("content/manual/manual.yml")
os.remove("content/manual/dev/manual.yml")
File renamed without changes.
Loading

0 comments on commit 6300bc0

Please sign in to comment.