Netman

From Netsoc Wiki
Jump to: navigation, search

Netman is a system that takes this wiki and translates it into man pages. https://github.com/netsoc/netman/blob/master/mwsed.sh - for the curious

For users

netman allows you to access wiki pages directly from the terminal. Just type man page_name into your shell, and you'll be greeted by an ascii version of the page, just like any other man page. Note that multi word pages are separated by underscores, so Spoon Hardware becomes man spoon_hardware. Also, man is not case sensitive.

If you find yourself trying to access a wiki page to access a wiki page whose name already exists (e.g mutt), you can do man 9 mutt to give the wiki page precedence.

For admins

It's just a simple shell script.

It is set up like so: There is a user on cubewww called netman whose home folder contains the git repo and the script. There is a crontab entry in /etc/crontab.daily/netman-update. /srv/subdomains/mediawiki/git is set up to do git "smart HTTP", according to http://www.toofishes.net/blog/git-smart-http-transport-lighttpd/

All other servers use the man.git repo (https://wiki.netsoc.tcd.ie/git/man.git) to git pull into /usr/local/man/man9 The script to do this is located in /etc/cron.daily/netman-update

I used section 9, as it was guaranteed to be unused. If this ever becomes a problem it can be fixed by editing one line in the script.