Source code of manned.org https://manned.org/
Find a file
Yorhel 659b7afece Implement man selection algorithm in SQL + fix various related bugs
Man selection has to be performed over several thousand rows in some
cases. Loading all those in Perl and then doing the selection isn't very
efficient[1]. The getman() implementation was also buggy: The comparison
function used to determine which man page should be preferred was not
associative[2], and the result thus depended on the order in which the
man pages were compared. This resulted in some wrong selections in some
cases.

While I was at it, I also made the selection more strict:
- /man/unknown-hash would previously ignore the hash and just select
  whatever man page. Now it results in a 404.
- Same with /man.unknown-section
- /man.section/hash is now disallowed, it's either /man.section or
  /man/hash.

1) Note that all possible man pages are currently still loaded into Perl
anyway, because the ugly navigation menu on the right needs them. I plan
to revamp that entire menu to be more efficient and usable.

2) Initially I wrote the SQL implementation in a similar fashion to the
Perl implementation, and ended up with the same bug. I wasted more than
a day before I finally got to the current CTE query.
2016-10-09 09:10:40 +02:00
lib/ManUtils Various changes/fixes, 3 new distro versions 2015-04-28 08:27:29 +02:00
sql Implement man selection algorithm in SQL + fix various related bugs 2016-10-09 09:10:40 +02:00
util Add FreeBSD 9.3 2016-10-08 00:18:08 +02:00
www Implement man selection algorithm in SQL + fix various related bugs 2016-10-09 09:10:40 +02:00
.gitignore Added .gitignore to ignore some autogenerated ManUtils stuff 2012-08-14 20:39:04 +02:00
COPYING Add COPYING, README and link to the public git repo 2012-08-15 18:22:49 +02:00
Makefile Various changes/fixes, 3 new distro versions 2015-04-28 08:27:29 +02:00
README README: Let's not forget the AnyEvent library 2012-08-17 13:12:11 +02:00

The Manned.org Source Code
--------------------------

  This repository holds the source code of Manned.org. For a description of the
  site, check out http://manned.org/info/about.
  
  Ironically, documentation about how things work is completely lacking.



Requirements

  General:
    perl: A somewhat recent version (no idea which, due to my XS usage)
    postgresql: Also a somewhat recent version
    DBI
    DBD::Pg

  www/: (Website)
    TUWF
    JSON::XS
    AnyEvent

  util/: (DB updating and package synchronisation stuff)
    bash (probably)
    curl
    psql
    GNU tar
    gzip, bzip2, xz
    Compress::Raw::Bzip2
    Compress::Raw::Lzma
    GNU ar (For Debian)



Contact

  contact@manned.org