discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Is there a way to get module 'signatures' for OpenSCAD core & BOSL?

RV
Roel Vanhout
Sun, Sep 25, 2022 12:47 PM

Hi,

I'm looking for a way to get a list (e.g., CSV file with two columns) of
all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and
parameters. The reason for this is that 90% of my visits to the
documentation are for looking up the exact names and default values of
parameters, which I would like to instead do/show in my editor (vim). Many
moons ago I wrote something similar for PHP, and to this day I can show the
parameters of most PHP functions in my vim status bar by pressing
shift-ctrl-spacebar with my cursor within the braces of a PHP function.

For me to get this to work for OpenSCAD, I basically need a list of the
modules' names and their arguments. For PHP I seem to remember I had a
crude regex based script that looked through the PHP source code, where I
think some sort of annotation system was used, which was then also used for
the regular PHP documentation (this is 20+ years ago so it probably changed
by now, I haven't kept up as I haven't written PHP in 15 years). So I'm
wondering if there is something similar for OpenSCAD, or a way for me to
tap into the documentation building system (which I assume there is?) to
generate such a list? Thanks.

cheers

Roel

Hi, I'm looking for a way to get a list (e.g., CSV file with two columns) of all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and parameters. The reason for this is that 90% of my visits to the documentation are for looking up the exact names and default values of parameters, which I would like to instead do/show in my editor (vim). Many moons ago I wrote something similar for PHP, and to this day I can show the parameters of most PHP functions in my vim status bar by pressing shift-ctrl-spacebar with my cursor within the braces of a PHP function. For me to get this to work for OpenSCAD, I basically need a list of the modules' names and their arguments. For PHP I seem to remember I had a crude regex based script that looked through the PHP source code, where I think some sort of annotation system was used, which was then also used for the regular PHP documentation (this is 20+ years ago so it probably changed by now, I haven't kept up as I haven't written PHP in 15 years). So I'm wondering if there is something similar for OpenSCAD, or a way for me to tap into the documentation building system (which I assume there is?) to generate such a list? Thanks. cheers Roel
MM
Michael Möller
Sun, Sep 25, 2022 1:22 PM

The cheat sheet (available in the menu) certainly has the "signature" for
the openscad functions.

Michael, fra mobilen

søn. 25. sep. 2022 14.47 skrev Roel Vanhout roel.vanhout@gmail.com:

Hi,

I'm looking for a way to get a list (e.g., CSV file with two columns) of
all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and
parameters. The reason for this is that 90% of my visits to the
documentation are for looking up the exact names and default values of
parameters, which I would like to instead do/show in my editor (vim). Many
moons ago I wrote something similar for PHP, and to this day I can show the
parameters of most PHP functions in my vim status bar by pressing
shift-ctrl-spacebar with my cursor within the braces of a PHP function.

For me to get this to work for OpenSCAD, I basically need a list of the
modules' names and their arguments. For PHP I seem to remember I had a
crude regex based script that looked through the PHP source code, where I
think some sort of annotation system was used, which was then also used for
the regular PHP documentation (this is 20+ years ago so it probably changed
by now, I haven't kept up as I haven't written PHP in 15 years). So I'm
wondering if there is something similar for OpenSCAD, or a way for me to
tap into the documentation building system (which I assume there is?) to
generate such a list? Thanks.

cheers

Roel


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

The cheat sheet (available in the menu) certainly has the "signature" for the openscad functions. Michael, fra mobilen søn. 25. sep. 2022 14.47 skrev Roel Vanhout <roel.vanhout@gmail.com>: > Hi, > > I'm looking for a way to get a list (e.g., CSV file with two columns) of > all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and > parameters. The reason for this is that 90% of my visits to the > documentation are for looking up the exact names and default values of > parameters, which I would like to instead do/show in my editor (vim). Many > moons ago I wrote something similar for PHP, and to this day I can show the > parameters of most PHP functions in my vim status bar by pressing > shift-ctrl-spacebar with my cursor within the braces of a PHP function. > > For me to get this to work for OpenSCAD, I basically need a list of the > modules' names and their arguments. For PHP I seem to remember I had a > crude regex based script that looked through the PHP source code, where I > think some sort of annotation system was used, which was then also used for > the regular PHP documentation (this is 20+ years ago so it probably changed > by now, I haven't kept up as I haven't written PHP in 15 years). So I'm > wondering if there is something similar for OpenSCAD, or a way for me to > tap into the documentation building system (which I assume there is?) to > generate such a list? Thanks. > > cheers > > Roel > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Sun, Sep 25, 2022 1:35 PM

