Crawling documentation to find named argument keywords

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Crawling documentation to find named argument keywords

Robert Dailey-2
I've attached a python script I'm using to obtain a list of keywords
across all CMake commands that I can use. Can someone let me know if
this is a reliable way to craw the help documentation to find these
keywords?

Note that the keywords I'm referring to are things like APPEND in the
list() command, or PUBLIC and PRIVATE in the target_link_libraries()
command. Each command has a set of all-upper-case keywords it uses to
separate out arguments. I want a list of these keywords for all
commands in one big list.

I'm doing this to support syntax highlighting in a text editor.

To use the script, first pipe out CMake's help to a file like this:

$ cmake --help-full > help.txt

Then run it through the python script attached:

$ python-3.4 strip-options.py help.txt

This should output to console the list of keywords. I feel like a lot
are missing. I also got a lot of false positives. Can anyone suggest a
better way to isolate true argument keywords in the help text?

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

strip-options.py (586 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Crawling documentation to find named argument keywords

Michael Jackson
I thought there used to be a DocBook version of the documentation? At one point I had an XML parser that used that as input to process the documentation in the same way.

Mike Jackson

On Aug 17, 2015, at 8:51 AM, Robert Dailey <[hidden email]> wrote:

> I've attached a python script I'm using to obtain a list of keywords
> across all CMake commands that I can use. Can someone let me know if
> this is a reliable way to craw the help documentation to find these
> keywords?
>
> Note that the keywords I'm referring to are things like APPEND in the
> list() command, or PUBLIC and PRIVATE in the target_link_libraries()
> command. Each command has a set of all-upper-case keywords it uses to
> separate out arguments. I want a list of these keywords for all
> commands in one big list.
>
> I'm doing this to support syntax highlighting in a text editor.
>
> To use the script, first pipe out CMake's help to a file like this:
>
> $ cmake --help-full > help.txt
>
> Then run it through the python script attached:
>
> $ python-3.4 strip-options.py help.txt
>
> This should output to console the list of keywords. I feel like a lot
> are missing. I also got a lot of false positives. Can anyone suggest a
> better way to isolate true argument keywords in the help text?
> <strip-options.py>--
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Crawling documentation to find named argument keywords

Alexander Neundorf-3
On Monday, August 17, 2015 09:15:18 Michael Jackson wrote:
> I thought there used to be a DocBook version of the documentation? At one
> point I had an XML parser that used that as input to process the
> documentation in the same way.

the way the documentation is generated has changed with version 3.0 I think,
cmake now is sphinx-based. I'm not quite sure whether it still supports
docbook.

Alex

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake