ANN: rttpack package introspection and documentation tool

Dear All,

I have this little lua script lying around for quite a while and I
think it might be useful to others so here it is:

git://git.mech.kuleuven.be/~u0062335/rttpack

The most important feature is the ability to generate documentation
from components libraries. My distant dream would be to autogenerate a
index of available, documented components for RTT.

Note: experimental code, use at your own risk :-)

README follows below.
Feedback welcome!

Best regards
Markus

rttpack: a RTT component inspection and documentation tool.

Installation
============

1. Make sure rttlua-gnulinux (or whichever flavour you are using is
in your path and setup correctly.

2. Install the dependencies (all available as debian packages)
- liblua5.1-cosmo0
- liblua5.1-expat0
- liblua5.1-filesystem0
- liblua5.1-json

Usage
=====

$ rttpack -h
rttpack v0.1
RTT package inspection and documentation tool
Usage:
rttpack <command> <package> <options>

If package is omitted, the current dir is used. Note that options
must come after the packagename (or command if no package is given)

global options:
-pl <p1> <p2>... packages to preload before inspection
-noconf comp1 comp2 components not to configure before showing/dumping
-defops do not hide default operations
-q be less verbose
-h print this help
-v display version

commands:
list list contents of package

show print component interfaces to stdout
-nocolor disable colors (default: colors on)

dump export component interfaces to file
-f <format> output format: txt, wiki, json (default: wiki)
-dest <dir> destination directory

Examples
========

1. list components in a package
-------------------------------

$ rttpack list motion_control
skipping preloading of rtt, doesn't seem importable
preloading dependency ocl
skipping preloading of orocos_kdl, doesn't seem importable
preloading dependency kdl_typekit
Found 0 services in package motion_control
Found 0 typekits in package motion_control
Found 0 types in package motion_control
Found 5 components in package motion_control
Services:
Typekits:
Types:
Components: MotionControl::CartesianControllerPos MotionControl::CartesianGeneratorPos
MotionControl::CartesianControllerVel
MotionControl::KinematicConverter
MotionControl::CartesianControllerPosVel

2. Show meta information about package
--------------------------------------

$ rttpack info motion_control
skipping preloading of rtt, doesn't seem importable
preloading dependency ocl
skipping preloading of orocos_kdl, doesn't seem importable
preloading dependency kdl_typekit
Found 0 services in package motion_control
Found 0 typekits in package motion_control
Found 0 types in package motion_control
Found 5 components in package motion_control
depend: rtt ocl orocos_kdl kdl_typekit
description: This package contains the components of the motion_control package
author: Ruben Smits, Klaas Gadeyne, Wim Meussen, Markus Klotzbuecher
url: http://git.mech.kuleuven.be/?p=robotics/motion_control.git
license: GPLv2+

or less verbose:

$ rttpack info kdl_typekit -q
depend: rtt ocl orocos_kdl
description: This package contains the KDL RTT bindings
license: LGPL / BSD
url: http://ros.org/wiki/orocos_kdl
author: Steven Bellens, Ruben Smits

3. print components
--------------------

$ rttpack show motion_control

...

4. Generate wiki documentation for a package
--------------------------------------------

$ rttpack dump motion_control
...
Writing description to ./motion_control.wiki

If you create a files "doc/component-name.compdoc" where
"component-name" is a cleaned-up version of the C++ component name
('::' substitued with '.',
e.g. "MotionControl.CartesianControllerPos.compdoc"), then the
contents of that file will be pasted verbatim in the respective
Component section.

5. Generate json description for components
-------------------------------------------
$ rttpack dump motion_control -f json

ANN: rttpack package introspection and documentation tool

On Wed, 2011-06-29 at 13:48 +0200, Markus Klotzbuecher wrote:
> Dear All,
>
> I have this little lua script lying around for quite a while and I
> think it might be useful to others so here it is:
>
Interested :)

> git://git.mech.kuleuven.be/~u0062335/rttpack
>

I can only access the git through http. But
http://git.mech.kuleuven.be/~u0062335/rttpack is not accessible.

Tim

