From b7ed4bece0b8e04f4a8bb773f83093d2cf9c7cf3 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 11 May 2015 18:05:01 -0300 Subject: [PATCH] Using rst instead of markdown for dns tables --- docs/Makefile | 2 +- test/dns_test.sh | 29 ++++++++++++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index b4eca34..dd24fc4 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -51,7 +51,7 @@ clean: rm -f dns.rst dns.rst: ../test/dns_test.sh - (cd .. && sh test/dns_test.sh --doc) | pandoc -f markdown --to rst --output $@ + (cd .. && sh test/dns_test.sh --doc) > $@ html: dns.rst $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/test/dns_test.sh b/test/dns_test.sh index ef6a2b7..deb9f39 100644 --- a/test/dns_test.sh +++ b/test/dns_test.sh @@ -64,25 +64,40 @@ test_reverse_dns_relay() { if [ "$1" = '--doc' ]; then check_hostname() { - echo "| ❏ A | $1 | $2 |" + echo ' * - A' + echo " - $1" + echo " - ${2}" } check_mx() { - echo "| ❏ MX | $1 | ${2}. |" + echo ' * - MX' + echo " - $1" + echo " - ${2}." } check_reverse_dns() { - echo "| ❏ PTR | $1 | ${2}. |" + echo ' * - PTR' + echo " - $1" + echo " - ${2}." } header() { - echo "## $1" + echo "$1" + echo '==============' echo - echo '| Tipo | Entrada | Aponta para |' - echo '|:-----|:------|:----------|' + echo '.. list-table::' + echo ' :header-rows: 1' + echo + echo ' * - Tipo' + echo ' - Entrada' + echo ' - Aponta para' } footer() { echo } ( - echo "# Entradas de DNS necessárias" + echo + echo "Entradas de DNS necessárias" + echo '---------------------------' + echo + echo header 'DNS(A)' test_dns_web test_dns_lists -- libgit2 0.21.2