The BOSL2 cheat sheet is at
https://github.com/revarbat/BOSL2/wiki/CheatSheet but if you wanted to do
something yourself you could scan the BOSL2 source files for "// Usage:"
and extract all the usage texts.  The BOSL2 manual is entirely obtained
from comments in the BOSL2 code.

On Sun, Sep 25, 2022 at 8:48 AM Roel Vanhout roel.vanhout@gmail.com wrote:

Hi,

I'm looking for a way to get a list (e.g., CSV file with two columns) of
all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and
parameters. The reason for this is that 90% of my visits to the
documentation are for looking up the exact names and default values of
parameters, which I would like to instead do/show in my editor (vim). Many
moons ago I wrote something similar for PHP, and to this day I can show the
parameters of most PHP functions in my vim status bar by pressing
shift-ctrl-spacebar with my cursor within the braces of a PHP function.

For me to get this to work for OpenSCAD, I basically need a list of the
modules' names and their arguments. For PHP I seem to remember I had a
crude regex based script that looked through the PHP source code, where I
think some sort of annotation system was used, which was then also used for
the regular PHP documentation (this is 20+ years ago so it probably changed
by now, I haven't kept up as I haven't written PHP in 15 years). So I'm
wondering if there is something similar for OpenSCAD, or a way for me to
tap into the documentation building system (which I assume there is?) to
generate such a list? Thanks.

cheers

Roel


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

The BOSL2 cheat sheet is at https://github.com/revarbat/BOSL2/wiki/CheatSheet but if you wanted to do something yourself you could scan the BOSL2 source files for "// Usage:" and extract all the usage texts. The BOSL2 manual is entirely obtained from comments in the BOSL2 code. On Sun, Sep 25, 2022 at 8:48 AM Roel Vanhout <roel.vanhout@gmail.com> wrote: > Hi, > > I'm looking for a way to get a list (e.g., CSV file with two columns) of > all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and > parameters. The reason for this is that 90% of my visits to the > documentation are for looking up the exact names and default values of > parameters, which I would like to instead do/show in my editor (vim). Many > moons ago I wrote something similar for PHP, and to this day I can show the > parameters of most PHP functions in my vim status bar by pressing > shift-ctrl-spacebar with my cursor within the braces of a PHP function. > > For me to get this to work for OpenSCAD, I basically need a list of the > modules' names and their arguments. For PHP I seem to remember I had a > crude regex based script that looked through the PHP source code, where I > think some sort of annotation system was used, which was then also used for > the regular PHP documentation (this is 20+ years ago so it probably changed > by now, I haven't kept up as I haven't written PHP in 15 years). So I'm > wondering if there is something similar for OpenSCAD, or a way for me to > tap into the documentation building system (which I assume there is?) to > generate such a list? Thanks. > > cheers > > Roel > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RV
Roel Vanhout
Sun, Sep 25, 2022 1:45 PM

It does and with some manual scrubbing I guess I could produce my list from
its html - is the cheat sheet generated or made manually?

On Sun, Sep 25, 2022 at 3:23 PM Michael Möller private2michael@gmail.com
wrote:

The cheat sheet (available in the menu) certainly has the "signature" for
the openscad functions.

Michael, fra mobilen

søn. 25. sep. 2022 14.47 skrev Roel Vanhout roel.vanhout@gmail.com:

Hi,

I'm looking for a way to get a list (e.g., CSV file with two columns) of
all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and
parameters. The reason for this is that 90% of my visits to the
documentation are for looking up the exact names and default values of
parameters, which I would like to instead do/show in my editor (vim). Many
moons ago I wrote something similar for PHP, and to this day I can show the
parameters of most PHP functions in my vim status bar by pressing
shift-ctrl-spacebar with my cursor within the braces of a PHP function.

For me to get this to work for OpenSCAD, I basically need a list of the
modules' names and their arguments. For PHP I seem to remember I had a
crude regex based script that looked through the PHP source code, where I
think some sort of annotation system was used, which was then also used for
the regular PHP documentation (this is 20+ years ago so it probably changed
by now, I haven't kept up as I haven't written PHP in 15 years). So I'm
wondering if there is something similar for OpenSCAD, or a way for me to
tap into the documentation building system (which I assume there is?) to
generate such a list? Thanks.

cheers

Roel


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

