MIT License. See LICENSE.
It doesn't yet support global variables and some other stuff like the C preprocessor. Use at your own risk.
Note that libraries need to be converted to this format, so that they can work at all, so, for example, https://github.com/tsoding/ded could be forked and have the system converted to the system of /**/ annotations on the header of the file.
Also linters as of right now aren't compatible with this special library format.
The library directory contains a library made in such a way.
After all it will put all that into a main.c file, that might be gigantic, but which is really supposed to be easily used through features like CTRL + F and terminal text editor.
I also recommend you to use to save frequently, by using Git, so that your work might not be lost.
A tool that can, in a way, making so that the entire code of a package is put within the file main.c, so it becomes one file.
The library directory is not really supposed to be really be used as one cohesive library, but is instead as a mere test of the program.
This only works on GNU/Linux as of now or it could be used on Windows with a compatibility layer.
To install with pip:
pip install ccinitOr with pípx:
pipx install ccinitOr you might do this:
cd ~
git clone https://github.com/codemanticism/CCinit.git
cp ~/CCinit/ccinit.py ~/.local/bin/ccinitccinit: Create amain.cfile.ccinit main.c: Reads themain.cfile and actually does all that heavy lifting for you and everything after\n/*main*/remains the same.
Important: Don't use the #include "LIBRARY" structure wherein LIBRARY refers to the file which has already been specified through the the system of initial annotations I made for this program.
For all of these substrings seperated by that start with /, it already fills all the stuff in, so that, for example, /[insert_other_project]/refs/heads/main/main.c if used in the correct context can make it so that it already fills in the rest, meaning the https://raw.githubusercontent.com/codemanticism part, in this case.
It creates a compile.sh file, if there's not one and no arguments are specified, which is supposed to compile it with gcc.
If there's no main.c in the root of the directory, it will create a main.c file and no further arguments are provided in the context. If there is one argument, then it will download all the dependencies listed like so, at the start of the file.
An example:
/*https://raw.githubusercontent.com/codemanticism/CCinit/refs/heads/main/libraries/calc.c /random.c*/
//^Where the URLs go.
/*main*/
int main(){
}
...or (it should work), if it is located at the web address below, for it to be used by local scripts:
/*/calc.c /random.c*/
//IF PATH is https://raw.githubusercontent.com/codemanticism/CCinit/refs/heads/main/libraries/something.c
//^Where the URLs go.
/*main*/
int main(){
}
...It has to be styled like this: /*example*/, not like that: //example. It has to be the very first line of the file, so the file has to start with /*.
It was made to be used for .c files only. I wanted to make using C easier and more fun to use, so that it could be more like working with pip.
