[GRASS-dev] GRASS 7 wish: Keyword index

Hi,

similar to the "topics" index:
http://grass.osgeo.org/grass70/manuals/topics.html

I would like to see a "Keywords" index in GRASS 7 which lists *all*
keywords alphabetically along with the related modules, like (with
clickable links of course):

http://grass.osgeo.org/grass70/manuals/keywords.html
aggregation: r.reclass.area, v.neighbors
allocation: v.net.alloc
area: r.surf.area, v.centroids, v.dissolve
...
random: r.random, v.random, v.sample
...

Perhaps this could be "easily" derived from the man/build_topics.py script?

Markus

Il giorno 07/mar/2013 11:28, “Markus Neteler” <neteler@osgeo.org> ha scritto:

Hi,

Hi

similar to the “topics” index:
http://grass.osgeo.org/grass70/manuals/topics.html

I would like to see a “Keywords” index in GRASS 7 which lists all
keywords alphabetically along with the related modules, like (with
clickable links of course):

http://grass.osgeo.org/grass70/manuals/keywords.html
aggregation: r.reclass.area, v.neighbors
allocation: v.net.alloc
area: r.surf.area, v.centroids, v.dissolve

random: r.random, v.random, v.sample

Perhaps this could be “easily” derived from the man/build_topics.py script?

I’ll look this wish next days…

Markus

Ciao
Luca

2013/3/7 Markus Neteler <neteler@osgeo.org>:

Hi,

Hi Markus,

similar to the "topics" index:
http://grass.osgeo.org/grass70/manuals/topics.html

I would like to see a "Keywords" index in GRASS 7 which lists *all*
keywords alphabetically along with the related modules, like (with
clickable links of course):

what should be the difference with topics?

build_topics.py already look for "Keywords"....

Markus

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

On Fri, Mar 8, 2013 at 10:05 AM, Luca Delucchi <lucadeluge@gmail.com> wrote:

2013/3/7 Markus Neteler <neteler@osgeo.org>:

Hi,

Hi Markus,

similar to the "topics" index:
http://grass.osgeo.org/grass70/manuals/topics.html

I would like to see a "Keywords" index in GRASS 7 which lists *all*
keywords alphabetically along with the related modules, like (with
clickable links of course):

what should be the difference with topics?

It is completely different.

The resulting 1 page should look like this:

Keywords:
* aggregation: r.reclass.area, v.neighbors
* allocation: v.net.alloc
* area: r.surf.area, v.centroids, v.dissolve
* ...
* random: r.random, v.random, v.sample
* ...
* sampling: d.where, r.random.cells, r.random, t.sample,
t.vect.observe.strds, t.vect.what.strds, v.drape, v.random, v.sample,
v.what.rast3, v.what.rast, v.what.vect
* ...

So, the script needs to scan all modules for their keywords and then
create a page which relates the keywords to module names.
Hope this clarifies the idea. At time we cannot easily look up which
modules offer a certain functionality.

ciao
Markus

Markus wrote:

So, the script needs to scan all modules for their keywords
and then create a page which relates the keywords to module
names.
Hope this clarifies the idea. At time we cannot easily look
up which modules offer a certain functionality.

sounds like a job for a sqlite db. (see e.g. tools/sql.sh)
[please can we rename "sql.sh" to something more informative?]

for tools/module_synopsis.sh what I did is try a clean build with
all options turned on, then run though the bin/ and scripts/ dirs
and run --interface-description on everything.
http://grassold.osgeo.org/gdp/grassmanuals/grass64_module_list.html#db

