[GRASS-dev] [GRASS GIS] #2804: pattern option for t.list and t.remove

#2804: pattern option for t.list and t.remove
------------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Temporal | Version: unspecified
Keywords: t.list, t.remove | CPU: Unspecified
Platform: Unspecified |
------------------------------+-------------------------
Would that be possible to have a "pattern" option both in t.list and
t.remove (as we have in g.list and g.remove) to make it easier to search
and remove stds according to a pattern in their name??

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2804&gt;
GRASS GIS <https://grass.osgeo.org>

#2804: pattern option for t.list and t.remove
--------------------------+------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.4
Component: Temporal | Version: unspecified
Resolution: | Keywords: t.list, t.remove
       CPU: Unspecified | Platform: Linux
--------------------------+------------------------------
Changes (by veroandreo):

* platform: Unspecified => Linux
* milestone: => 7.0.4

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2804#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#2804: pattern option for t.list and t.remove
--------------------------+------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.4
Component: Temporal | Version: unspecified
Resolution: | Keywords: t.list, t.remove
       CPU: Unspecified | Platform: Linux
--------------------------+------------------------------

Comment (by lucadelu):

Soeren (and all) I looked into code of t.list and I discovered two
possible way to implement this:
- simpler add into get_dataset_list function a LIKE operetor passing the
pattern string
- more complex using the python fnmatch module to fetch the right
databases, but in this case we should get always the name of dataset in
the query and later check if it is a required column otherwise not
print/write the field

What do you suggest? (also other ways are welcome)

Solving the list problem also the remove one should be simpler to
implement.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2804#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2804: pattern option for t.list and t.remove
--------------------------+------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.4.0
Component: Temporal | Version: unspecified
Resolution: | Keywords: t.list, t.remove
       CPU: Unspecified | Platform: Linux
--------------------------+------------------------------

Comment (by lucadelu):

Could someone answer to my question?

so I could work on this ticket...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2804#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#2804: pattern option for t.list and t.remove
--------------------------+------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.4.0
Component: Temporal | Version: unspecified
Resolution: | Keywords: t.list, t.remove
       CPU: Unspecified | Platform: Linux
--------------------------+------------------------------

Comment (by veroandreo):

G7:t.unregister would also benefit from a "pattern" option :slight_smile:

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2804#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#2804: pattern option for t.list and t.remove
--------------------------+------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.4.0
Component: Temporal | Version: unspecified
Resolution: | Keywords: t.list, t.remove
       CPU: Unspecified | Platform: Linux
--------------------------+------------------------------

Comment (by neteler):

Replying to [comment:2 lucadelu]:
> Soeren (and all) I looked into code of t.list and I discovered two
possible way to implement this:
> - simpler add into get_dataset_list function a LIKE operetor passing the
pattern string

Would there be the problem that the LIKE operator behaviour then depends
on the DB backend?

> - more complex using the python fnmatch module to fetch the right
databases, but in this case we should get always the name of dataset in
the query and later check if it is a required column otherwise not
print/write the field
>
> What do you suggest? (also other ways are welcome)
>
> Solving the list problem also the remove one should be simpler to
implement.

Overall, it would be good to achieve a similar usability as for
g.list/g.remove if all possible.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2804#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>