Automatic list of occurrences of to-do and other open tasks.
This commit is contained in:
parent
9b3afd96b4
commit
c0916a2eef
7
Makefile
7
Makefile
|
@ -16,7 +16,7 @@ artifacts/deps.pdf: deps.dot Makefile
|
|||
mkdir -p $$(dirname $@)
|
||||
dot -Tpdf $< > $@
|
||||
|
||||
artifacts/index.html: doc-src/index.html artifacts/style.css artifacts/deps.svg artifacts/deps.png artifacts/deps.pdf artifacts/references/index.html Makefile
|
||||
artifacts/index.html: doc-src/index.html artifacts/style.css artifacts/deps.svg artifacts/deps.png artifacts/deps.pdf artifacts/references/index.html artifacts/open-tasks/index.html Makefile
|
||||
mkdir -p $$(dirname $@)
|
||||
cp doc-src/index.html $@
|
||||
|
||||
|
@ -35,3 +35,8 @@ artifacts/references/style.css: doc-src/style.css Makefile
|
|||
micro-scheme/test-result: micro-scheme/nano-scheme.sh Makefile
|
||||
mkdir -p $$(dirname $@)
|
||||
sh $< > $@
|
||||
|
||||
.PHONY: artifacts/open-tasks/index.html
|
||||
artifacts/open-tasks/index.html: Makefile
|
||||
mkdir -p $$(dirname $@)
|
||||
tests/to-do/list-to-dos.sh > $@
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<ul>
|
||||
<li><a href="deps.svg">Dependency graph</a> with work-in-progress indications (<a href="deps.png">PNG</a> and <a href="deps.pdf">PDF</a> versions)</li>
|
||||
<li><a href="references/index.html">References</a></li>
|
||||
<li><a href="open-tasks/index.html">Open tasks</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
41
tests/to-do/list-to-dos.sh
Executable file
41
tests/to-do/list-to-dos.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
|
||||
escapehtml() {
|
||||
sed -e 's/&/\&/g' \
|
||||
| sed -e 's/</\</g' \
|
||||
| sed -e 's/>/\>/g' \
|
||||
| sed -e 's/"/\"/g'
|
||||
}
|
||||
|
||||
cat <<'EOF'
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>{{{project-name}}}</title>
|
||||
<style>
|
||||
body > ul { display: table; }
|
||||
ul > li { display: table-row; }
|
||||
li > a, li > span { display: table-cell; }
|
||||
li > * + span { padding-left: 1em; }
|
||||
li > a + span { text-align: right; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Open tasks</h1>
|
||||
<ul>
|
||||
EOF
|
||||
|
||||
commit="$(git rev-parse HEAD | escapehtml)"
|
||||
(
|
||||
cd "$(git rev-parse --show-cdup)";
|
||||
git grep -i -n \\\(todo\\\|fixme\\\|xxx\\\)
|
||||
) \
|
||||
| escapehtml \
|
||||
| sed -e 's~^\([^:]*\):\([^:]*\):\(.*\)$~ <li><a href="https://gitlab.com/project-name/project-name/blob/'"$commit"'/\1">\1</a> <span>\2</span> <span>\3</span></li>~'
|
||||
|
||||
cat <<'EOF'
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user