another way is to cd into doc/html/ and parse all the files there.
(html is a marked-up format at its root, doesn't hurt to use that)

Hamish

2013/3/8 Markus Neteler <neteler@osgeo.org>:

It is completely different.

The resulting 1 page should look like this:

Keywords:
* aggregation: r.reclass.area, v.neighbors
* allocation: v.net.alloc
* area: r.surf.area, v.centroids, v.dissolve
* ...
* random: r.random, v.random, v.sample
* ...
* sampling: d.where, r.random.cells, r.random, t.sample,
t.vect.observe.strds, t.vect.what.strds, v.drape, v.random, v.sample,
v.what.rast3, v.what.rast, v.what.vect
* ...

So, the script needs to scan all modules for their keywords and then
create a page which relates the keywords to module names.
Hope this clarifies the idea. At time we cannot easily look up which
modules offer a certain functionality.

I just upload (r55313) the new script (build_keywors.py) to create the
page. This page (keywords.html) actually is not linked in any pages of
documentation but you can see it with the direct link (you can also
find it in (dist.*/docs/html/keywords.html)
At this point I think we should replace topics.html page with this
new, what do you think?

ciao
Markus

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

On Mon, Mar 11, 2013 at 1:54 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

2013/3/8 Markus Neteler <neteler@osgeo.org>:

..

The resulting 1 page should look like this:

Keywords:

...
Great job!

I made a few minor cosmetics and uploaded the current file here:

http://grass.osgeo.org/grass70/manuals/keywords.html

At this point I think we should replace topics.html page with this
new, what do you think?

Maybe, maybe not.. the scope is a bit different.
What do the others think?

Markus

Hi,

2013/3/11 Markus Neteler <neteler@osgeo.org>:

[...]

At this point I think we should replace topics.html page with this
new, what do you think?

Maybe, maybe not.. the scope is a bit different.
What do the others think?

I would keep both. Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

On Mon, Mar 11, 2013 at 5:44 PM, Markus Neteler <neteler@osgeo.org> wrote:

http://grass.osgeo.org/grass70/manuals/keywords.html

Thanks to Luca now also in alphabetical order.

@devs: a nice occasion to revisit some keywords (spelling, consistency).

Markus

On 11/03/13 17:44, Markus Neteler wrote:

On Mon, Mar 11, 2013 at 1:54 PM, Luca Delucchi<lucadeluge@gmail.com> wrote:

2013/3/8 Markus Neteler<neteler@osgeo.org>:

..

The resulting 1 page should look like this:

Keywords:

...
Great job!

I made a few minor cosmetics and uploaded the current file here:

http://grass.osgeo.org/grass70/manuals/keywords.html

At this point I think we should replace topics.html page with this
new, what do you think?

Maybe, maybe not.. the scope is a bit different.
What do the others think?

I haven't followed this close enough, but could someone explain the difference between the two ? And why (as an example) r.kappa should be in the classification as keyword list and not in the classification as topic list ?

AFAICS both use the keywords section in the html man pages as source.

Just trying to understand why we would need the two which might confuse people, especially if the difference is not only presentation, but also content.

Moritz

On Tue, Mar 12, 2013 at 11:17 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

I haven't followed this close enough, but could someone explain the
difference between the two ?

Just open both :slight_smile:

http://grass.osgeo.org/grass70/manuals/keywords.html
http://grass.osgeo.org/grass70/manuals/topics.html

And why (as an example) r.kappa should be in
the classification as keyword list and not in the classification as topic
list ?

1) The raster/vector/... pages depend on the *first* keyword.

2) The topics.html page(s) depends *only* on the second keyword.

3) The new keywords.html shows *all* keywords.

Now it is up to us to repolish the keywords another time...

Markus

Neat work…

Thanks guy !

···

On 12 March 2013 15:07, Markus Neteler <neteler@osgeo.org> wrote:

On Mon, Mar 11, 2013 at 5:44 PM, Markus Neteler <neteler@osgeo.org> wrote:

http://grass.osgeo.org/grass70/manuals/keywords.html

Thanks to Luca now also in alphabetical order.

@devs: a nice occasion to revisit some keywords (spelling, consistency).

Markus


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Yann Chemin

Researcher@IWMI

Skype/FB: yann.chemin

On 12/03/13 11:21, Markus Neteler wrote:

On Tue, Mar 12, 2013 at 11:17 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

I haven't followed this close enough, but could someone explain the
difference between the two ?