It does and with some manual scrubbing I guess I could produce my list from its html - is the cheat sheet generated or made manually? On Sun, Sep 25, 2022 at 3:23 PM Michael Möller <private2michael@gmail.com> wrote: > The cheat sheet (available in the menu) certainly has the "signature" for > the openscad functions. > > Michael, fra mobilen > > søn. 25. sep. 2022 14.47 skrev Roel Vanhout <roel.vanhout@gmail.com>: > >> Hi, >> >> I'm looking for a way to get a list (e.g., CSV file with two columns) of >> all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and >> parameters. The reason for this is that 90% of my visits to the >> documentation are for looking up the exact names and default values of >> parameters, which I would like to instead do/show in my editor (vim). Many >> moons ago I wrote something similar for PHP, and to this day I can show the >> parameters of most PHP functions in my vim status bar by pressing >> shift-ctrl-spacebar with my cursor within the braces of a PHP function. >> >> For me to get this to work for OpenSCAD, I basically need a list of the >> modules' names and their arguments. For PHP I seem to remember I had a >> crude regex based script that looked through the PHP source code, where I >> think some sort of annotation system was used, which was then also used for >> the regular PHP documentation (this is 20+ years ago so it probably changed >> by now, I haven't kept up as I haven't written PHP in 15 years). So I'm >> wondering if there is something similar for OpenSCAD, or a way for me to >> tap into the documentation building system (which I assume there is?) to >> generate such a list? Thanks. >> >> cheers >> >> Roel >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RD
Revar Desmera
Mon, Sep 26, 2022 2:03 AM

All BOSL2 docs are generated using the Python module openscad_docsgen which reads specially formatted comments in the library's .scad source files.  You can use this library to parse these comments so that you can programmatically use them.

https://pypi.org/project/openscad-docsgen/

  • Revar

On Sep 25, 2022, at 6:45 AM, Roel Vanhout roel.vanhout@gmail.com wrote:

It does and with some manual scrubbing I guess I could produce my list from its html - is the cheat sheet generated or made manually?

On Sun, Sep 25, 2022 at 3:23 PM Michael Möller <private2michael@gmail.com mailto:private2michael@gmail.com> wrote:
The cheat sheet (available in the menu) certainly has the "signature" for the openscad functions.

Michael, fra mobilen

søn. 25. sep. 2022 14.47 skrev Roel Vanhout <roel.vanhout@gmail.com mailto:roel.vanhout@gmail.com>:
Hi,

I'm looking for a way to get a list (e.g., CSV file with two columns) of all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and parameters. The reason for this is that 90% of my visits to the documentation are for looking up the exact names and default values of parameters, which I would like to instead do/show in my editor (vim). Many moons ago I wrote something similar for PHP, and to this day I can show the parameters of most PHP functions in my vim status bar by pressing shift-ctrl-spacebar with my cursor within the braces of a PHP function.

For me to get this to work for OpenSCAD, I basically need a list of the modules' names and their arguments. For PHP I seem to remember I had a crude regex based script that looked through the PHP source code, where I think some sort of annotation system was used, which was then also used for the regular PHP documentation (this is 20+ years ago so it probably changed by now, I haven't kept up as I haven't written PHP in 15 years). So I'm wondering if there is something similar for OpenSCAD, or a way for me to tap into the documentation building system (which I assume there is?) to generate such a list? Thanks.

cheers

Roel


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

All BOSL2 docs are generated using the Python module `openscad_docsgen` which reads specially formatted comments in the library's .scad source files. You can use this library to parse these comments so that you can programmatically use them. https://pypi.org/project/openscad-docsgen/ - Revar > On Sep 25, 2022, at 6:45 AM, Roel Vanhout <roel.vanhout@gmail.com> wrote: > > It does and with some manual scrubbing I guess I could produce my list from its html - is the cheat sheet generated or made manually? > > On Sun, Sep 25, 2022 at 3:23 PM Michael Möller <private2michael@gmail.com <mailto:private2michael@gmail.com>> wrote: > The cheat sheet (available in the menu) certainly has the "signature" for the openscad functions. > > Michael, fra mobilen > > søn. 25. sep. 2022 14.47 skrev Roel Vanhout <roel.vanhout@gmail.com <mailto:roel.vanhout@gmail.com>>: > Hi, > > I'm looking for a way to get a list (e.g., CSV file with two columns) of all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and parameters. The reason for this is that 90% of my visits to the documentation are for looking up the exact names and default values of parameters, which I would like to instead do/show in my editor (vim). Many moons ago I wrote something similar for PHP, and to this day I can show the parameters of most PHP functions in my vim status bar by pressing shift-ctrl-spacebar with my cursor within the braces of a PHP function. > > For me to get this to work for OpenSCAD, I basically need a list of the modules' names and their arguments. For PHP I seem to remember I had a crude regex based script that looked through the PHP source code, where I think some sort of annotation system was used, which was then also used for the regular PHP documentation (this is 20+ years ago so it probably changed by now, I haven't kept up as I haven't written PHP in 15 years). So I'm wondering if there is something similar for OpenSCAD, or a way for me to tap into the documentation building system (which I assume there is?) to generate such a list? Thanks. > > cheers > > Roel > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RV
Roel Vanhout
Sun, Oct 2, 2022 9:49 AM

