Re: Issue 94 in votca: cmake: rewrite help2t2t into a cmake script or direct bump of manpage

0 views
Skip to first unread message

vo...@googlecode.com

unread,
Nov 1, 2013, 10:51:49 AM11/1/13
to votca...@googlegroups.com
Updates:
Summary: cmake: rewrite help2t2t into a cmake script or direct bump of
manpage
Owner: andr...@googlemail.com
Labels: -Component-Csg

Comment #5 on issue 94 by christop...@gmail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

I came across the same issue on OpenSUSE again! So basically to build
manpages, which a requirement for most distributions, we rely on
cmake>=2.8.3 or some very high version of cmake 2.6.X.

All in all, I think the best would be if we could dump a manpage from the
application itself, something like: votca_property --man

We would also get rite of the txt2tags dependency.




--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

vo...@googlecode.com

unread,
Nov 1, 2013, 2:48:44 PM11/1/13
to votca...@googlegroups.com

Comment #6 on issue 94 by andr...@googlemail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

What is the format of manpage files?

In CTP latex, xml, and txt output is generated by the class
propertyiomanipulator (we use this for calculators).
All our XML files in share have the following format
<options>
<calcname help="" default="" unit="" section="">
</calcname>
</options>

i.e.:
<options>
<idft help="Projection method for electronic couplings. Requires edft
otput" section="sec:dft">
<job_file help="Job control file (full path)"></job_file>
<tasks help="What to do"
default="input,run,parse,trim,project">input,run,parse,trim,project</tasks>
<store help="What to store"
default="orbitals,overlap,integrals">orbitals,overlap,integrals</store>
<package help="XML file with options for the QM package"></package>
<degeneracy help="Criterium for the degeneracy of two levels"
unit="eV" default="0">0</degeneracy>
<levels help="Output between HOMO, ..., HOMO-levels; LUMO, ...,
LUMO+levels" default="3">3</levels>
<trim help="Use trim*occupied of virtual orbitals"
default="2">2</trim>
</idft>
</options>

from this we generate the tex manual, help output, xml output, etc.

Same can be done for executables. The easiest is to have an xml file
with their documentation. It's been on the agenda for a while, but I
haven't come up with a good solutuion how to do this. Any ideas? Victor?

Denis

vo...@googlecode.com

unread,
Nov 1, 2013, 3:43:45 PM11/1/13
to votca...@googlegroups.com

Comment #7 on issue 94 by christop...@gmail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

> What is the format of manpage files?
<http://liw.fi/manpages/>

vo...@googlecode.com

unread,
Nov 2, 2013, 4:34:50 PM11/2/13
to votca...@googlegroups.com

Comment #8 on issue 94 by andr...@googlemail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

try

votca_property --man > votca_property.1
man ./votca_property.1

if this is what is finally needed, i will add it to the Application
(assuming that all executables are derived from it).

vo...@googlecode.com

unread,
Nov 2, 2013, 5:12:05 PM11/2/13
to votca...@googlegroups.com

Comment #9 on issue 94 by christop...@gmail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

Looks great, that was exactly what was needed. Please add that to
application class. After that I can change cmake to generate for all apps
automatically.

We should add two more sections at the end:

AUTHORS
Written and maintained by the VOTCA Development Team <de...@votca.org>

COPYRIGHT
<the common Apache 2.0 header>

vo...@googlecode.com

unread,
Nov 2, 2013, 5:22:06 PM11/2/13
to votca...@googlegroups.com

Comment #10 on issue 94 by christop...@gmail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

And can we make the option hidden?

vo...@googlecode.com

unread,
Nov 3, 2013, 1:46:21 PM11/3/13
to votca...@googlegroups.com
Updates:
Status: Fixed

Comment #11 on issue 94 by andr...@googlemail.com: cmake: rewrite
help2t2t into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

Making options was a bit of a pain, but should work. Now if you add an
option as "Hidden", i.e.
AddProgramOptions("Hidden")("man", " output manual pages");
it will be filtered out from the user output. Left it in the man pages for
fun. Can be also removed from there (will be totally non-existing then).

Some programs are not derived from Application or CSGApplication. (in CTP
everything so far is from CTPApplication unless it is a script). These
programa will not have --man option (or it has to be added manually. Fix or
complain ;)

Two remarks: I removed sections (man pages are not that long) as well as
did not figure out where the VersionString() comes from, so no version is
displayed at the moment, though I am using VersionString() to print it.
Have no time to look deeper. Any ideas? Victor?

vo...@googlecode.com

unread,
Nov 4, 2013, 12:58:20 AM11/4/13
to votca...@googlegroups.com
Updates:
Status: Started

Comment #12 on issue 94 by christop...@gmail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

I changed cmake of votca tools to make use of this great feature. There is
also a votca-tools manpage, which hasn't been changed in 2 years, so I just
added the txt2tags generated version of it to the repository. We can either
edit by hand or generate the manpage from the t2t file whenever we change
the t2t file.

For the scripts in csg, I have to think about it again, but most likely I
will add an --man option to print a modified version of the help for the 3
script, which get installed in bin. The --tex option will be useful for
program reference section of the csg manual. Changing the scripts reference
section might be bit more complicated as we also parse the scripts for the
used options, but that could maybe be done inside csg_call, too.

vo...@googlecode.com

unread,
Nov 4, 2013, 7:05:49 AM11/4/13
to votca...@googlegroups.com

Comment #13 on issue 94 by andr...@googlemail.com: cmake: rewrite
help2t2t into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

I have also added --tex option. The format is the one we are using in ctp,
but I think it will also be Ok for csg:

\subsection{votca\_property}
\label{prog:votca_property}
Helper for parsing XML files
\begin{compactitem}
\item[ ] \texttt{{-}h [ {-}{-}help ] } display this help and exit
\end{compactitem}

It would be nice to use the Application object in scripts, so that one does
not have to change formatting in two places. Python binding would be an
option. Any other ideas?

Denis

vo...@googlecode.com

unread,
Nov 4, 2013, 11:35:44 AM11/4/13
to votca...@googlegroups.com

Comment #14 on issue 94 by christop...@gmail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
http://code.google.com/p/votca/issues/detail?id=94

I saw the --tex option, that is pretty nice, too. To fully replace txt2tags
html output is still missing, which gets uploaded to www.votca.org inside
the manual build (make upload), I don't think this needs to be changed
right now. (And this could also be done with latex2html anyhow.)

Concerning the scripts, python binding might be one solution, but it will
work with python only. How about making votca_property read the help in
text or xml format from another program and translate it into man/tex,
something like:
./script --help | votca_property --in --man
That will also work for fortran, perl, shell. All scripts in csg already
have a help message looking just like the one of votca_property.

vo...@googlecode.com

unread,
Jul 1, 2015, 7:48:05 AM7/1/15
to votca...@googlegroups.com
Updates:
Cc: -rue...@votca.org
Labels: -Milestone-Release1.3 Milestone-Release1.4

Comment #15 on issue 94 by christop...@gmail.com: cmake: rewrite help2t2t
into a cmake script or direct bump of manpage
https://code.google.com/p/votca/issues/detail?id=94

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages