Online PDF of the Linux man-pages @ git HEAD
Alejandro Colomar
maintainerHi,
I've set up a githooks(5) to generate a PDF book, running the script contributed by gropdf(1)'s Deri James from within the hook, every time I git push the main branch to my server.
You can find the book here:
<https://www.alejandro-colomar.es/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf>
The pages there don't have a "last modified" date, nor a version. They are pristine from git HEAD, so they contain the "(date)" and "Linux man-pages (unreleased)" placeholders. The file is suffixed -HEAD to indicate that it is the state of git HEAD (or was, when downloaded; if you don't remove it soon without renaming, then you're on your own).
I'm not sure if I should fill the placeholders with the date and version, by running make dist, and then generating the book from the generated tarball. Since that's more work for the server, I didn't do it, but it probably shouldn't be much work, since make dist reuses files (which would have the effect that each page would show a different version, at the last commit that modified the page). For a HEAD PDF, I don't think that's problematic. If anyone would be interested in that, feel free to ask for it.
The name of the file is -HEAD, and not -<version>, to have a more stable URI. I don't think we should be changing the URI for every commit. Any opinions?
In case anyone is curious, here's how:
$ cat hooks/post-update #!/bin/sh
test "$1" = "refs/heads/main" || exit 0; cd /srv/src/alx/linux/man-pages/man-pages/; unset $(git rev-parse --local-env-vars); git fetch srv >/dev/null; git reset srv/main --hard >/dev/null; sh <<__EOF__ & </dev/null \ scripts/LinuxManBook/build.sh 2>/dev/null \ | sponge /srv/www/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf \ >/dev/null 2>&1 __EOF__
BTW, I'm having trouble making git(1) not wait for it to finish, so if you have any ideas, they're welcome!
Cheers,
Alex
Signature · 1 line
<https://www.alejandro-colomar.es/>
Quoted 9 lines · Alejandro Colomar
Hi,
I've set up a githooks(5) to generate a PDF book, running the script contributed by gropdf(1)'s Deri James from within the hook, every time I
git pushthe main branch to my server.You can find the book here:
<https://www.alejandro-colomar.es/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf>
That's great, will be very handy to have that to see the git version presented as a PDF.
Chrome said the connection is not secure, probably "Let's Encrypt" would give a free SSL certificate for your server.
With kind regards, Jonny
Alejandro Colomar
maintainerHi Jonny,
Quoted 7 lines · Jonny Grant
Quoted 3 lines
You can find the book here:
<https://www.alejandro-colomar.es/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf>
That's great, will be very handy to have that to see the git version presented as a PDF.
Chrome said the connection is not secure, probably "Let's Encrypt" would give a free SSL certificate for your server.
That's expected. I documented it here:
<https://www.alejandro-colomar.es/ssl>
Quoted 1 line
With kind regards, Jonny
Cheers,
Alex
Signature · 1 line
<https://www.alejandro-colomar.es/>