Repository navigation
longecho 0.6.0
Added
- A durable format list,
longecho.formats.FORMATS. Each entry records its
extensions, media type (plus common aliases such asaudio/x-wav),
category, the readers that can open it (standard tool, web browser, text
editor), and the reason it qualifies under the Library of Congress
sustainability factors, which are now the written criteria for the list.
DURABLE_EXTENSIONSandDURABLE_FORMAT_CATEGORIESare derived from it and
keep working.is_durable_mimetype()answers for tools that record media
types (any case, parameters allowed). - New durable formats:
.pdf,.epub,.eml,.mbox,.svg,.tif,
.tiff,.wav,.flac,.mp3,.ogg,.opus,.mp4,.webm, with new
Mail, Audio, and Video categories. A directory holding only one of these
plus a README is now compliant. - Compliance warnings, which never change the verdict or exit code:
ComplianceResult.warningsandEchoSource.warningslist
ComplianceWarning(kind, message, paths)for files that are neither in a
durable format nor UTF-8 text (grouped by extension), SQLite databases with
a non-empty-walor-journalsidecar, and directories more than two
levels down that nothing inspected. Telling text from binary reads the
first 4 KB of a file whose extension is not on the list; that is the only
place longecho reads inside a data file, and warnings are computed only
when something asks for them, soquerywithout--jsonreads no file
contents.checkprints warnings (--verbosenames the files);
query --jsonincludes them when present. check --verboseshows which readers can open the source's own files.longecho formatsshows each format's readers and reason;
longecho formats --jsonprints the list as data.EchoSource.files: every file a source owns, durable or not.- Inline previews in the generated site for images, audio, and video that
browsers play, using the browser's own elements (lazy-loaded).
Changed
- Behavior change: durable files inside
site/or tool folders
(node_modules,venv,dist, and the like) no longer make a directory
compliant. A viewer is not the data. Durable files in nested sources still
count. - Behavior change: lowercase
readme.mdandreadme.txtno longer count
as their own data file, the same asREADME.mdalways has. - The generated site lists every file a source owns (within two levels,
minus SQLite sidecars), marking the onescheckwarns about, instead of
only the durable ones. - README HTML in the site is sanitized by an allowlist (an
HTMLParserthat
keeps known tags, attributes, and URL schemes) instead of regular
expressions. - The degradation ladder is one table that pairs each kind of reader with
the formats it can open, with a new "standard tools" rung. It replaces the
separate format ladder of the early essays. - The top-level README is the archive's "start here" note; the spec now says
so and describes what it should contain.START_HERE.txtfrom the early
essays is retired. longecho specfits 80 columns and covers warnings and the description
cascade.should_skip_directoryandSKIP_DIRECTORIESlive inchecker.py
(still importable fromdiscovery).
Fixed
- Links in the generated site were computed relative to the archive root,
but the page lives insite/, so every "Data Files" link and every "Open
interactive viewer" link pointed intosite/and returned not found.
Links are now relative to the page and percent-encoded, so names with
spaces,#,?,%, or a colon work and can never become a URL scheme.
A site written outside the archive, or a source that is a symlink to
somewhere else, links by absolutefile://URI. - An entity-encoded
javascript:link in a README (javascript:) got
past the old sanitizer. longecho build --outputpointing at the archive itself, or at a
directory containing it, overwrote that directory's README. It is now
refused, with or without--force.- Building twice into the same custom
--outputinside the archive turned
the first build into a sub-source of the second. - Filenames and README text containing Rich markup such as
[red]were
rendered as styles by the CLI, and unbalanced markup crashedcheck.
They are now printed literally.
Install: pip install longecho==0.6.0. Docs: https://queelius.github.io/longecho/