Re: pgAdmin Documentation - Mailing list pgadmin-hackers

From Dave Page
Subject Re: pgAdmin Documentation
Date
Msg-id 464AFF17.8040107@postgresql.org
Whole thread Raw
In response to Re: pgAdmin Documentation  (Magnus Hagander <magnus@hagander.net>)
List pgadmin-hackers
Magnus Hagander wrote:
> I think 2 is good, provided that the windows installer (or RPM packages
> or whatever is used on Mac) can be configured to pick up something by
> default. So that I don't have to figure out where my pg docs are if I just
> installed the bundle.

OK, here's what I'm thinking.

1) Add configuration options for pgAdmin, PostgreSQL, EnterpriseDB and
Slony helpfiles.

2) At startup, if any of those options are empty, search a set of local
directories for the helpfiles:

   - On Windows only, look for CHM files first;
     - $INSTDIR/Docs/$LANG/pgadmin3.chm (and postgresql.chm etc)
     - $INSTDIR/Docs/en_US/pgadmin3.chm
     - $INSTDIR/Docs/pgadmin3.chm
     - $INSTDIR/pgadmin3.chm

     In addition, we look for postgresql.chm  & slony.chm in the
appropriate directory relative to the pg_dump directory, likewise the
equivalent for enterprisedb.chm.

   - On other platforms (and Windows if we haven't got this far), we
look for postgresql.hhp in the appropriate directory relative to the
pg_dump directory, likewise the equivalent for enterprisedb.hhp.

   - For those paths we still haven't satisfied, we look in the same
places as per the previous step for index.html files.

   - Finally, we fall back to websites -
http://www.pgadmin.org/docs/current/,
http://www.postgresql.org/docs/current/static/ and so on.

3) When the user views a helpfile, if it's a Slony or pgAdmin page, just
use the appropriate path, if it's a DBMS page, use the PostgreSQL or
EnterpriseDB path as appropriate;

   - if it's a CHM file, we launch MS HTML Help viewer using
wxCHMHelpController
   - else if it's an hhp file, we launch the wx viewer using
wxHtmlHelpController
   - else we launch the default web browser and pass it the html file,
or URL to open.

How does that sound?

> We do get questions about pginstaller why we always include pgadmin docs,
> which would also be solved as a side-effect of this :-)

Yeah.

> Does this affect searching in help in a bad way?

Shouldn't do. For CHM or HHP it'll be as it is now. For HTML there willl
be no search, for web, there's the search engine on the site used
(assuming there is one).

Regards, Dave.


pgadmin-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pgAdmin Documentation
Next
From: Leszek Trenkner
Date:
Subject: Re: Testing v1.7: Creating constraint => core dump