On Wed, Apr 18, 2012 at 6:33 PM, Demosthenes Koptsis
<demosthen...@gmail.com> 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

Attachment: doc-server-0.0.1.tar.gz
Description: GNU Zip compressed data

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to