From ce59653ccd7f68eb563f15e95cc1db2bb39cef34 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 20 Sep 2026 21:29:55 +0200 Subject: [PATCH] Say what selects, name the decision the keyword instances, and cite POSIX's macros --- DATA-LICENSES.md | 2 +- README.md | 13 +++++++------ data-import/loglevel.py | 7 +++---- todo.md | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/DATA-LICENSES.md b/DATA-LICENSES.md index 48491a9..c59a400 100644 --- a/DATA-LICENSES.md +++ b/DATA-LICENSES.md @@ -19,7 +19,7 @@ Every shipped dataset, its source, its licence and the attribution it asks for. | `misc/httpmethod.tsv` | [IANA HTTP Method Registry](https://www.iana.org/assignments/http-methods/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/httpmethod.py` | | `misc/httpstatus.tsv` | [IANA HTTP Status Code Registry](https://www.iana.org/assignments/http-status-codes/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/httpstatus.py` | | `misc/language.tsv` | [datasets/language-codes](https://github.com/datasets/language-codes), the [Library of Congress](https://www.loc.gov/standards/iso639-2/) ISO 639-2 register | [PDDL 1.0](https://opendatacommons.org/licenses/pddl/1-0/) | none required | `data-import/language.py` | -| `misc/loglevel.tsv` | [RFC 5424](https://www.rfc-editor.org/rfc/rfc5424.txt) Table 2, the syslog message severities; keywords from [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/syslog.h.html) `` | facts | none required | `data-import/loglevel.py` | +| `misc/loglevel.tsv` | [RFC 5424](https://www.rfc-editor.org/rfc/rfc5424.txt) Table 2, the syslog message severities; keywords from the [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/syslog.h.html) `` severity macros | facts | none required | `data-import/loglevel.py` | | `misc/mimetype.tsv` | [mime-db](https://github.com/jshttp/mime-db), the IANA media type registry with filename extensions | [MIT](https://github.com/jshttp/mime-db/blob/master/LICENSE) | "Copyright (c) 2014 Jonathan Ong, Copyright (c) 2015-2022 Douglas Christopher Wilson" | `data-import/mimetype.py` | | `misc/port.tsv` | [IANA Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/port.py` | | `misc/protocol.tsv` | [IANA Protocol Numbers](https://www.iana.org/assignments/protocol-numbers/) | [public domain](https://www.iana.org/help/licensing-terms) | none required | `data-import/protocol.py` | diff --git a/README.md b/README.md index e6b1108..d65badf 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,8 @@ a fixture needs one a reader recognises. `misc.loglevel` is the eight syslog severities, rendering the keyword a configuration writes, `err` and `info`, keyed by the numerical code a PRI encodes and selectable by either, so `misc.loglevel[3]` and `misc.loglevel[err]` are one row. -`misc.loglevel.severity` is the name RFC 5424 spells, `Error` beside `err`. +`misc.loglevel.severity` is the name RFC 5424 spells, `Error` beside `err`; it +selects nothing, the code and the keyword do. [`DATA-LICENSES.md`](DATA-LICENSES.md) names each table's source and licence. `misc.timezone` is every zone tzdb gives a shipped territory, from one apiece for most @@ -761,7 +762,7 @@ a minor only adds, and a major is the only release that changes what exists. | Surface | Major | Minor | |---------|-------|-------| | Shipped data | remove or rename a path; change a category's format; remove a value, or change a weight or a repeat; add a reference from one shipped category into another; change a table's key, name, weight or parent column, or remove a row | a path outside a record's columns, a locale, a value in a list, a row | -| Records | remove, rename, retype or add a column; let a column be null | a record, as a new category | +| Records (a table is one) | remove, rename, retype or add a column; let a column be null | a record, as a new category | | Data format | a fence: a spelling `New` rejects that it accepted; a template option, since it reserves a field name | a builtin | | CLI | remove or rename a flag, or change its default; change what an exit code means; change the framing a `--format` writes (header, quoting, statement shape), the `--list` layout, or what an error names | a flag, a format | | Library | change or remove an exported name; raise the lowest supported Go | an exported name, a `With…` option | @@ -1236,10 +1237,10 @@ the Development section below, and who ships a register the four above then draw fejkdata has no business making. - **`misc.loglevel` is a table keyed by the code, rendering POSIX's keyword.** A flat list of names carries neither the code a PRI encodes nor a selector reaching it, and - goal 1 draws the two as one fact. RFC 5424 spells the severity `Informational`, - which no syslog checker accepts, so the shipped spelling is the one - a configuration writes, `info`, and the RFC's name stays the `severity` column. The - code and the keyword take the two selector slots, so `misc.loglevel[Error]` misses. + goal 1 draws the two as one fact. The canonical spelling losing to the one its domain + writes, above, settles the rest: a configuration writes `info`, so RFC 5424's + `Informational` stays the `severity` column, and the code and the keyword hold the + two selector slots. - **`misc.tld` keys carry the leading dot, where other tables key on a bare code.** The register spells a TLD `.se` and `misc.territory.tld` already ships it so, which a bare key would make two spellings of one fact; `{/misc.tld}` also composes onto a diff --git a/data-import/loglevel.py b/data-import/loglevel.py index 838ec15..d9da6d5 100644 --- a/data-import/loglevel.py +++ b/data-import/loglevel.py @@ -3,10 +3,9 @@ data-import/loglevel.py [--source URL_OR_FILE] [--posix URL_OR_FILE] [--cache DIR] [--out FILE] -Table 2 is the whole set, read between the facility table's caption and its own. The -keyword is POSIX's severity macro less its `LOG_` prefix, lowercased, taken in the -order POSIX lists them; each must be a prefix of the severity RFC 5424 numbers alike, -so the two sources pin one pairing. +Every severity in Table 2 ships, paired to POSIX's keywords by the order each source +lists them, which holds only because a keyword prefixes the severity RFC 5424 numbers +alike. """ import argparse import html diff --git a/todo.md b/todo.md index e314bb1..c8d1311 100644 --- a/todo.md +++ b/todo.md @@ -111,8 +111,8 @@ by a `data-import/` script, as README goal 10 asks. and stop there, where a case-insensitive match could name the row that exists, and a table with no `name` column could say it selects by key alone. `misc.tld[se]` misses on the leading dot its keys carry rather than on case, and `misc.loglevel[Error]` - although the table carries `Error` in a column, so the near miss is worth naming - whatever shape it takes. + misses although a column carries `Error`, so the near miss is worth naming whatever + shape it takes. - Let a table column carry a `datatype`, so `--format json` writes `"safe": true` and `--format sql` a boolean rather than the text `'true'`. Today only a JSON field takes one, so `misc.httpmethod`'s booleans are typed in Go and text