diff --git a/DNS-API-Structural-Info-description.md b/DNS-API-Structural-Info-description.md index 1caf0c2..3245664 100644 --- a/DNS-API-Structural-Info-description.md +++ b/DNS-API-Structural-Info-description.md @@ -80,4 +80,29 @@ Site: github.com/joohoi/acme-dns ' ``` -See the commit with many samples https://github.com/acmesh-official/acme.sh/commit/6b7b5caf54ea0b45508e158db3748d00f48672f2#diff-defdf80606e9123d8383965fa2bd6281a2567dc76c7d246a5244b41ec43429feR3 \ No newline at end of file +See the commit with many samples https://github.com/acmesh-official/acme.sh/commit/6b7b5caf54ea0b45508e158db3748d00f48672f2#diff-defdf80606e9123d8383965fa2bd6281a2567dc76c7d246a5244b41ec43429feR3 + +## Parsing + +Here a script (dash and ash complaint) to generate a list of all infos: +```sh +#!/bin/ash +for f in ./dnsapi/dns_*.sh +do + filename=$(basename -- "$f") + dns_api="${filename%.*}" + echo "$dns_api" + dns_api_info_var="${dns_api}_info" + # shellcheck source=./dnsapi/dns_*.sh + . "$f" + info="" + eval info=\$$dns_api_info_var + echo "$info" +done +``` + +Now execute it and stored result to info.txt file: + + sh ./dns_info.sh > info.txt + +The resulted file has size of 39Kb bytes and gzipped it's about 10Kb.