cliglot should handle complex arguments

Bug #354223 reported by Michael Wayne Goodman on 2009-04-03
2
Affects Status Importance Assigned to Milestone
glot
Medium
Michael Wayne Goodman

Bug Description

To be useful for those wanting to translate large bodies of text, cliglot should take stdin and consider each line as a single query. Output should probably place all results for a single query onto one line (at least by default), with each sub-result separated by some (configurable) delimiter.

(for the following examples, assume that -d is the option to specify a database, and -s is the option to specify a delimiter

Thus, if I had a file with one query per line, I could do:
$ cat words.txt | run_cliglot.sh -d myDatabase.db > results.txt

if this is the case, we could also have it be an input mode, like using grep with no input. For example,

$ cliglot.txt -d myDatabase.db -s ", "
dog
犬, perro

In the previous example, the user entered "dog", which returned two queries "犬" and "perro", separated by the delimiter ", ". After this, glot would wait for more input, or an EOF signal (ctrl-d on linux, ctrl-z on windows). In real world queries, the results would probably be much messier, so we will either need to filter them or find some way to make them readable.

Changed the bug to reflect a broader range of input:

from https://bugs.launchpad.net/glot/+bug/352819

cliglot should:

1) handle quoted args as queries (including spaces like "New York")
2) read file args
3) accept stdin

some examples:

glot "dog"
glot queries.txt
glot queries.txt "dog" more_queries.txt "cat"
cat queries.txt | glot

summary: - cliglot should allow stdin as input
+ cliglot should handle complex arguments
Changed in glot:
assignee: nobody → goodmami
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers