[Gambas-user] [Feature Request] Offline Documentation

Ian Haywood ihaywood at ...1979...
Wed Apr 18 14:20:23 CEST 2012


On Wed, Apr 18, 2012 at 6:33 PM, Demosthenes Koptsis
<demosthenesk at ...626...> wrote:
> i try to download the docs with
>
> wget -kvrc --*html-extension *http://gambasdoc.org/help?v3
>
> i think with this way we can have convert php files to html and have
> offline documentation.
>
> if all are good i can send the tarball to put it to download section.
this problem has irritated me for some time, as I am often developing
on my laptop
with no Internet access.

A related question I have had is "how hard would it be to implement
HTTP in Gambas".
The answer is....not very.

I enclose a small HTTP server that pretends to be a proxy running on
port 8080 but actually serves
up the Gambas help from the local hard drive.
Obviously you will need to download the docs as per the wget command above, and
also set the variable basePath in MMain.module to your directory where
this download is

Also the downloaded files have a back bar across the top which is
annoying when reading
the help in the IDE: to get rid of this you can do

    find -type f -exec sed -i -e '/lang30/d' \{} \;

in that directory to strip it out in the files.

In doing it I uncovered an interesting problem. in the HTTP protocol
the client sends a blank line
(i.e. <CR><LR><CR><LF>) to signal the end of the request.
I expected Gambas' LINE INPUT to return an empty string when this
happens (which it does do when reading an
equivalent text file on disk)

as a hack my client watches for the "User-Agent" line as uses that to
signal to start sending the data, which breaks the protocol,
but Gambas doesn't seem to mind.

Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc-server-0.0.1.tar.gz
Type: application/x-gzip
Size: 6407 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20120418/96d327e0/attachment.bin>


More information about the User mailing list