1. Quick notes
2. Features
3. How to use
4. Project structure
5. Code formatter
6. Development Guideline
- Hello you shouldnt vibe code this thing yea? you can ask AI but, be resonsible foryour code 🥀
- Well this thing still super new and definitely not well organized yet, so we are accepting any changes to improve this project
- Fix, replace anything that you think it will make this code better!
- Defenitely remember to make it a new commit or branch
- if you are one of the project's contributors, please dont
git push --force, only do it if you know exactly what is happening like you want to reset the remote head back to a few commits.
(not yet, the project currently under highly development)
Pre-built binary:
./lib-managerYou can get the binary from Release page(comming soon!)
Build from source: make sure you have cmake, gcc with c++ 17 supported installed, recommend to run this on wsl, linux or mac, i havent tried Windows yet so if anyone can guarantee this works fine on windows and depends on some specific dependencies then please update this readme.
make run # build (incremental) + run
make build # build only
make fresh # full clean rebuild
make clean # just remove build/Lib-Manager-Cpp/
├── CMakeLists.txt # Build configuration
├── Makefile # Convenience commands (run, build, fresh, clean)
├── main.cpp # Entry point
├── lib plan.txt # Planning notes
├── .gitignore
├── .clang-format
├── data/ # data for the program to load from/save to
│ ├── books-data.txt.example
│ └── student-data.txt.example
│
├── include/ # Public headers
│ ├── book.hpp
│ ├── date.hpp
│ ├── library.hpp
│ ├── student.hpp
│ └── transaction.hpp
│
└── src/ # Implementation
├── book.cpp
├── date.cpp
├── library.cpp
├── student.cpp
└── transaction.cpp
This project will use clang-format as its default code formatter which you have to adopt to produce consistent code. The formatter can be installed by the following methods(proably more methods but your job is just to make it work so i dont bother what method do you use that much):
If your are using Visual Studio Code family editor, you may need to install and use this extension below:
Installation
https://marketplace.visualstudio.com/items?itemName=xaver.clang-format or type ctrl + p and put this: ext install xaver.clang-**format
Usage
- First set your default formatter to clang-format by:
Right click on you C++ code > Format Documment With > Configure Default Formatter > Clang-format - Format your code by pressing
Ctrl + Shift + I
If you are not using Visual Studio Code, and lets say you are using linux in general, you must install the following package and run the format command to activate the formatter on your code:
Installation
Linux:
- Ubuntu/Debian:
sudo apt install clang-format - Fedora/RHEL:
sudo dnf install clang-format
MacOS:
brew install clang-formatWindows:- i am genuiely dont know:), PR to add the instruction for Windows, push straight if you are project's contributor
Usage
Run the following command to format your code:
clang-format -i <filename>