Source code of manned.org
https://manned.org/
Going from average ~100ms to ~10ms or so. The previous query had a tendency to be much slower sometimes, let's see if this cache also takes care of those outliers. Migration script: ALTER TABLE packages ADD COLUMN c_hasman boolean NOT NULL DEFAULT FALSE; DROP INDEX packages_system_name_key; CREATE UNIQUE INDEX packages_system_name_key ON packages (system, name) INCLUDE (id, c_hasman, dead); UPDATE packages SET c_hasman = NOT c_hasman WHERE c_hasman <> EXISTS(SELECT 1 FROM package_versions pv WHERE pv.package = packages.id AND EXISTS(SELECT 1 FROM files f WHERE f.pkgver = pv.id)); |
||
|---|---|---|
| indexer | ||
| lib/ManUtils | ||
| util | ||
| web | ||
| www | ||
| .gitignore | ||
| COPYING | ||
| Makefile | ||
| README.md | ||
| schema.sql | ||
The Manned.org Source Code
This repository holds the source code of Manned.org. For a description of the site, check out https://manned.org/info/about.
Ironically, documentation about how things work is completely lacking.
Requirements
- perl: A somewhat recent version (no idea which, due to my XS usage)
- postgresql: Also a somewhat recent version
- rust: Version who-knows-which
Web front-end
- AnyEvent
- DBD::Pg
- DBI
- JSON::XS
- SQL::Interp
- TUWF
Man page indexer
- curl
- psql
File structure
- indexer/ -> The Rust program that scans package repositories for updates, fetches new packages and extracts the man pages.
- lib/ManUtils/ -> Perl/XS helper module to format man pages into HTML (uses web/).
- sql/ -> Database schema & updates.
- util/ -> Cron job and scripts to run indexer/ on the right repositories.
- web/ -> Badly named Rust library to convert man pages into HTML.
- www/ -> The web front-end.