Skip to content

Commit

Permalink
More DT/DD tweaking for Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Trenholme committed Dec 19, 2022
1 parent c0b64fd commit d20c5de
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 64 deletions.
26 changes: 14 additions & 12 deletions doc/en/markdown/askmara.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ zone files that **maradns** uses).

# OPTIONS

`-t `If this is present, the following argument is the askmara
timeout, in seconds. Note that **askmara** can not both have a
user-defined timeout and verbose output. `-v `If this is set,
**askmara** will verbosely output the complete reply that the server
sent. Note that this verbose output is not csv2-compatible. `-n `If
this is set, **askmara**, when sending out a query, will not request
DNS recursion; in other words, askmara will request that the remote DNS
server not contact other DNS servers to answer the query in question.
`query `dns record to be queried. The query has two sections: The type
`-t`If this is present, the following argument is the askmara timeout,
in seconds. Note that **askmara** can not both have a user-defined
timeout and verbose output.
`-v`If this is set, **askmara** will verbosely output the complete
reply that the server sent. Note that this verbose output is not
csv2-compatible.
`-n`If this is set, **askmara**, when sending out a query, will not
request DNS recursion; in other words, askmara will request that the
remote DNS server not contact other DNS servers to answer the query in
question.
`query`dns record to be queried. The query has two sections: The type
of record we desire, and the hostname we want this record for.

The type of query can have two forms: A one-letter mnemonic, or a
Expand Down Expand Up @@ -51,9 +53,9 @@ Askmara supports a handful one-letter mnemonics, as follows:

**T** signifies that we want a TXT RR

**Z** signifies that we want to ask for all RRs. `server `IP address of
the dns server to be queried. If no server is given, askmara will query
127.0.0.1.
**Z** signifies that we want to ask for all RRs.
`server`IP address of the dns server to be queried. If no server is
given, askmara will query 127.0.0.1.

# EXAMPLES

Expand Down
19 changes: 10 additions & 9 deletions doc/en/markdown/csv1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ function as long as I am MaraDNS' maintainer.

# SPECIAL CHARACTERS

`| `This delimits fields `# `This signifies a comment. Lines
starting with this are ignored, otherwise it has no significance `%
`This, in domain names, signifies that the rest of the domain name
should be the name of this zone `* `This is translated to mean "any
host name that otherwise does not resolve". It must be at the beginning
of a domain name. `\ `This is used as an escape character, either to
escape octal values such as '\045' for %, or to escape the '%'
character so it has no special meaning, or to escape the backslash
character.
`|`This delimits fields
`#`This signifies a comment. Lines starting with this are ignored,
otherwise it has no significance
`%`This, in domain names, signifies that the rest of the domain name
should be the name of this zone
`*`This is translated to mean "any host name that otherwise does not
resolve". It must be at the beginning of a domain name.
`\`This is used as an escape character, either to escape octal values
such as '\045' for %, or to escape the '%' character so it has no
special meaning, or to escape the backslash character.

# NOTES ON PROCESSING

Expand Down
41 changes: 21 additions & 20 deletions doc/en/markdown/csv2_txt.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,27 @@ backslashes only have significance *outside* of quoted text; if they
are placed inside single quotes, they are not interpreted and result in
a literal backslash being added to the resource record data.

The following characters can be backslashed: `' `When backslashed,
the adds a literal quote to the resource record. `whitespace `When any
whitespace is backslashed (space, newline, cr, and tab), this indicates
that the record has not ended, and that more data for this resource
will follow. This also allows comments to be placed in TXT and RAW
resource records. What happens is that the backslash indicates that any
whitespace characters (space, tab, carriage return, and line feed) are
to be ignored until the next non-whitespace character that is not a #
(hash). If a # is seen, this indicates that we ignore any and all
characters until the next carriage return or line feed, and continue to
ignore everything until the next non-whitespace character. See the
section on multi-line and commented records for examples. `0123 `When a
number between 0 and 3 is backslashed, this indicates the beginning of
a three-digit octal number. `x `When an x is backslashed, this
indicates the beginning of a two-digit hexadecimal number. Note
that, with the exception of the single quote, the backslash character
is *not* used to remove the meta-significance of a given character. In
particular, unlike other environments, it is not possible to backslash
spaces. Spaces can be represented either as ' ' in quotes, \x20, or as
\040.
The following characters can be backslashed:
`'`When backslashed, the adds a literal quote to the resource record.
`whitespace`When any whitespace is backslashed (space, newline, cr, and
tab), this indicates that the record has not ended, and that more data
for this resource will follow. This also allows comments to be placed
in TXT and RAW resource records. What happens is that the backslash
indicates that any whitespace characters (space, tab, carriage return,
and line feed) are to be ignored until the next non-whitespace
character that is not a # (hash). If a # is seen, this indicates that
we ignore any and all characters until the next carriage return or line
feed, and continue to ignore everything until the next non-whitespace
character. See the section on multi-line and commented records for
examples.
`0123`When a number between 0 and 3 is backslashed, this indicates the
beginning of a three-digit octal number.
`x`When an x is backslashed, this indicates the beginning of a
two-digit hexadecimal number. Note that, with the exception of
the single quote, the backslash character is *not* used to remove the
meta-significance of a given character. In particular, unlike other
environments, it is not possible to backslash spaces. Spaces can be
represented either as ' ' in quotes, \x20, or as \040.

