Skip to content

CLSC intoduction and usage

EmmanuelTigo edited this page May 14, 2024 · 8 revisions

Welcome to the CLI_Source_Control wiki!


This new tool is gonna help speed up your projects and command line control you'd never regret using it... It is called command line source control I'll be documenting how to use the tool in your terminal/tty it's very easy to use and saves you all the stress and repetitive tasks it is written in python and handles committing, pushing, staging changes. creating py files and functions, classes, etc although it's still under development it's ready and can help a lot..

HOW TO USE

INSTALLING THE TOOL:

run the install.sh file as root eg, sudo ./install.sh and sit tight till it installs

instal1 install2

USING THE TOOL

run sc -h for help message on how to use the tool stage files, commit, and push to git (utilizing the "git add, commit, push" ) example: run sc -a 'filename' -c -p

helpdemo

it asks for commit messages and pushes automatically

source_demo

you can still run sc -p to push after sc -a 'filename' -c

Note that sc -a and -c must be executed together otherwise it won't commit but exist successfully ** Note** sc will check if the current dir is a git repository before performing the operations if not the operations won't be successful

CREATE SOURCE CODE FILES:

sc creates files based on their extensions if no extension is present it creates an empty text file and creates test files from the prefix and extensions if the file exists it asks for permission to overwrite or not example use -t for normal source files, -t+ for functions , -t++ for classes more will be added in sc 2.0

sc -t file.py

t

sc -t+ file2.py

asks for a prototype; if none, it is created without one and the user has to input the prototype manually

sc -t++ file3.py

ttt

creates class files

CREATE PACKAGES

it creates Python packages with an init file inside the directory more functionalities will be added later on in sc 2.0

sc -d "python package name"

pkg

Try it

sc -t file.py -t+ test_file.py -a file.py test_file.py -c -p

** Note**: SC supports c file creations the same processes used above are also applicable to it

MORE UP-AND-COMING FEATURES

**create a c file with auto adding of prototype to header files **Auto-create test files based on functions and auto-test... ETC stay tuned and Happy Coding!!