scribe-org / Scribe-Data

Wikidata and Wikipedia language data extraction
GNU General Public License v3.0
18 stars 21 forks source link

Discuss and possibly implement `--interactive` CLI arguments #158

Closed andrewtavis closed 3 weeks ago

andrewtavis commented 1 month ago

Terms

Description

This issue is first a discussion and then potentially an implementation of an --interactive (-i) command for the Scribe-Data CLI. This might help users more easily explore and onboard to the CLI by providing options that they can choose from :)

It could work something like:

scribe-data query -i

Language options:
--------------------------------
| 1. English | 2. French | ... |
--------------------------------

Please enter the languages to query data for, their numbers or (a) for all languages: a

Word type options:
-----------------------------
| 1. nouns | 2. verbs | ... |
-----------------------------

Please enter the word types to query data for, their numbers or (a) for all word types: 1
File type to export (json, csv, tsv, sqlite) [json]: json
Export directory path [./scribe_data_json_export]:
Overwrite existing data without asking (y, n) [n]: y

Querying nouns for all languages that will be exported as JSONs to './scribe_data_json_export' ...

How the above would work for list is a question ๐Ÿค”

Contribution

Happy to discuss and eventually help implement this! Options would basically come from list commands and command arguments :)

andrewtavis commented 1 month ago

CC @wkyoshida and @mhmohona :) Let me know what you think of the above! Wouldn't necessarily be a part of GSoC, but could be if there's interest ๐Ÿ˜Š

andrewtavis commented 1 month ago

Note from the meeting just now, we wouldn't need this to just be scribe-data q -i, but we could just do scribe-data -i :) We could skip the first step by providing a command though ๐Ÿ˜Š

andrewtavis commented 1 month ago

CC @mhmohona for working on this, please write in here :)

mhmohona commented 1 month ago

Got it! โœจ

mhmohona commented 1 month ago

@andrewtavis, what do you think? image

andrewtavis commented 1 month ago

This is looking amazing, @mhmohona! I think that we will need to eventually shift over to have a grid of selections as when we have 20-30 languages a list won't be the best user experience, but then we can make a separate issue for this once this is merged ๐Ÿ˜Š

wkyoshida commented 1 month ago

Hey! :wave: Not sure if what you had in mind @andrewtavis was something along the lines of a Terminal UI kinda deal with the --interactive option. Something like the image below:

image

where the CLI takes up the terminal with its interface, but could be an idea on how to implement this as well :thinking: Would be cool! But we can discuss how much of this we'd want to actually include within GSoC.

Anyways - looks like we would be able to do this if we learn some curses :hand_over_mouth: Looks like this is a library that would enable us to do this. Refs:

andrewtavis commented 1 month ago

This is really interesting, @wkyoshida! We could maybe look into this after GSoC, with what @mhmohona has for #167 being the majority of what we get done for the program?

andrewtavis commented 3 weeks ago

Closed via #167 ๐Ÿ˜Š We can add to this as we go, and there seem to be some minor bugs that we can figure out before the v4.0 release, but great progress here!