Skip to content

CLI

CLI Arguments

When you install the netts package, you also get the netts commandline interface (CLI). To see all of the commands and options for the CLI, run:

netts --help

Each netts sub command also supports the --help option.

The Run Command

The netts run command will process a transcript (or directory of transcripts), building semantic MultiDiGraphs and saving them as pickled Python objects to the specified output directory. By default, netts will also draw the graphs and save them in .png format next to the pickled objects.

netts run my_transcripts output_folder
my_transcripts/
├─ transcript_1.txt
├─ transcript_2.txt

output_folder/
├─ transcript_1.pickle
├─ transcript_1.png
├─ transcript_2.pickle
├─ transcript_2.png

The netts runcommand has a few optional parameters:

Pattern

You can pass a glob pathname to filter files to process in a directory. For example, if we only wanted to process files in INPUT_DIR with the suffix _monday.txt, we could use:

netts run DIRECTORY OUTPUT_DIR --pattern "*_monday.txt"

Force

By default netts will not reprocess a file if it already exists in the output dir. If you wish to reprocess it again add the --force flag.

netts run INPUT_DIR_OR_FILE OUTPUT_DIR --force

Figure

By default netts run will create a figures and output them to OUTPUT_DIR. If you don't want figures, add the --no-figure flag:

netts run INPUT_DIR_OR_FILE OUTPUT_DIR --no-figure

You can also change the figure format, which will except any format supported by Matplotlib:

netts run INPUT_DIR_OR_FILE OUTPUT_DIR --fig-format .jpeg