diff options
| author | John J. Camilleri <john@digitalgrammars.com> | 2018-12-06 13:47:50 +0100 |
|---|---|---|
| committer | John J. Camilleri <john@digitalgrammars.com> | 2018-12-06 13:47:50 +0100 |
| commit | d880a61857ceec0f4b2870b6a5e86b271a93b07c (patch) | |
| tree | 77d0cfe4f81c10778b035919a3c85a100813a845 | |
| parent | 7bd086ba1925ba96533d4d021527621c2f8f8c83 (diff) | |
Add some documentation to update_html
| -rwxr-xr-x | bin/clean_html | 4 | ||||
| -rwxr-xr-x | bin/update_html | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/bin/clean_html b/bin/clean_html index 9e3e9c84c..8f0ec83d9 100755 --- a/bin/clean_html +++ b/bin/clean_html @@ -1,7 +1,7 @@ #!/bin/bash -# This script finds all .t2t (txt2tags) and .md (markdown) files -# and deletes the corresponding html file +# This script finds all .t2t (txt2tags) and .md (Markdown) files +# and deletes the corresponding HTML file of the same name. find . -name '*.t2t' | while read t2t ; do html="${t2t%.t2t}.html" diff --git a/bin/update_html b/bin/update_html index 8e96139ca..e6e8877de 100755 --- a/bin/update_html +++ b/bin/update_html @@ -1,5 +1,22 @@ #!/bin/bash +# Generate HTML from txt2tags (.t2t) and Markdown (.md) +# Usage: +# - update_html +# Look for all .t2t and .md files in the current directory and below, +# generating the output HTML when the source is newer than the HTML. +# - update_html path/to/file.t2t path/to/another.md +# Generate HTML for the specified file(s), ignoring modification time. +# +# Requires: +# - txt2tags for .t2t files. Tested with 2.6. +# - pandoc for both .t2t and .md files. Tested with 1.16.0.2 and 2.3.1. +# - the template file `template.html` in the same directory as this script. +# +# Tested with Ubuntu 16.04 and macOS Mojave. +# +# See also clean_html for removing the files generated by this script. + # Path to directory where this script is # https://stackoverflow.com/a/246128/98600 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" |
