pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ben Hancock <lists@benghancock.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Local postgres manual
Date: Fri, 3 Nov 2023 21:59:38 -0400
Message-ID: <ZUWlirLLtqgIWMHa@momjian.us> (raw)
In-Reply-To: <3333527.1699041485@sss.pgh.pa.us>
References: <c1e0067d-ab06-2bde-2ea9-9ace478a1191@benghancock.com>
	<ZUT2sbhj0g_LnVdu@momjian.us>
	<2ad88fa8-e0c7-b678-232b-30af59448133@benghancock.com>
	<3333527.1699041485@sss.pgh.pa.us>

On Fri, Nov  3, 2023 at 03:58:05PM -0400, Tom Lane wrote:
> Ben Hancock <lists@benghancock.com> writes:
> > I will say that, as the manual is quite large, a local GNU Info version 
> > would be great to be able to traverse different sections, etc, more 
> > easily. If that doesn't exist already, I wonder if a tool like `pandoc` 
> > could be employed to generate that.
> 
> That's exactly what the postgres.txt file Bruce mentioned is.
> 
> # single-page text
> postgres.txt: postgres.html
> 	$(PANDOC) -t plain -o $@ $<
> 
> These variant doc forms aren't terribly well (or at all) documented,
> but the doc/src/sgml Makefile knows how to create a number of them.

I tried:

	pandoc -t texinfo -o postgresql.info postgres.html

but couldn't figure out how to access it via 'info'.  I was able to get
the man page looking good with:

	make postgres.html &&
	pandoc -t man -o postgresql.1 postgres.html &&
	sed -n '1,${p;/^\.SH "NAME"/q}' /u/postgres/man/man1/postgres.1 |
	        sed 's/POSTGRES/POSTGRESQL/' > /u/postgres/man/man1/postgresql.1 &&
	cat postgresql.1 >> /u/postgres/man/man1/postgresql.1 &&
	rm postgresql.1

I pulled the formatting from postgres.1;  without that the formatting
was 80-column and poor.  I think it doesn't define .TH and that makes it
look bad.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.





view thread (9+ messages)

Message-ID: <ZUWlirLLtqgIWMHa@momjian.us>
Permalink:  ../ZUWlirLLtqgIWMHa@momjian.us/
Also on:    postgresql.org/message-id/ZUWlirLLtqgIWMHa@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, lists@benghancock.com
  Subject: Re: Local postgres manual
  In-Reply-To: <ZUWlirLLtqgIWMHa@momjian.us>
  References: <c1e0067d-ab06-2bde-2ea9-9ace478a1191@benghancock.com> <ZUT2sbhj0g_LnVdu@momjian.us> <2ad88fa8-e0c7-b678-232b-30af59448133@benghancock.com> <3333527.1699041485@sss.pgh.pa.us> <ZUWlirLLtqgIWMHa@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox