-
Notifications
You must be signed in to change notification settings - Fork 0
Required Flags
This section requires that you understand the concept of file paths. If you're unaware of what file paths are, consider reading this article here to help you learn. Note that the style of any operating system's file paths can be different, so make sure you know how your operating system structures its file paths as well.
"file program will read from"
The -r
or --read-file
flag requires one argument. One essential flag you need to use to get line_brkr.py
to run is the -r
or --read-file
which specifies which file line_brkr.py
will read from. To use this flag properly, the argument provided must be a valid file/path, the file must have read access, and the file must be an .rpy
file. If these requirements are met, the input of line_brkr.py
will be read from the contents of the given read file.
For example, writing this command:
python line_brkr.py -r script.rpy
Tells line_brkr.py
that there should be a script.rpy
file that it can read from.
Furthermore, writing this command:
python line_brkr.py -r somedirectory\script.rpy
Tells line_brkr.py
that there should be a script.rpy
file within the directory somedirectory
that it can read from.
The second essential flag you need to use to get line_brkr.py
to run is one of the possible write flags. There are two to chose from, the -w
/--write-file
or the -o
/--overwrite-file
. Note that you can only use one write flag else line_brkr.py
will throw an Exception
.
"if not overwriting the read file, set file program will write to"
The -w
or --write-file
flag requires one argument. To use the -w
or --write-file
flag properly, the argument provided must be a valid file/path, the file must have write access (if it already exists), and the file must be an .rpy
file. If these requirements are met, the output of line_brkr.py
will be written to the given write file (or a new file if the write file does not exist).
For example, writing this command:
python line_brkr.py -r script.rpy -w new_script.rpy
Tells line_brkr.py
to write to the file new_script.rpy
within the same directory as line_brkr.py
.
Furthermore, writing this command:
python line_brkr.py -r script.rpy -w somedirectory\new_script.rpy
Tells line_brkr.py
to write to the file new_script.rpy
file within the directory somedirectory
(if it already exists. If not, it will create the directory somedirectory
).
"if not writing to a set file, overwrite read file with program output"
The -o
or --overwrite-file
requires no arguments. To use the -o
or --overwrite-file
flag properly, whatever argument provided to the -r
or --read-file
flag must be a valid file/path, the file must have write access, and the file must be an .rpy
file. If these requirements are met, the contents of the read file will be overwritten by the output of line_brkr.py
.
For example, writing this command:
python line_brkr.py -r script.rpy -o
Is effectively the same as writing the command:
python line_brkr.py -r script.rpy -w script.rpy