Commit b7ed4bece0b8e04f4a8bb773f83093d2cf9c7cf3
1 parent
2ee1cfc0
Exists in
master
and in
90 other branches
Using rst instead of markdown for dns tables
Showing
2 changed files
with
23 additions
and
8 deletions
Show diff stats
docs/Makefile
@@ -51,7 +51,7 @@ clean: | @@ -51,7 +51,7 @@ clean: | ||
51 | rm -f dns.rst | 51 | rm -f dns.rst |
52 | 52 | ||
53 | dns.rst: ../test/dns_test.sh | 53 | dns.rst: ../test/dns_test.sh |
54 | - (cd .. && sh test/dns_test.sh --doc) | pandoc -f markdown --to rst --output $@ | 54 | + (cd .. && sh test/dns_test.sh --doc) > $@ |
55 | 55 | ||
56 | html: dns.rst | 56 | html: dns.rst |
57 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | 57 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html |
test/dns_test.sh
@@ -64,25 +64,40 @@ test_reverse_dns_relay() { | @@ -64,25 +64,40 @@ test_reverse_dns_relay() { | ||
64 | 64 | ||
65 | if [ "$1" = '--doc' ]; then | 65 | if [ "$1" = '--doc' ]; then |
66 | check_hostname() { | 66 | check_hostname() { |
67 | - echo "| ❏ A | $1 | $2 |" | 67 | + echo ' * - A' |
68 | + echo " - $1" | ||
69 | + echo " - ${2}" | ||
68 | } | 70 | } |
69 | check_mx() { | 71 | check_mx() { |
70 | - echo "| ❏ MX | $1 | ${2}. |" | 72 | + echo ' * - MX' |
73 | + echo " - $1" | ||
74 | + echo " - ${2}." | ||
71 | } | 75 | } |
72 | check_reverse_dns() { | 76 | check_reverse_dns() { |
73 | - echo "| ❏ PTR | $1 | ${2}. |" | 77 | + echo ' * - PTR' |
78 | + echo " - $1" | ||
79 | + echo " - ${2}." | ||
74 | } | 80 | } |
75 | header() { | 81 | header() { |
76 | - echo "## $1" | 82 | + echo "$1" |
83 | + echo '==============' | ||
77 | echo | 84 | echo |
78 | - echo '| Tipo | Entrada | Aponta para |' | ||
79 | - echo '|:-----|:------|:----------|' | 85 | + echo '.. list-table::' |
86 | + echo ' :header-rows: 1' | ||
87 | + echo | ||
88 | + echo ' * - Tipo' | ||
89 | + echo ' - Entrada' | ||
90 | + echo ' - Aponta para' | ||
80 | } | 91 | } |
81 | footer() { | 92 | footer() { |
82 | echo | 93 | echo |
83 | } | 94 | } |
84 | ( | 95 | ( |
85 | - echo "# Entradas de DNS necessárias" | 96 | + echo |
97 | + echo "Entradas de DNS necessárias" | ||
98 | + echo '---------------------------' | ||
99 | + echo | ||
100 | + echo | ||
86 | header 'DNS(A)' | 101 | header 'DNS(A)' |
87 | test_dns_web | 102 | test_dns_web |
88 | test_dns_lists | 103 | test_dns_lists |