Opened 8 years ago

Last modified 5 years ago

#2804 new enhancement

pattern option for t.list and t.remove

Reported by: veroandreo Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Temporal Version: unspecified
Keywords: t.list, t.remove Cc:
CPU: Unspecified Platform: Linux

Description

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??

Change History (13)

comment:1 by veroandreo, 8 years ago

Milestone: 7.0.4
Platform: UnspecifiedLinux

comment:2 by lucadelu, 8 years ago

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.

comment:3 by martinl, 8 years ago

Milestone: 7.0.47.0.5

comment:4 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:5 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:6 by lucadelu, 7 years ago

Could someone answer to my question?

so I could work on this ticket...

comment:7 by veroandreo, 7 years ago

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

in reply to:  2 comment:8 by neteler, 7 years ago

Replying to 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.

comment:9 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:10 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:11 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:12 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:13 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.