Tired of those endless "git add," "git commit," and "git push" commands? Frustrated with typing out lengthy compilation strings? Say goodbye to the tedium and whitespace woes with ALX Time Saver!
If you love our project, show some love with a star and, if you're feeling adventurous, contribute to make it even better.
To contribute: Fork the project, make changes with proper documentation, ensure they work, and submit a pull request.
🙏 Contributions can vary from fixing typos and issues to adding exciting new features. 🙏
-
Comfortable:
-
Custom Vim Configuration:
-
- Automatically Organizes Project Files in an Interactive Table
-
- Extracts all function prototypes for a project and appends them to the header file.
- Generates project files with ease.
- Retrieves test files (x-main.c).
- Downloads _putchar.c and updates header file with its prototype.
-
- Develop a test suite capable of efficiently examining multiple test cases with simplicity and speed.
Added
* ALX Time Saver v2.11 (31-10-2023)
* F1 for pycodestyle in vim
* mkfiles :
1 . support for python files, chmod a+x, shebang included.
2 . Integrated README Maker
3 . New pattern for header name detection
* compile :
1 . Compile in debugging mode by default
2 . -o flag for output
* push :
-m flag for commit message
Changed
-
Fixed
- mkfiles:
1 . Fixed wrong header name
Known Issues
1 . push :
* git check-ignore command might be unstable (need to do more testing to confirm this)
2. F3 does not fully support python
To Do
* Updater script
* Add autoindent for python
* Fix known issues
* Add support for python test files in mkfiles
-
Clone the repository:
git clone https://github.com/Matsadura/ALX_Time_Saver/
-
Navigate to the cloned directory:
cd ALX_Time_Saver
-
Run the installation script:
./install.sh
Let it work its magic, and you're all set! 🚀
If you want to unistall :
./unistall.sh
NOTE: If you've used the previous version, please restart your system to avoid conflicts with this version.
Run the push
command, select the file(s) to push, and add your commit message.
Syntax | Description |
---|---|
push | Interactive mode |
push -f | Force-add ignored files in interactive mode |
push file_name1 file_name_2... | One-line command |
push -f file_name1 file_name2... | Force-push one-line command |
the above plus '-m' "commit msg | Add a commit message |
Run the compile
command, select the test file (if it exists) and the code to compile. Avoid typing all the flags every time!
Syntax | Description |
---|---|
compile | Interactive mode |
compile file_1 file_2... | One-line command |
the above plus '-o' | Add the output's name |
Run the mkscript
command, type your script's name, and it will automatically open in Vim with #!/bin/bash
or #!/usr/bin/python3
already written at the top. After exiting, the file will have executable permission.
Syntax | Description |
---|---|
mkscript | Interactive mode |
mkscript file_name | Semi-interactive mode |
mkscript -p | Semi-interactive mode for Python script |
mkscript -b | Semi-interactive mode for Bash script |
mkscript -p file_name | One-line command for Python script |
mkscript file_name -p | One-line command for Python script |
mkscript -b file_name | One-line command for Bash script |
mkscript file_name -b | One-line command for Bash script |
Run fixall
command followed the the specified directory(s), it'll automatically fix the indentation and remove all white spaces from the .c
and .h
files.
Syntax | Description |
---|---|
fixall | Automatically selects the current directory |
fixall dir1 dir2 ... | Selects the specified directories |
The numbers are handy for jumping between lines without counting them.
To compile the current file by pressing F5, the file must be in this format: "number"-"name".c (e.g., 0-putchar.c
), and there should be a test file usually named "number"-main.c (e.g., 0-main.c
). If the test file doesn't exist, use the compile
command instead.
Press F2 in Vim instead of leaving it to run "betty file_name.c" separately.
Check out this demonstration. PS : It does not work on python (yet)
Whitespace is highlighted in red.
To use this script, first configure it by replacing the info as shown:
CD to ALX-Time-Saver and launch the script with ./read_maker.py
. Enter the repo name, project's subdirectory, and make sure everything you need is pushed to GitHub. The script generates markdown for your README.md
.
Clicking on a file opens it (on GitHub).
Run the script with mkfiles
, and the new files will be in your chosen location.
Demonstration:
Execute the setall
command in the sequence of the main function file, followed by the header file and the test cases. Afterward, use the testall
command, specifying the main function files and the additional function files to initiate the test suite.
Points to Remember:
- It's unnecessary to employ the
setall
command again when reusing the test suite. - To update the test cases, reset the test suite, maintaining the same order of arguments to ensure the corresponding tests are updated.
- The main function should always be the first argument in the
testall
command; otherwise, it won't function correctly. - The additional fucntion files are required during compilation.
- You can have multiple test suites.
Syntax | Description |
---|---|
setall main_function.c header.h test1.c testX.c ... | Sets the test suite for the main_function.c |
testall main_function.c secondary_function.c more_functions.c ... | Runs the test suite for the main_function.c |
Enjoy coding efficiently with ALX Time Saver! 🕒💻
This project is made with love, special thanks to all the contributors.