Here are some examples of backslashed data. In this example, we see
backslash sequences being used to store non-UTF-8 hi-bit data:
Expand Down
27 changes: 16 additions & 11 deletions doc/en/markdown/mararc.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,16 @@ This option also allows people who do not use the duende tool to view
human-readable timestamps. This option only allows timestamps in GMT,
due to issues with showing local times in a chroot() environment.

This can have the following values: `0 `The string "Timestamp"
followed by a UNIX timestamp `1 `Just the bare UNIX timestamp `2 `A GMT
timestamp in the Spanish language `3 `A (hopefully) local timestamp in
the Spanish language `4 `A timestamp using asctime(gmtime()); usually
in the English language `5 `No timestamp whatsoever is shown (this is
the best option when maradns is invoked with the `duende` tool). `6
`ISO GMT timestamp is shown `7 `ISO local timestamp is shown
This can have the following values:
`0`The string "Timestamp" followed by a UNIX timestamp
`1`Just the bare UNIX timestamp
`2`A GMT timestamp in the Spanish language
`3`A (hopefully) local timestamp in the Spanish language
`4`A timestamp using asctime(gmtime()); usually in the English language
`5`No timestamp whatsoever is shown (this is the best option when
maradns is invoked with the `duende` tool).
`6`ISO GMT timestamp is shown
`7`ISO local timestamp is shown

On systems where time_t is 32-bit, MaraDNS will always act as if
`timestamp_type` has a value of 5, never showing a timestamp. This is
Expand All @@ -683,10 +686,12 @@ The default value for this variable is 5.

verbose_level: The number of messages we log to stdout

This can have five values: `0 `No messages except for the legal
disclaimer and fatal parsing errors `1 `Only startup messages logged
(Default level) `2 `Error queries logged `3 `All queries logged `4 `All
actions adding and removing records from the cache logged
This can have five values:
`0`No messages except for the legal disclaimer and fatal parsing errors
`1`Only startup messages logged (Default level)
`2`Error queries logged
`3`All queries logged
`4`All actions adding and removing records from the cache logged

The default value for this variable is 1.

Expand Down
18 changes: 10 additions & 8 deletions doc/en/markdown/mqhash.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ immune to even a very determined attacker.

## OPTIONS

`-n `It is wise to periodically change ones password on sites that
one uses frequently. This allows one to continue to have passwords
after the four initial passwords have already been used; this can have
a value between 2 and 9. `-s `The normal mode for mqhash: To create a
secure password based on both the contents of `~/.mhash_prefix` and the
final argument to mqhash. `-u `This will generate a cryptographic hash
out of the final argument sent to mqhash. This is useful when one does
not need a secure password, but just wants to hash a short string.
`-n`It is wise to periodically change ones password on sites that one
uses frequently. This allows one to continue to have passwords after
the four initial passwords have already been used; this can have a
value between 2 and 9.
`-s`The normal mode for mqhash: To create a secure password based on
both the contents of `~/.mhash_prefix` and the final argument to
mqhash.
`-u`This will generate a cryptographic hash out of the final argument
sent to mqhash. This is useful when one does not need a secure
password, but just wants to hash a short string.

# LEGAL DISCLAIMER

Expand Down
4 changes: 2 additions & 2 deletions doc/en/markdown/zoneserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ parameters.

# OPTIONS

`-f `Specifies the location of the configuration file. MaraDNS
uses the same configuration file for both the main dns server and the
`-f`Specifies the location of the configuration file. MaraDNS uses the
same configuration file for both the main dns server and the
zoneserver.

# CONFIGURATION FILE FORMAT
Expand Down
4 changes: 2 additions & 2 deletions tools/ej/ej2md
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ out = out:gsub(mc("<h1%s*>%s*"),"\n\n# ") -- Level 1 headings start
out = out:gsub(mc("<h2%s*>%s*"),"\n\n## ") -- Level 2 headings start
out = out:gsub(mc("</?h1%s*>%s*"),"\n\n") -- Level 1 headings end
out = out:gsub(mc("</?h2%s*>%s*"),"\n\n") -- Level 2 headings end
out = out:gsub(mc("<dt%s*>%s*"),"`") -- DT tags
out = out:gsub(mc("<dd%s*>%s*"),"`") -- DD tags
out = out:gsub(mc("<dt%s*>%s*"),"\n`") -- DT tags
out = out:gsub(mc("%s*<dd%s*>%s*"),"`") -- DD tags
out = out:gsub(mc("</dt%s*>%s*"),"\n\n") -- DT tags
out = out:gsub(mc("</dd%s*>%s*"),"\n\n") -- DT tags
-- Tables, used by csv1.ej
Expand Down

0 comments on commit d20c5de

Please sign in to comment.