Thank you, this is much more convenient than anything I could have hoped
for.

regards

On Mon, Sep 26, 2022 at 4:04 AM Revar Desmera revarbat@gmail.com wrote:

All BOSL2 docs are generated using the Python module openscad_docsgen
which reads specially formatted comments in the library's .scad source
files.  You can use this library to parse these comments so that you can
programmatically use them.

https://pypi.org/project/openscad-docsgen/

  • Revar

On Sep 25, 2022, at 6:45 AM, Roel Vanhout roel.vanhout@gmail.com wrote:

It does and with some manual scrubbing I guess I could produce my list
from its html - is the cheat sheet generated or made manually?

On Sun, Sep 25, 2022 at 3:23 PM Michael Möller private2michael@gmail.com
wrote:

The cheat sheet (available in the menu) certainly has the "signature" for
the openscad functions.

Michael, fra mobilen

søn. 25. sep. 2022 14.47 skrev Roel Vanhout roel.vanhout@gmail.com:

Hi,

I'm looking for a way to get a list (e.g., CSV file with two columns) of
all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and
parameters. The reason for this is that 90% of my visits to the
documentation are for looking up the exact names and default values of
parameters, which I would like to instead do/show in my editor (vim). Many
moons ago I wrote something similar for PHP, and to this day I can show the
parameters of most PHP functions in my vim status bar by pressing
shift-ctrl-spacebar with my cursor within the braces of a PHP function.

For me to get this to work for OpenSCAD, I basically need a list of the
modules' names and their arguments. For PHP I seem to remember I had a
crude regex based script that looked through the PHP source code, where I
think some sort of annotation system was used, which was then also used for
the regular PHP documentation (this is 20+ years ago so it probably changed
by now, I haven't kept up as I haven't written PHP in 15 years). So I'm
wondering if there is something similar for OpenSCAD, or a way for me to
tap into the documentation building system (which I assume there is?) to
generate such a list? Thanks.

cheers

Roel


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Thank you, this is much more convenient than anything I could have hoped for. regards On Mon, Sep 26, 2022 at 4:04 AM Revar Desmera <revarbat@gmail.com> wrote: > All BOSL2 docs are generated using the Python module `openscad_docsgen` > which reads specially formatted comments in the library's .scad source > files. You can use this library to parse these comments so that you can > programmatically use them. > > https://pypi.org/project/openscad-docsgen/ > > - Revar > > > On Sep 25, 2022, at 6:45 AM, Roel Vanhout <roel.vanhout@gmail.com> wrote: > > It does and with some manual scrubbing I guess I could produce my list > from its html - is the cheat sheet generated or made manually? > > On Sun, Sep 25, 2022 at 3:23 PM Michael Möller <private2michael@gmail.com> > wrote: > >> The cheat sheet (available in the menu) certainly has the "signature" for >> the openscad functions. >> >> Michael, fra mobilen >> >> søn. 25. sep. 2022 14.47 skrev Roel Vanhout <roel.vanhout@gmail.com>: >> >>> Hi, >>> >>> I'm looking for a way to get a list (e.g., CSV file with two columns) of >>> all OpenSCAD built-in as well as BOSL(2) modules, i.e. their name and >>> parameters. The reason for this is that 90% of my visits to the >>> documentation are for looking up the exact names and default values of >>> parameters, which I would like to instead do/show in my editor (vim). Many >>> moons ago I wrote something similar for PHP, and to this day I can show the >>> parameters of most PHP functions in my vim status bar by pressing >>> shift-ctrl-spacebar with my cursor within the braces of a PHP function. >>> >>> For me to get this to work for OpenSCAD, I basically need a list of the >>> modules' names and their arguments. For PHP I seem to remember I had a >>> crude regex based script that looked through the PHP source code, where I >>> think some sort of annotation system was used, which was then also used for >>> the regular PHP documentation (this is 20+ years ago so it probably changed >>> by now, I haven't kept up as I haven't written PHP in 15 years). So I'm >>> wondering if there is something similar for OpenSCAD, or a way for me to >>> tap into the documentation building system (which I assume there is?) to >>> generate such a list? Thanks. >>> >>> cheers >>> >>> Roel >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >