Source code of manned.org https://manned.org/
Find a file
Yorhel cd5d2c6a20 Remove encodings from "locales" table + delete incorrect locales
The frontend always stripped off the encodings already, so no point in
keeping that in the DB indices. The full locale was extracted from the
filename, which we still keep, so no information is list.

SQL "migration" script:

  BEGIN;
  CREATE INDEX files_tmp_locale ON files (locale);

  INSERT INTO locales (locale) VALUES ('pl_PL'), ('is_IS'), ('ko_KR');

  WITH obs(id, locale, lang) AS (
    SELECT id, locale, regexp_replace(locale, '^([^.]+)\..+$', '\1') FROM locales WHERE locale LIKE '%.%'
     UNION ALL
    SELECT id, locale, '' FROM locales WHERE locale LIKE 'node%' OR locale = 'common'
  ), rep(old, new) AS (
    SELECT o.id, x.id FROM obs o LEFT JOIN locales x ON x.locale = o.lang
  ), upd AS (
    UPDATE files SET locale = new FROM rep WHERE locale = old
  ) DELETE FROM locales WHERE id IN(SELECT id FROM obs);

  DROP INDEX files_tmp_locale;

  COMMIT;
2024-05-01 17:04:09 +02:00
indexer Remove encodings from "locales" table + delete incorrect locales 2024-05-01 17:04:09 +02:00
lib/ManUtils Drop grog(1) in favor of 'groff -mandoc' + two regexes 2024-04-28 15:08:00 +02:00
util SQL: Add packages.c_hasman cache to speed up package listings 2024-04-29 21:15:40 +02:00
web Make the Rust garbage compile again 2021-12-11 11:53:26 +01:00
www Remove encodings from "locales" table + delete incorrect locales 2024-05-01 17:04:09 +02:00
.gitignore Index NetBSD 2024-04-14 11:35:04 +02:00
COPYING Switch to AGPL license 2021-12-13 17:56:29 +01:00
Makefile A few more HTML conversion improvements 2017-01-15 20:27:16 +01:00
README.md Make the Rust garbage compile again 2021-12-11 11:53:26 +01:00
schema.sql SQL: Add packages.c_hasman cache to speed up package listings 2024-04-29 21:15:40 +02:00

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.