Le 08/12/2014 20:04, Tobias Boege a écrit : > On Mon, 08 Dec 2014, Beno?t Minisini wrote: >> Le 06/12/2014 14:25, Tobias Boege a ?crit : >>> On Thu, 13 Nov 2014, Tobias Boege wrote: >>>>> No, the source tree may not beavailable on the wiki, only the *.info >>>>> files. >>>>> >>>>> Why not adding an optional "*.help" file that would come with the *.info >>>>> file? >>>>> >>>>> This file could have almost the same format as the *.info file, except >>>>> that it includes only the help. Your script would have to generate that >>>>> file - I don't know what it does exactly at the moment... >>>>> >>>>> The format is: >>>>> >>>>> #<class #1> >>>>> <symbol #1> >>>>> '<Help line #1> >>>>> '<Help line #2> >>>>> '... >>>>> <symbol #2> >>>>> ... >>>>> #<class #2> >>>>> ... >>>>> >>>>> Then either you keep your script, and you send me the *.help files so >>>>> that I put them on the wiki server. >>>>> >>>>> Better would be having your script inside the source tree, and let it >>>>> run automatically on the C/C++ sources with specific Makefile.am rules. >>>>> >>>>> That script can be written in Gambas. But then it will be run at "make >>>>> install" stage, once the interpreter has been compiled. >>>>> >>>>> What do you think? >>>>> >>>> >>>> Maybe I should rewrite it in Gambas. At this time it's 5 programs (in 4 >>>> different languages!) piping into one another. The first four preprocess >>>> the C/C++ comments and the last is a really hackish C program which takes >>>> these help lines and merges them to the right place in a given .info file. >>>> When I wrote these, I was all about (development) speed. It may be cool to >>>> have all that in one program (and one language only). >>>> >>>> The above format (and an extra file for it!) would be really good because >>>> that's information the program can gather from the C/C++ source files >>>> alone. >>>> No need to mess with the .info files then. >>>> >>>> Weekend... >>>> >>> >>> Of course I meant this weekend, not the one 3 weeks ago... >>> >>> The scripts are in the c2help directory in the source tree root since #6712. >>> Try them on gb.openssl: >>> >>> $ c2help/c2help.sh gb.openssl 2>/dev/null >>> #Digest >>> List >>> ' Return a list of all digests present in the local OpenSSL crypto >>> library. >>> _get >>> ' Return a virtual object representing a digest algorithm by giving its >>> ' name. Valid names can be looked up from Digest.List. >>> IsSupported >>> ' Check whether the named digest algorithm is valid. >>> #.Digest.Method >>> Hash >>> ' Hash the given string using this digest algorithm. >>> _call >>> ' A synonym for Hash. >>> #Cipher >>> List >>> ' Return a list of all ciphers present in the local OpenSSL crypto >>> library. >>> [...] >>> >>> One script is a gbs3 one, so all that needs to take place at "make install", >>> as you said. Apart from that I need bash (with read and exit builtins), >>> gawk, >>> grep, sed and the coreutils (cat, tr and echo) -- to give an extensive list. >>> Shouldn't be too exotic. But in case someone doesn't have egrep, sed or >>> gawk, >>> the help generation stage should be omitted since it's optional. I see no >>> need to reduce the dependencies on my side. >>> >>> Regards, >>> Tobi >>> >> >> The way you did is not really useful. You should have written a pure >> Gambas program with no dependencies, so that it can be run at "make >> install" stage automatically. >> >> You have introduce many dependencies, which means a lot of problems if >> in the future Gambas is ported on a non-GNU system (Android, for example). >> > > I didn't know; I committed the scripts I had lying around for a year or so, > just replaced the program that merged help comments into .info files with > the script that outputs .help files. > > To reinvent the gawk- and sed-wheels should be the complicated part here but > it doesn't seem to be too hard...
Is it so hard to extract help comments? I have never thought about that, so I guess it should no be too hard to extract them with a Gambas program... -- Benoît Minisini ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user