Opened 6 years ago

Last modified 5 years ago

#3624 new enhancement

Let g.search.modules list all modules

Reported by: Nikos Alexandris Owned by: grass-dev@…
Priority: minor Milestone: 7.8.3
Component: Python Version: svn-trunk
Keywords: g.search.modules Cc:
CPU: Unspecified Platform: Unspecified

Description

See also: https://gis.stackexchange.com/a/179178/5256.

Just an idea, adding in _search_module() (under https://trac.osgeo.org/grass/browser/grass/trunk/scripts/g.search.modules/g.search.modules.py#L203):

if keywords == ['*']:
    all_modules = []

    for item in items:
        name = item.attrib['name']
        description = item.find('description').text
        module_keywords = item.find('keywords').text

        all_modules.append({
            'name': name,
            'attributes': {
                'keywords': module_keywords,
                'description': description
            }
        })

     return all_modules

works as a proof of concept. Or, add another flag, like -l that will will do this?

This would make it easy to get the full list of existing modules for further processing with standard *nix tools.

Change History (7)

in reply to:  description comment:1 by neteler, 6 years ago

Replying to Nikos Alexandris:

This would make it easy to get the full list of existing modules for further processing with standard *nix tools.

That would be very good. Especially, since JSON output is available.

comment:2 by Nikos Alexandris, 6 years ago

See also #3751.

comment:3 by neteler, 6 years ago

Component: DefaultPython
Keywords: g.search.modules added
Milestone: 7.8.0
Version: unspecifiedsvn-trunk

comment:4 by neteler, 5 years ago

Milestone: 7.8.07.8.1

Ticket retargeted after milestone closed

comment:5 by neteler, 5 years ago

Milestone: 7.8.17.8.2

Ticket retargeted after milestone closed

comment:6 by neteler, 5 years ago

Milestone: 7.8.2

Ticket retargeted after milestone closed

comment:7 by neteler, 5 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.