# flash-cli
This is a command-line productivity tool used internally by the PingCAP Education team for various tasks.

## Quick Start
0. Set the `OPENAI_API_KEY` environment variable in your terminal environment.
1. Install [Anaconda](https://www.anaconda.com).
2. To create an environment for the `Flash` command line tool, you can name it `flash` by executing the following command for example: 
   
      `(base) $ conda create -n flash python=3.9 -y`

3. To switch to the recently created conda environment, use the following command after creating it.
   
      `(base) $ conda activate flash`

4. Clone this repository.

      `(flash) $ git clone https://github.com/pingcap-inc/pingcap.pe.flash.git && cd pingcap.pe.flash`

5. Install `pingcap.pe.flash` command line tool: 

      `(flash) $ ./bin/userMode.sh`

6. Generate a sample course folder structure under the `Flash` local repository to verify the installation (it will change nothing except copying some PowerPoint templates into `template/` directory, and the `template/` directory is sefely ignored by git version control): 

      `(flash) $ flash-init-course-folder.sh .`

7. Generate a sample PowerPoint slide to verify the installation: 

      `(flash) $ dual-lang-check-enja.sh 03 01`

      You can locate the PowerPoint slides (for English and Japanese) that were generated within the `stage/` directory.
      <img src="./pic/example.png" width="50%" align="top"/>

8. *Optionally*, you may install Graphviz to enable diagramming capabilities. We use it to describe the resources in the Cloud. To install Graphviz using Conda, type: 

      `(flash) $ conda install python-graphviz`.

## Dictionaries used in flash-cli
+ [Terms & abbreviations](./pingcap/pe/flash/en-terms.csv)
+ [English to Japanese (dynamic block list, case insensitive)](./pingcap/pe/flash/flash-en2ja-blocklist-dictionary-ci.csv) 
+ [English to Japanese (dynamic block list, case sensitive)](./pingcap/pe/flash/flash-en2ja-blocklist-dictionary-cs.csv)
+ [English to Japanese (errata, case sensitive)](./pingcap/pe/flash/flash-en2ja-static-errata-cs.csv)