Thread: Re: Add html-serve target to autotools and meson
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)?
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
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
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
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
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
> 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