Skip to content

Latest commit

 

History

History

scripts

Utility Scripts

Installation

Prerequisites

  • Python
  • Graphviz for creating provenance graphs of translation entities.

Installation

pip install -r requirements.txt

Usage

grap_prov.py

This script generates a provenance graph from a PROV-JSON file containing the edit history of a translation entity.

python graph_prov.py <prov.json>

gcs_download_prov.py

This script downloads PROV-JSON files from a Google Cloud Storage bucket. These files are generated by the Seed-CAT application when it is configured with the GOOGLE_APPLICATION_CREDENTIALS and GCS_BUCKET environment variables.

python gcs_download_prov.py --prefix "<gcs-path-prefix>" --bucket "<gcs-bucket>" --directory "<local-target-directory>"

gcs_download_translations.py

This script downloads and combine all translation files from a Google Cloud Storage bucket. These files are generated by the Seed-CAT application when it is configured with the GOOGLE_APPLICATION_CREDENTIALS and GCS_BUCKET environment variables. The output file is corpus.txt.

python gcs_download_prov.py --prefix "<gcs-path-prefix>" --bucket "<gcs-bucket>"