Skip to content

About

Judgment Protocol reader, prototype v0.1.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Judgment Protocol reader, prototype v0.1

Python 3, standard library only. Fetches each approved participant's page, extracts the entries, validates them against the v2.0 field list, hashes them, stores them in SQLite, and writes a static registry page plus one JSON export with its hash beside it.

Run

python3 reader.py demo                      # builds demo_site/ from built-in sample pages
python3 -m unittest discover -s tests       # offline tests
python3 reader.py run --participants participants.json --db store.sqlite --out site

Upload the contents of site/ (index.html, export.json, export.json.sha256) to any static host. Run daily from cron or a scheduled GitHub Actions workflow.

participants.json is the registry: a list of {orcid, name, url, added, status, kind}. Only status: "approved" rows are fetched, so hand approval is just editing that word. kind is page (end marker required) or social (end marker optional).

Rules built in

  • Markers #JudgmentTensor / #JudgmentTensorEnd and the earlier #beierTensor / #BeierTensorEnd (also the judgement spelling), case-insensitive, matched as whole tokens. Both names are accepted in any pairing, with no note or warning.
  • Old-style wrappers #beierprotocol, #judgmentprotocol and #judgementprotocol are also read: the same tag opens and closes the entry, and it must stand alone on its line. The entry is kept and carries a note naming the current markers.
  • Identity is read forgivingly: a bare ORCID takes its name from the registry row for the page, and a name and ORCID written another way (Name ORCID, Name, ORCID ...) is read as Name+ORCID. Each case adds a note. The ORCID checksum is still enforced.
  • Names are checked against orcid.org (the public API, one request per ORCID per run): a missing name is filled in from the ORCID record, and a written name that disagrees with the record gets a name mismatch note. Neither is an error. --no-orcid-lookup switches this off.
  • One name: value per line; names case-insensitive; unknown names kept as free lines.
  • Required: struck, transmitted, identity, nucleus. Present as a line, with a typed reason if empty: input, method, scaling, transmit, output, and also engagement and substrate (human is read as person). Optional: links, data, seq.
  • Times: minute, second or centisecond precision as written, nothing padded; finer than a centisecond is truncated; transmitted is checked against struck at the coarser precision.
  • Identity: Name+ORCID (format and checksum checked), key (institution: X), anonymous (institution: X).
  • Hash: SHA-256 of the text between the markers, markers excluded, LF line endings, edges trimmed.
  • Non-conforming entries are kept and shown with the reasons. A changed entry keeps both versions. A failed fetch keeps everything already stored.
  • Output has no ranking and no scores. An entry that links to another is shown beside the target with its method line.

Known limits of v0.1

  • Archive: the earliest capture of the page is recorded, which shows when the page was first captured, not that a given entry was on it then. To prove a strike time the reader should look for the earliest capture containing the entry's text. Not built.
  • The Archive and live-fetch code has not run against the real network. It is written to the Archive's CDX interface and to robots.txt, but only the parsing, validation, storage and output are tested.
  • ORCID existence and control are not checked online.
  • A social post that flattens line breaks into one line is not reconstructed.
  • No registration form. Rows are added by editing participants.json.

About

Judgment Protocol reader, prototype v0.1.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages