RE: [GRASS-dev] Grass Documentation How-to html page

-----Original Message-----
From: Hamish
To: Patton, Eric
Cc: grass-dev@grass.itc.it
Sent: 10/2/2006 1:38 AM
Subject: Re: [GRASS-dev] Grass Documentation How-to html page

Eric wrote:

Borrowing heavily from my conversations with Maciek, I have written a
step-by-step how-to for improving Grass documentation

Hamish:

Glad to see this, sometimes with GRASS development I think (like GIS)
often the answers are simple to find & easy to enact, *if you know where
to look* before you start looking. This sort of tutorial goes a long way
to fixing that problem.

Thanks.

Hmaish:

Can you put this up on the wiki? (probably in the development section)

Sure.

Hamish:

Add a link to help page translation efforts?

Sure.

Hamish:

link to the CVS web interface, or write a script to pluck the latest
description.html file for any given module. (aim for really low barrier
to entry) Little html experience is needed.

I thought I had included a link to the CVS how-to :

"To begin, you must obtain the latest Grass source code from the CVS
repositories. Detailed instructions on how to do so can be found <a
href:"http://grass.itc.it/faq/cvs_howto&quot;&gt;here\.&lt;/a&gt;&quot;

But I think I got the formatting wrong, because this link is broken; it just
links back to itself. Actually, all the html links don't work. Can you see
anything obviously wrong?

Hamish:

Note how to add images. (r.terraflow, v.voronoi,...)
see doc/html_documentation.txt

Ok, I'll have to brush up on how to do this, as I've never tried it yet.

Eric:

Once you have downloaded the CVS source code, open a terminal and
change directory to /your_cvs_directory/grass6/vector/v.in.ascii. You
have to make your edits/corrections to the original copy of the
module's description.html page within grass6/vector/v.in.ascii, not a
copy of this page.
Open a text editor and make your edits to description.html. Depending
on where your cvs source is on disk, you may have to do so as root
(Ex: sudo gedit description.html). Save your edits by overwriting the
original description.html.

Hamish:

There's no reason you can't make a copy and work from that, and no
reason you have to be root. T "cvs diff" may no longer work, but that's not

the end of the

world if you hung on to the original.

Maciek had advised me to make diffs from the original description html,
because I had tried diffing a copy of a manpage somewhere in /home, and he
had problems applying it to CVS. (?) I'm not sure why it didn't work, just
following suggestions. I'll CC: him on this to see why.

Hamish:

The CVS source doesn't need to have any superuser access, it's proably very

good advice that >it isn't given such rights.

My cvs source is located in /opt, where my Grass installation folder is
located, so that's probably why I wrote that. I'll modify that to include
your suggestions.

Hamish:

If editing in the source tree is a problem, just make a copy of the file
and:

diff -u /usr/src/grass/.../description.html description.html.NEW

I think this was what I tried originally with Maciek, where we ran into
problems. Not sure. Aanyway, I'll change the how-to to mention that one copy
any description.html into a safe place like /home, make edits, then create a
diff -u against their source description.html - sound good?

Thanks for the feedback,

~ Eric.

Patton, Eric wrote:

Maciek had advised me to make diffs from the original description
html, because I had tried diffing a copy of a manpage somewhere in
/home, and he had problems applying it to CVS. (?) I'm not sure why it
didn't work, just following suggestions. I'll CC: him on this to see
why.

Guess: there are 355 or so files called description.html in the grass
source code. If you move the file out of the module's directory it is
hard for the CVS to know where to put it. Run diff from the top
directory of the source code and then the directory structure (and
module name) are preserved.

My point was more along the lines of the grass source code tree &
compiling can and should be done as a regular user. Only jump to the
superuser to install the finished product. If a script goes wrong during
the compile process much less damage will be done to your system that
way.

Hamish

Hamish wrote:

Patton, Eric wrote:

Maciek had advised me to make diffs from the original description
html, because I had tried diffing a copy of a manpage somewhere in
/home, and he had problems applying it to CVS. (?) I'm not sure why it
didn't work, just following suggestions. I'll CC: him on this to see
why.

Eric,

I asked you for that, because if the diff header looks like this:

Index: description.html

RCS file:
/home/grass/grassrepository/grass6/vector/v.segment/description.html,v
retrieving revision 1.4
diff -u -r1.4 description.html
--- description.html 2 Jan 2006 14:44:52 -0000 1.4
+++ description.html 26 Sep 2006 19:03:32 -0000

  it is easy to apply to cvs, but if it is like:

--- description.html 2005-11-04 09:39:12.000000000 -0400
+++ v.out.ascii_improved.html 2006-08-29 12:04:27.000000000 -0300

it is not that easy, at least I can't (this might be the main problem
;)) without further manual editing.

There's got be something to it because
http://grass.itc.it/devel/index.php#submission reads:

"In general, please generate differences to the current CVS instead of
sending full files:
cvs diff -u [file.c] > grassdiff"

I realize it might be to cumbersome and discourage many eventuall
commiters, but on the other hand it is also necessary to keep applying
the changes into CVS simple. I'd love to have a compromise solution -
an easy way for creating documentation diffs, which will also be easy
to apply to cvs.

I'm a complete CVS noob and I don't have time to investigate that
further in the momment, so any thoughts are wellcome.

Best,
Maciek

P.S.
Eric, thanks for taking care of this. Your how-to will surely help many
folks to get involved!