> The most important feature is the ability to generate documentation
> from components libraries. My distant dream would be to autogenerate a
> index of available, documented components for RTT.
>
> Note: experimental code, use at your own risk :-)
>
> README follows below.
> Feedback welcome!
>
> Best regards
> Markus
>
>
>
>
> rttpack: a RTT component inspection and documentation tool.
>
> Installation
> ============
>
> 1. Make sure rttlua-gnulinux (or whichever flavour you are using is
> in your path and setup correctly.
>
> 2. Install the dependencies (all available as debian packages)
> - liblua5.1-cosmo0
> - liblua5.1-expat0
> - liblua5.1-filesystem0
> - liblua5.1-json
>
>
> Usage
> =====
>
> $ rttpack -h
> rttpack v0.1
> RTT package inspection and documentation tool
> Usage:
> rttpack <command> <package> <options>
>
> If package is omitted, the current dir is used. Note that options
> must come after the packagename (or command if no package is given)
>
> global options:
> -pl <p1> <p2>... packages to preload before inspection
> -noconf comp1 comp2 components not to configure before showing/dumping
> -defops do not hide default operations
> -q be less verbose
> -h print this help
> -v display version
>
> commands:
> list list contents of package
>
> show print component interfaces to stdout
> -nocolor disable colors (default: colors on)
>
> dump export component interfaces to file
> -f <format> output format: txt, wiki, json (default: wiki)
> -dest <dir> destination directory
>
>
> Examples
> ========
>
> 1. list components in a package
> -------------------------------
>
> $ rttpack list motion_control
> skipping preloading of rtt, doesn't seem importable
> preloading dependency ocl
> skipping preloading of orocos_kdl, doesn't seem importable
> preloading dependency kdl_typekit
> Found 0 services in package motion_control
> Found 0 typekits in package motion_control
> Found 0 types in package motion_control
> Found 5 components in package motion_control
> Services:
> Typekits:
> Types:
> Components: MotionControl::CartesianControllerPos MotionControl::CartesianGeneratorPos
> MotionControl::CartesianControllerVel
> MotionControl::KinematicConverter
> MotionControl::CartesianControllerPosVel
>
> 2. Show meta information about package
> --------------------------------------
>
> $ rttpack info motion_control
> skipping preloading of rtt, doesn't seem importable
> preloading dependency ocl
> skipping preloading of orocos_kdl, doesn't seem importable
> preloading dependency kdl_typekit
> Found 0 services in package motion_control
> Found 0 typekits in package motion_control
> Found 0 types in package motion_control
> Found 5 components in package motion_control
> depend: rtt ocl orocos_kdl kdl_typekit
> description: This package contains the components of the motion_control package
> author: Ruben Smits, Klaas Gadeyne, Wim Meussen, Markus Klotzbuecher
> url: http://git.mech.kuleuven.be/?p=robotics/motion_control.git
> license: GPLv2+
>
> or less verbose:
>
> $ rttpack info kdl_typekit -q
> depend: rtt ocl orocos_kdl
> description: This package contains the KDL RTT bindings
> license: LGPL / BSD
> url: http://ros.org/wiki/orocos_kdl
> author: Steven Bellens, Ruben Smits
>
>
> 3. print components
> --------------------
>
> $ rttpack show motion_control
>
> ...
>
>
> 4. Generate wiki documentation for a package
> --------------------------------------------
>
> $ rttpack dump motion_control
> ...
> Writing description to ./motion_control.wiki
>
>
> If you create a files "doc/component-name.compdoc" where
> "component-name" is a cleaned-up version of the C++ component name
> ('::' substitued with '.',
> e.g. "MotionControl.CartesianControllerPos.compdoc"), then the
> contents of that file will be pasted verbatim in the respective
> Component section.
>
>
> 5. Generate json description for components
> -------------------------------------------
> $ rttpack dump motion_control -f json
>
>

ANN: rttpack package introspection and documentation tool

On Wed, Jun 29, 2011 at 05:29:31PM +0200, Tim Clephas wrote:
> On Wed, 2011-06-29 at 13:48 +0200, Markus Klotzbuecher wrote:
> > Dear All,
> >
> > I have this little lua script lying around for quite a while and I
> > think it might be useful to others so here it is:
> >
> Interested :)
>
> > git://git.mech.kuleuven.be/~u0062335/rttpack
> >
>
> I can only access the git through http. But
> http://git.mech.kuleuven.be/~u0062335/rttpack is not accessible.

Does adding a '.git" work for you?

git clone http://git.mech.kuleuven.be/~u0062335/rttpack.git

Best regards
Markus

ANN: rttpack package introspection and documentation tool

On Wed, 2011-06-29 at 17:39 +0200, Markus Klotzbuecher wrote:
> On Wed, Jun 29, 2011 at 05:29:31PM +0200, Tim Clephas wrote:
> > On Wed, 2011-06-29 at 13:48 +0200, Markus Klotzbuecher wrote:
> > > Dear All,
> > >
> > > I have this little lua script lying around for quite a while and I
> > > think it might be useful to others so here it is:
> > >
> > Interested :)
> >
> > > git://git.mech.kuleuven.be/~u0062335/rttpack
> > >
> >
> > I can only access the git through http. But
> > http://git.mech.kuleuven.be/~u0062335/rttpack is not accessible.
>
> Does adding a '.git" work for you?
>
> git clone http://git.mech.kuleuven.be/~u0062335/rttpack.git
>
That's the trick :)

Thanks!

> Best regards
> Markus
>
>