to_csv_or_tsv.py
Functions to convert data returned from the Scribe-Data CLI to CSV or TSV files.
- scribe_data.cli.convert.to_csv_or_tsv.convert_to_csv_or_tsv(language: str, data_types: str | list[str], input_file: Path, output_dir: Path, output_type: str, overwrite: bool = False, identifier_case: str = 'camel') None[source]
Convert a JSON File to CSV/TSV file.
- Parameters:
- languagestr
The language of the file to convert.
- data_typesUnion[str, List[str]]
The data type of the file to convert.
- input_filePath
The input JSON file path.
- output_dirPath
The output directory path for results.
- output_typestr
The output format, should be “csv” or “tsv”.
- overwritebool
Whether to overwrite existing files.
- identifier_casestr
The case format for identifiers. Default is “camel”.
- Returns:
- None
A CSV/TSV files.