Just open both :slight_smile:

http://grass.osgeo.org/grass70/manuals/keywords.html
http://grass.osgeo.org/grass70/manuals/topics.html

And why (as an example) r.kappa should be in
the classification as keyword list and not in the classification as topic
list ?

1) The raster/vector/... pages depend on the *first* keyword.

2) The topics.html page(s) depends *only* on the second keyword.

3) The new keywords.html shows *all* keywords.

Except for the major (blacklisted) ones such as raster, vector, display, etc.

So, the main difference is how many keywords are used. I still believe that one such page should be enough (and more will create confusion), and I think keywords.html is the way to go (more complete, easy to use). But if others see a use in topics.html, I won't make a fight of it :wink:

Moritz

Thinking about the style of keywords.html page, I discovered that the
h2 and h3 have the same font-size in CSS [1]. Is it an intention?

And about the style itself. I would suggest to use description (dl)
instead of bullet list. The change in code is small but I don't want
to do it without asking others.

[1] http://grass.osgeo.org/grass70/manuals/grassdocs.css

On 12 March 2013 11:43, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 12/03/13 11:21, Markus Neteler wrote:

On Tue, Mar 12, 2013 at 11:17 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

I haven't followed this close enough, but could someone explain the
difference between the two ?

Just open both :slight_smile:

http://grass.osgeo.org/grass70/manuals/keywords.html
http://grass.osgeo.org/grass70/manuals/topics.html

And why (as an example) r.kappa should be in
the classification as keyword list and not in the classification as topic
list ?

1) The raster/vector/... pages depend on the *first* keyword.

2) The topics.html page(s) depends *only* on the second keyword.

3) The new keywords.html shows *all* keywords.

Except for the major (blacklisted) ones such as raster, vector, display,
etc.

So, the main difference is how many keywords are used. I still believe that
one such page should be enough (and more will create confusion), and I think
keywords.html is the way to go (more complete, easy to use). But if others
see a use in topics.html, I won't make a fight of it :wink:

Moritz

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Tue, Mar 12, 2013 at 6:58 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Thinking about the style of keywords.html page, I discovered that the
h2 and h3 have the same font-size in CSS [1]. Is it an intention?

I darkly remember that a font smaller than "medium" (used for h4) seems
to be too small, so h3 and h4 were made the same.
Suggestions are welcome.

And about the style itself. I would suggest to use description (dl)
instead of bullet list. The change in code is small but I don't want
to do it without asking others.

Can you give an example of improvement?

[1] http://grass.osgeo.org/grass70/manuals/grassdocs.css

Markus

On 12 March 2013 19:45, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Mar 12, 2013 at 6:58 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Thinking about the style of keywords.html page, I discovered that the
h2 and h3 have the same font-size in CSS [1]. Is it an intention?

I darkly remember that a font smaller than "medium" (used for h4) seems
to be too small, so h3 and h4 were made the same.
Suggestions are welcome.

Hm, for me after deleting font-size setting the page looks good. h2 is
bigger than now, h3 is the same as h2 and h3 now. h2 on module page
are uppercased, so they may look bit more important by itself. This
was maybe the reason for setting the same sizes. I tried to set sizes
and get the same result (same sizes). I'm not satisfied but I don't
know what to do.

And about the style itself. I would suggest to use description (dl)
instead of bullet list. The change in code is small but I don't want
to do it without asking others.

Can you give an example of improvement?

It would be the same as the Flags section at module page (the flag
description is <dl>). It would be cleaner than the current state -- no
bullets, no double colons. The keyword would be bold (<b>) on separate
line and the list of modules would be on the other line.

[1] http://grass.osgeo.org/grass70/manuals/grassdocs.css

Markus

On Tue, Mar 12, 2013 at 8:34 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On 12 March 2013 19:45, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Mar 12, 2013 at 6:58 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Thinking about the style of keywords.html page, I discovered that the
h2 and h3 have the same font-size in CSS [1]. Is it an intention?

