Operators are used to perform a specific operation in cohls
or cohl
command. following are few operators.
Create operator is used to create a session inside given directory. session object is generated by the create operator. This session object holds information about codes and how to execute the codes. the filename pattern can be extablished within the session object. to run this command we require a arguement which is title. This title is for session object which may be used while printing and exporting the files.
cohls create "practical 11 programs"
Erase operator is used to delete the session object created for this current working directory. By deleting the session object a new session can be created.
This command expects no arguements.
cohls erase
Config operator is used to make changes in session object where the pattern to execute files is stored. Config command is automatically executed once the create is executed.
Read More about configurations
cohls config
Add operator lets you add a code into the directory session object codes. These are the codes which are exported while printing or exporting.
This expects arguements used in the commands to execute while configs.
If not all required args are passed it may cause unexpected behaviour or error while gatering output of file.
cohls add ...args
arg[i] will be replaced with $i+1 in commands and filename
Pop operator is used to remove last added code into session codes.
cohls pop
Retitle operator lets you overwrite the title on codes. You can use a number as arg to specify the code which you want to retitle. By Default Retitle runs for all of the codes.
cohls retitle num
or
cohls retitle
Addpb is used to create a page break in between last added code and next code which will be added.
cohls addpb
Batch adding is used to add all the present files within the directory it selects the file which has same extension as filename while adding is specified.
Batch adding will execute add for all the selected files.
$1 argument will be replaced with the filename without extension.
if want to replace it with filename with extension we can use -ext
flag.
cohls batch
OR
cohls batch -ext
This operator is used to get help about the operators which redirects to commands.md
This operators saves all added codes as html page to current working directory with the filename as CHNP~$title.html
to cwd.
cohl savepage
Theme and font lets you set theme of code blocks and font of codes respectively.
cohl theme
cohl font
This command creates localhost web server which serves the page which can be printed to obtain pdf or prints
cohl print