Thread
-
Add html-serve target to autotools and meson
Tristan Partin <tristan@partin.io> — 2024-11-07T04:37:22Z
When working on documentation, I find it useful to spawn an HTTP server to serve docs for me to consume in a web browser. I went ahead and used Python's builtin http.server module, but it could also be a run target which just spawned `xdg-open builddir/doc/src/sgml/html/index.html`, though I would doubt Windows has xdg-open(1). The one controversial part of this patch might be using "port" 0, which asks the kernel to assign an unused port. I'm not sure if that exists on Windows, or is even desireable. Should we have a build option for the port? What would a good default be? -- Tristan Partin Neon (https://neon.tech)
-
Re: Add html-serve target to autotools and meson
Peter Eisentraut <peter@eisentraut.org> — 2024-11-09T08:26:20Z
On 07.11.24 05:37, Tristan Partin wrote: > When working on documentation, I find it useful to spawn an HTTP server > to serve docs for me to consume in a web browser. I went ahead and used > Python's builtin http.server module, but it could also be a run target > which just spawned `xdg-open builddir/doc/src/sgml/html/index.html`, > though I would doubt Windows has xdg-open(1). What is the advantage of using an http server over just opening the file directly in a web browser (file:// scheme)?
-
Re: Add html-serve target to autotools and meson
Michael Paquier <michael@paquier.xyz> — 2024-11-11T04:25:32Z
On Sat, Nov 09, 2024 at 09:26:20AM +0100, Peter Eisentraut wrote: > What is the advantage of using an http server over just opening the file > directly in a web browser (file:// scheme)? Not sure to see any on sight. I just use file:// to check the state of the docs produced by any patch sent to the lists, even keeping some bookmarks for the bookindex to ease lookups. -- Michael
-
Re: Add html-serve target to autotools and meson
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> — 2024-11-11T13:58:24Z
On Mon, Nov 11, 2024 at 9:55 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Sat, Nov 09, 2024 at 09:26:20AM +0100, Peter Eisentraut wrote: > > What is the advantage of using an http server over just opening the file > > directly in a web browser (file:// scheme)? > > Not sure to see any on sight. I just use file:// to check the state > of the docs produced by any patch sent to the lists, even keeping some > bookmarks for the bookindex to ease lookups. I sometimes create separate directories and clones for my work. In that case, there is no fix doc URL that I can bookmark. So it would be handy if meson opens docs for me with build specific URLs. I am not sure if it's worth the code and effort though. I cook up the URL using the build directory and copy paste in the browser. One could start a browser with DOCs opened as well. -- Best Wishes, Ashutosh Bapat
-
Re: Add html-serve target to autotools and meson
Andres Freund <andres@anarazel.de> — 2024-11-11T15:50:20Z
Hi, On 2024-11-11 19:28:24 +0530, Ashutosh Bapat wrote: > On Mon, Nov 11, 2024 at 9:55 AM Michael Paquier <michael@paquier.xyz> wrote: > > > > On Sat, Nov 09, 2024 at 09:26:20AM +0100, Peter Eisentraut wrote: > > > What is the advantage of using an http server over just opening the file > > > directly in a web browser (file:// scheme)? > > > > Not sure to see any on sight. I just use file:// to check the state > > of the docs produced by any patch sent to the lists, even keeping some > > bookmarks for the bookindex to ease lookups. > > I sometimes create separate directories and clones for my work. In > that case, there is no fix doc URL that I can bookmark. So it would be > handy if meson opens docs for me with build specific URLs. I am not > sure if it's worth the code and effort though. I cook up the URL using > the build directory and copy paste in the browser. One could start a > browser with DOCs opened as well. If you just want that we could print out a file:// url or even open it? Rather than an http server? Greetings, Andres Freund
-
Re: Add html-serve target to autotools and meson
Jacob Champion <jacob.champion@enterprisedb.com> — 2024-11-11T17:11:44Z
On Mon, Nov 11, 2024 at 7:50 AM Andres Freund <andres@anarazel.de> wrote: > If you just want that we could print out a file:// url or even open it? Rather > than an http server? +1. The coverage-html recipe is a nice example of this; just control-click the file: link and away you go. --Jacob
-
Re: Add html-serve target to autotools and meson
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> — 2024-11-12T10:30:51Z
On Mon, Nov 11, 2024 at 10:41 PM Jacob Champion <jacob.champion@enterprisedb.com> wrote: > > On Mon, Nov 11, 2024 at 7:50 AM Andres Freund <andres@anarazel.de> wrote: > > If you just want that we could print out a file:// url or even open it? Rather > > than an http server? > > +1. The coverage-html recipe is a nice example of this; just > control-click the file: link and away you go. WFM. -- Best Wishes, Ashutosh Bapat
-
Re: Add html-serve target to autotools and meson
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> — 2024-11-14T12:11:43Z
On Tue, Nov 12, 2024 at 4:00 PM Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote: > > On Mon, Nov 11, 2024 at 10:41 PM Jacob Champion > <jacob.champion@enterprisedb.com> wrote: > > > > On Mon, Nov 11, 2024 at 7:50 AM Andres Freund <andres@anarazel.de> wrote: > > > If you just want that we could print out a file:// url or even open it? Rather > > > than an http server? > > > > +1. The coverage-html recipe is a nice example of this; just > > control-click the file: link and away you go. > > WFM. I noticed that the documentation served by the postgresql.org site allows searching in the documentation, whereas that functionality is not available if we open HTML pages from docs directory. Would html-server provide that functionality? -- Best Wishes, Ashutosh Bapat
-
Re: Add html-serve target to autotools and meson
Daniel Gustafsson <daniel@yesql.se> — 2024-11-14T12:52:23Z
> On 14 Nov 2024, at 13:11, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote: >>> On Mon, Nov 11, 2024 at 7:50 AM Andres Freund <andres@anarazel.de> wrote: >>>> If you just want that we could print out a file:// url or even open it? Rather >>>> than an http server? +1 > I noticed that the documentation served by the postgresql.org site > allows searching in the documentation, whereas that functionality is > not available if we open HTML pages from docs directory. Would > html-server provide that functionality? No, doc searching on the site is implemented with FTS in the pgweb repository and would not be present in the proposal here. -- Daniel Gustafsson