I darkly remember that a font smaller than "medium" (used for h4) seems
to be too small, so h3 and h4 were made the same.
Suggestions are welcome.

Hm, for me after deleting font-size setting the page looks good. h2 is
bigger than now, h3 is the same as h2 and h3 now. h2 on module page
are uppercased, so they may look bit more important by itself. This
was maybe the reason for setting the same sizes. I tried to set sizes
and get the same result (same sizes). I'm not satisfied but I don't
know what to do.

@all:
For fun I have deleted the size definitions on the server. You can
reload the manual to see the effect as suggested by Vaclav.

Next Saturday it will be overwritten unless changes are committed
to SVN.

And about the style itself. I would suggest to use description (dl)
instead of bullet list. The change in code is small but I don't want
to do it without asking others.

Can you give an example of improvement?

It would be the same as the Flags section at module page (the flag
description is <dl>). It would be cleaner than the current state -- no
bullets, no double colons. The keyword would be bold (<b>) on separate
line and the list of modules would be on the other line.

Sounds good to me.

Perhaps, to not mess up the other pages, have some special
keywords style? Could also go into the page header itself.

Markus

On Tue, Mar 12, 2013 at 8:49 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Mar 12, 2013 at 8:34 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On 12 March 2013 19:45, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Mar 12, 2013 at 6:58 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Thinking about the style of keywords.html page, I discovered that the
h2 and h3 have the same font-size in CSS [1]. Is it an intention?

I darkly remember that a font smaller than "medium" (used for h4) seems
to be too small, so h3 and h4 were made the same.
Suggestions are welcome.

Hm, for me after deleting font-size setting the page looks good. h2 is
bigger than now, h3 is the same as h2 and h3 now. h2 on module page
are uppercased, so they may look bit more important by itself. This
was maybe the reason for setting the same sizes. I tried to set sizes
and get the same result (same sizes). I'm not satisfied but I don't
know what to do.

@all:
For fun I have deleted the size definitions on the server. You can
reload the manual to see the effect as suggested by Vaclav.

Next Saturday it will be overwritten unless changes are committed
to SVN.

And about the style itself. I would suggest to use description (dl)
instead of bullet list. The change in code is small but I don't want
to do it without asking others.

Can you give an example of improvement?

It would be the same as the Flags section at module page (the flag
description is <dl>). It would be cleaner than the current state -- no
bullets, no double colons. The keyword would be bold (<b>) on separate
line and the list of modules would be on the other line.

Sounds good to me.

Done in r55341. Feel free to revert or change.

Perhaps, to not mess up the other pages, have some special
keywords style? Could also go into the page header itself.

Probably no special style is needed.

Anna

Markus
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Tue, Mar 12, 2013 at 10:52 PM, Anna Kratochvílová
<kratochanna@gmail.com> wrote:

On Tue, Mar 12, 2013 at 8:49 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Mar 12, 2013 at 8:34 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

...

It would be the same as the Flags section at module page (the flag
description is <dl>). It would be cleaner than the current state -- no
bullets, no double colons. The keyword would be bold (<b>) on separate
line and the list of modules would be on the other line.

Sounds good to me.

Done in r55341. Feel free to revert or change.

very nice indeed!
http://grass.osgeo.org/grass70/manuals/keywords.html

Markus

+1

On 13 March 2013 03:32, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Mar 12, 2013 at 10:52 PM, Anna Kratochvílová
<kratochanna@gmail.com> wrote:

On Tue, Mar 12, 2013 at 8:49 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Mar 12, 2013 at 8:34 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

...

It would be the same as the Flags section at module page (the flag
description is <dl>). It would be cleaner than the current state -- no
bullets, no double colons. The keyword would be bold (<b>) on separate
line and the list of modules would be on the other line.

Sounds good to me.

Done in r55341. Feel free to revert or change.

very nice indeed!
http://grass.osgeo.org/grass70/manuals/keywords.html

Markus
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Yann Chemin
Researcher@IWMI
Skype/FB: yann.chemin