CLI fleshout

Bug #352819 reported by Michael Clay
2
Affects Status Importance Assigned to Milestone
glot
Fix Committed
Medium
Michael Wayne Goodman

Bug Description

CLI glot needs to be more fleshed out. it currently offers no useful debugging messages and has no functionality aside from initializing a database. It is primarily a debug tool, however that should be no incentive not to get it running properly. A debug tool is useless if it doesn't provide the development team with useful feedback.

It requires the following:
1) Descriptive error messages
2) Command line arguments
3) Usage messages

Among other things it has been proposed that there should be a client/server aspect to CLI glot so that the CLI doesn't need to instantiate a database all the time.

Changed in glot:
assignee: nobody → goodmami
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Michael Wayne Goodman (goodmami) wrote :

G'day Emily, here's some low hanging fruit for you to try.

In cliglot.py, check the number of arguments (sys.argv holds these). If there are no arguments, print a usage message.
The usage message should print to sys.stderr, and say what the user needs to provide to run the code (currently it's a database file and a query).

If you're feeling ambitious, you can implement this with the getopt package. This is not necessary for now, though.

Lemme know if you have any questions.

Changed in glot:
assignee: goodmami → nashife
Revision history for this message
Michael Wayne Goodman (goodmami) wrote :

Misunderstood Emily's intention to contribute code. She might be back later, when she's more in a position to devote time to the project. Assigning back to me.

Changed in glot:
assignee: nashife → goodmami
Revision history for this message
Michael Wayne Goodman (goodmami) wrote :

Added getopt-style arguments, a usage message, an extended help message, and near-complete argument handling.

The arguments still need to:
1) handle quoted args as queries (including spaces like "New York")
2) read file args
3) accept stdin

It also needs to go into interactive mode when no arguments or stdin are provided.

These are mentioned in https://bugs.launchpad.net/glot/+bug/354223

Changed in glot:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.