diff --git a/bin/jqt b/bin/jqt index f15e0a4..205ed96 100755 --- a/bin/jqt +++ b/bin/jqt @@ -538,7 +538,7 @@ function usage function help { cat <<'EOF' -Usage: jqt [-h | --help | -p | -V | --version] +Usage: jqt [-h | -p | -V ] jqt [options] < infile > result jqt [options] infile > result jqt [options] infile result @@ -552,10 +552,10 @@ Preprocessor options Data options Template options -C -L DIRECTORY -H -i MODULE -S - -j MODULE:NAME Information options -Document options -h, --help + -j NAME:MODULE Information options +Document options -h -4, -5 -p - -d FILE -V, --version + -d FILE -V See the manpage for full documentation and more options. EOF @@ -564,37 +564,16 @@ EOF function pandoc_options { -echo 'Pandoc options:' - cat <<'EOF' | pr -e --omit-pagination --indent=4 --width=100 --columns=2 ---base-header-level=NUMBER ---bibliography=FILE ---citation-abbreviations=FILE ---columns=NUMBER ---csl=FILE ---email-obfuscation=none|javascript|references ---file-scope ---gladtex ---highlight-style=STYLE ---html-q-tags ---id-prefix=STRING ---indented-code-classes=CLASSES ---jsmath[=URL] ---katex[=URL] ---katex-stylesheet ---latexmathml[=URL] ---mathjax[=URL] ---mathml[=URL] ---mimetex[=URL] ---no-highlight ---normalize ---number-offset=NUMBER[,NUMBER,...] ---number-sections ---preserve-tabs ---section-divs ---tab-stop=NUMBER ---toc-depth=NUMBER ---webtex[=URL] ---wrap=[auto|none|preserve]' + cat <<'EOF' +jqt will forward to pandoc all long options present in the command line, but +some are reserved or have no meaning (be careful). + +Pandoc options used internally by jqt (do not play with them): + --from + --to + --template + --table-of-contents + --output EOF exit 0 } @@ -712,45 +691,8 @@ while getopts :hVD:I:P:L:i:j:45d:weprt:m:M:T:CHS-: opt; do # '--' end options :) break ;; - # Generic options - help) help - ;; - version) echo "$SELF $VERSION"; exit 0 - ;; - datadir) echo "${DATADIR}"; exit 0 - ;; - # Pandoc options: - base-header-level=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - bibliography=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - citation-abbreviations=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - columns=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - csl=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - email-obfuscation=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - file-scope) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - gladtex) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - highlight-style=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - html-q-tags) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - id-prefix=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - indented-code-classes=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - jsmath|jsmath=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - katex-stylesheet=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - katex|katex=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - latexmathml|latexmathml=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - mathjax|mathjax=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - mathml|mathml=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - mimetex|mimetex=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - no-highlight) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - normalize) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - number-offset=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - number-sections) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - preserve-tabs) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - section-divs) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - tab-stop=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - toc-depth=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - webtex|webtex=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - wrap=*) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG";; - # Errors - *) usage "Unknown option: --$OPTARG" + # Errors (warning: bad options produce unexpected failures). + *) PANDOC_OPTS[${#PANDOC_OPTS[@]}]="--$OPTARG" ;; esac # end case --* ;; diff --git a/docs/Sakefile b/docs/Sakefile index 7965178..4c651b2 100644 --- a/docs/Sakefile +++ b/docs/Sakefile @@ -44,6 +44,20 @@ JQTFLAGS += -5 --toc-depth=4 #-S $(PagesHTML): $(Blocks)/filters.jq +tree: + tree \ + -J \ + $(Root) \ + -P '*.html' \ + --dirsfirst + +# -H $(Root) +# -T "Sitemap" +# -o $@ + +purge: + killall jqt jq pandoc + depend: $(Meta)/phase3d.make cat $< | egrep -v '^#|^$$' | cut -c -72 - | sed 's/$$/.../' diff --git a/docs/content/content.md b/docs/content/content.md index 6c446e6..4477e35 100644 --- a/docs/content/content.md +++ b/docs/content/content.md @@ -197,42 +197,20 @@ is, the ampersand and the newline are removed and effectively ignored). ### Pandoc’s Markdown -<%cite jqt> accept as input format for documents the [Pandoc's MarkDown](http://pandoc.org/MANUAL.html#pandocs-markdown) +<%cite jqt> accepts as input format for documents the [Pandoc's MarkDown](http://pandoc.org/MANUAL.html#pandocs-markdown) variant, with the title block extension -disabled, and produces by default transitional HTML. When running `jqt` the following -Pandoc long options can be specified in -the command line and will be forwarded untouched to `pandoc`: +disabled, and produces by default transitional HTML. When running `jqt` all +long options specified in the command line will be forwarded +untouched to `pandoc`, but some are reserved or have no meaning. + +<%cite Pandoc> options used internally by <%cite jqt> (do not play with them): ``` ---base-header-level=NUMBER ---bibliography=FILE ---citation-abbreviations=FILE ---columns=NUMBER ---csl=FILE ---email-obfuscation=none|javascript|references ---file-scope ---gladtex ---highlight-style=STYLE ---html-q-tags ---id-prefix=STRING ---indented-code-classes=CLASSES ---jsmath[=URL] ---katex[=URL] ---katex-stylesheet ---latexmathml[=URL] ---mathjax[=URL] ---mathml[=URL] ---mimetex[=URL] ---no-highlight ---normalize ---number-offset=NUMBER[,NUMBER,...] ---number-sections ---preserve-tabs ---section-divs ---tab-stop=NUMBER ---toc-depth=NUMBER ---webtex[=URL] ---wrap=[auto|none|preserve] + --from=FORMAT + --to=FORMAT + --template=FILE + --table-of-contents + --output=FILE ``` <# diff --git a/docs/content/engine.md b/docs/content/engine.md index ff84b27..542a103 100644 --- a/docs/content/engine.md +++ b/docs/content/engine.md @@ -48,7 +48,7 @@ arguments. The usage possibilities are: | **jqt** [**-h** | **--help** | **-p** | **-V** | **--version**] | **jqt** [_options_] < _infile_ > _result_ | **jqt** [_options_] _infile_ > _result_ -| **jqt** [_options_] _infile_ _result_ +**jqt** [_options_] _infile_ _result_ ### Options @@ -106,7 +106,8 @@ Block comment `<# #>` `<# #>` `/* */` `/* Line comment `//` `//` Bypass[^1] `` `` `` ` ` `` - `\n~~~` (also backticks) + \\n``` + `\n~~~` Escape[^2] `` ` ` `` `` ` ` `` String[^3] `{% %}` `" "` `" "` `{{ }}` `' '` diff --git a/docs/content/opt/V.txt b/docs/content/opt/V.txt index e434aba..9ee561d 100644 --- a/docs/content/opt/V.txt +++ b/docs/content/opt/V.txt @@ -1,4 +1,4 @@ --V, --version +-V : Displays version information. <# vim:ts=4:sw=4:ai:et:fileencoding=utf8:syntax=markdown diff --git a/docs/content/opt/h.txt b/docs/content/opt/h.txt index 20ba9b6..0e4405c 100644 --- a/docs/content/opt/h.txt +++ b/docs/content/opt/h.txt @@ -1,4 +1,4 @@ --h, --help +-h : Displays this message. <# vim:ts=4:sw=4:ai:et:fileencoding=utf8:syntax=markdown diff --git a/docs/content/structure.md b/docs/content/structure.md index e447941..9396257 100644 --- a/docs/content/structure.md +++ b/docs/content/structure.md @@ -188,7 +188,7 @@ Table: **Delimiters used in <%cite jqt> templates** #### Expressions The text in expressions and actions is normal [_jq_][JQ] code, where as -a bonus, the `$M` global variable points to the `jq` JSON input (the initial `.`). +a bonus, the `$jqt` global variable points to the `jq` JSON input (the initial `.`). The rules for expression evaluation are very simple: * If an expression evaluates to `empty` the whole line vanishes. @@ -217,14 +217,14 @@ The evaluation rules for one line actions are as follows: * If the delimited snippet evaluates to `empty` the whole line vanishes. * Otherwise, for each value produced the text following the snippet is evaluated with the value assigned to the dot (`.`). The initial - dot is still available in the global variable `$M`. + dot is still available in the global variable `$jqt`. The evaluation rules for multiline actions are as follows: * If the opening snippet evaluates to `empty` all lines until the ending snippet disappear. * Otherwise, for each value produced the lines until the ending snippet are evaluated with the value assigned to the dot (`.`). The initial dot is - still available in the global variable `$M`. + still available in the global variable `$jqt`. <# Warning: raw blocks are not documented because they are CONTENT! #> diff --git a/share/sake.d/main.make b/share/sake.d/main.make index 5c9afa1..0b1a039 100644 --- a/share/sake.d/main.make +++ b/share/sake.d/main.make @@ -138,8 +138,6 @@ $(sake_builtin): ; @echo 'sake: Target `$@` not implemented.' build:: $(PagesHTML) @cp --verbose --recursive --update $(Assets)/* $(Root) \ | sed "s/^.*-> ./==> /;s/.$$//" - date -Iseconds > $(Meta)/lastbuild - echo Done! Visit file://$(realpath $(Root))/index.html # Delete secondary files. clobber:: ; @rm -rf *~ *.bak *.log @@ -176,6 +174,11 @@ $(MDIR)/sitemap.make: ; $(MDIR)/styles.make: ; $(MDIR)/tools.make: ; +# Bye +build:: + date -Iseconds >> $(Meta)/lastbuild + echo Done! Visit file://$(realpath $(Root))/index.html + endif # __phase_3 endif # __phase_2 endif # __phase_1