asw-v01: archive deferred content (packs, site, lab, legacy examples)
- 2.1: packs/ -> archive/packs/ - 2.2: site/ -> archive/site/ - 2.3: src/lab/ -> archive/lab/ - 2.4: examples/ -> archive/examples-legacy/ (SSI-based)
This commit is contained in:
parent
416fe2f180
commit
e47a9f4401
173 changed files with 11 additions and 5 deletions
35
archive/packs/python/README.md
Normal file
35
archive/packs/python/README.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# ASW Python Dev Server Pack
|
||||
|
||||
Drop-in replacement for `python -m http.server` with ASW-styled error pages and directory listings.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Copy to your project
|
||||
cp asw_server.py /path/to/project/
|
||||
|
||||
# Run it
|
||||
python asw_server.py # port 8000
|
||||
python asw_server.py 3000 # custom port
|
||||
python asw_server.py 3000 /dir # custom port + custom directory
|
||||
```
|
||||
|
||||
## What you get
|
||||
|
||||
- **ASW-styled error pages** for all HTTP error codes (403, 404, 500, etc.)
|
||||
- **ASW-styled directory listings** replacing the browser-default autoindex
|
||||
- **Auto port fallback** — if 8000 is busy, tries 8001, 8002… up to 10 attempts
|
||||
- **Inline styles** — no external CSS dependency, works even when serving offline
|
||||
|
||||
## How it works
|
||||
|
||||
`ASWHandler` subclasses `SimpleHTTPRequestHandler` and overrides:
|
||||
- `send_error()` — returns ASW-styled HTML instead of the default ugly page
|
||||
- `list_directory()` — returns a clean table layout instead of raw `<pre>`
|
||||
|
||||
Styles are inlined directly in the response — no link to `asw.css` required.
|
||||
The colour scheme matches the full ASW dark theme.
|
||||
|
||||
## No dependencies
|
||||
|
||||
Just Python 3 standard library. Nothing to install.
|
||||
Loading…
Add table
Add a link
Reference in a new issue