Scribe-Data provides a command-line interface (CLI) for efficient interaction with its language data functionality.
To utilize the Scribe-Data CLI, you can execute the following command in your terminal:
scribe-data [command] [options]list(l): Enumerate available languages, data types and their combinations.get(g): Retrieve data from Wikidata for specified languages and data types.total(t): Display the total available data for given languages and data types.convert(c): Transform data returned by Scribe-Data into different file formats.
The following arguments can be passed to the Scribe-Data commands whenever sensible:
--language(-lang): The language to run the command for.--data-type(-dt): The data type to run the command for.--file(-f): The path to a file to run the command on.--output-dir(-od): The path to a directory for the outputs of the command.--output-type(-ot): The file type that the command should output.--outputs-per-entry(-ope): How many outputs should be generated per data entry.--all(-a): Get all results from the command.
-
Display all available options:
scribe-data list # -a --all -
Display available languages:
scribe-data list -lang # --language -
Display available data types:
scribe-data list -dt # --data-type
-
Display total available data for a specific data type (e.g. nouns):
scribe-data total -dt nouns
-
Display total available data for a specific language (e.g. English):
scribe-data total -lang English
-
Display total available data for both language and data type (e.g. English nouns):
scribe-data total -lang English -dt nouns
-
Get all available languages and data types:
scribe-data get -a # --all -
Get specific language and data type (e.g. German nouns):
scribe-data get -lang German -dt nouns
-
Retrieve data for both language and data type (e.g. English nouns) in CSV format:
scribe-data get -lang english -dt verbs -od ./output_data -ot csv
-
Retrieve data for both language and data type (e.g. English nouns) in TSV format:
scribe-data get -lang english -t verbs -od ./output_data -ot tsv
The CLI also offers an interactive get mode, which can be initiated with the following command:
scribe-data get -i # --interactiveThis mode guides users through the data retrieval process with a series of prompts:
- Language selection: Users can choose from a list of available languages or select all.
- Data type selection: Users can specify which types of data to get.
- Output configuration: Users can set the file format, export directory, and overwrite preferences.
The interactive mode is particularly useful for users who prefer a guided approach or are exploring the available data options.
For more detailed information on each command and its options, append the --help flag:
scribe-data -h # --help
scribe-data [command] -hThe CLI also has functions to check the version and upgrade the package if necessary.
scribe-data -v # --version
scribe-data -u # --upgradeFor comprehensive usage instructions and examples, please refer to the official documentation.