refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders

validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
This commit is contained in:
randogoth 2026-10-13 12:29:23 +03:00
parent 5fa8708bd1
commit 060d4e00fd
90 changed files with 1290 additions and 287 deletions

View file

@ -8,18 +8,21 @@ SPEC_DESCRIPTION = The Mews Profile specification, version 0.1.
site:
rm -rf build
mkdir -p build/spec build/dtd
cp site/index.html site/check.html build/
cp mews-0.1.css build/mews-0.1.css
cp mews-0.1.css build/spec/mews-0.1.css
cp dtd/mews-0.1.dtd dtd/xhtml-mobile12.dtd build/dtd/
uv run --script md2mews.py doc/SPEC.md -o build/spec/0.1.html --lang en \
--variant mews-cool --description "$(SPEC_DESCRIPTION)"
uv run mewslint.py --quiet build/index.html build/check.html \
cd site && uv run pelican content
cp site/output/index.html site/output/check.html build/
cp site/output/mews-0.1.css build/mews-0.1.css
cp spec/mews-0.1.css build/spec/mews-0.1.css
cp spec/mews-0.1.dtd spec/xhtml-mobile12.dtd build/dtd/
uv run --script quickstart/md2mews.py spec/SPEC.md -o build/spec/0.1.html \
--lang en --variant mews-cool --description "$(SPEC_DESCRIPTION)"
uv run mewslint --quiet build/index.html build/check.html \
build/spec/0.1.html
@echo "site built in build/"
test:
uv run --script dtd/check_dtd.py
uv run --script spec/check_dtd.py
cd validator && uv run pytest -q
cd directory && uv run pytest -q
uv run pytest -q
lint:
@ -27,4 +30,4 @@ lint:
uv run ruff format --check .
clean:
rm -rf build
rm -rf build site/output