public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* Online PDF of the Linux man-pages @ git HEAD
@ 2023-11-24 17:11 Alejandro Colomar
  2023-11-25  0:47 ` Jonny Grant
  0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Colomar @ 2023-11-24 17:11 UTC (permalink / raw)
  To: linux-man; +Cc: Jonny Grant, Elliott Hughes, Deri James

[-- Attachment #1: Type: text/plain, Size: 2004 bytes --]

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 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

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Online PDF of the Linux man-pages @ git HEAD
  2023-11-24 17:11 Online PDF of the Linux man-pages @ git HEAD Alejandro Colomar
@ 2023-11-25  0:47 ` Jonny Grant
  2023-11-25 10:22   ` Alejandro Colomar
  0 siblings, 1 reply; 3+ messages in thread
From: Jonny Grant @ 2023-11-25  0:47 UTC (permalink / raw)
  To: Alejandro Colomar, linux-man; +Cc: Elliott Hughes, Deri James



On 24/11/2023 17:11, Alejandro Colomar wrote:
> 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 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>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Online PDF of the Linux man-pages @ git HEAD
  2023-11-25  0:47 ` Jonny Grant
@ 2023-11-25 10:22   ` Alejandro Colomar
  0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Colomar @ 2023-11-25 10:22 UTC (permalink / raw)
  To: Jonny Grant; +Cc: linux-man, Elliott Hughes, Deri James

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

Hi Jonny,

On Sat, Nov 25, 2023 at 12:47:51AM +0000, Jonny Grant wrote:
> > 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>

> With kind regards, Jonny

Cheers,
Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-25 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24 17:11 Online PDF of the Linux man-pages @ git HEAD Alejandro Colomar
2023-11-25  0:47 ` Jonny Grant
2023-11-25 10:22   ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox