{"id":27125052,"url":"https://github.com/segcoredrakon/terminal-based-calculator","last_synced_at":"2025-04-07T14:29:08.077Z","repository":{"id":285727688,"uuid":"959128647","full_name":"SegCoreDrakon/Terminal-based-calculator","owner":"SegCoreDrakon","description":"A terminal-only calculator that is able to perform basic calculations like addition, subtraction, multiplication, and division with an ASCII UI interface.","archived":false,"fork":false,"pushed_at":"2025-04-02T10:36:43.000Z","size":230,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T11:26:58.131Z","etag":null,"topics":["ascii","calculator","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SegCoreDrakon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-02T10:07:06.000Z","updated_at":"2025-04-02T10:46:58.000Z","dependencies_parsed_at":"2025-04-02T11:37:22.834Z","dependency_job_id":null,"html_url":"https://github.com/SegCoreDrakon/Terminal-based-calculator","commit_stats":null,"previous_names":["segcoredrakon/terminal-based-calculator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SegCoreDrakon%2FTerminal-based-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SegCoreDrakon%2FTerminal-based-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SegCoreDrakon%2FTerminal-based-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SegCoreDrakon%2FTerminal-based-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SegCoreDrakon","download_url":"https://codeload.github.com/SegCoreDrakon/Terminal-based-calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247669134,"owners_count":20976334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ascii","calculator","cpp"],"created_at":"2025-04-07T14:29:07.355Z","updated_at":"2025-04-07T14:29:08.052Z","avatar_url":"https://github.com/SegCoreDrakon.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **TERMINAL CALCULATOR**\n\n- - -\n# **SOMMARY**\n\n- [introduction](#introduction)\n  - [why does this project exist?](#why-did-made-this-project)\n\n- [small explanation about the program](#small-explanation-of-what-the-project-does)\n  - [files](#files)\n\n- [how to compile the program](#how-to-compile-the-program)\n  - [using make](#using-make)\n  - [manually](#manually-compilation)\n  \n- [how to contribute](#how-to-contribute)\n  - [git commit](#git-commit-message)\n  - [submit issues or ideas](#submitting-issues-or-ideas)\n    - [issues](#for-issues)\n    - [ideas](#for-ideas)\n\n- [conventions](#conventions)\n  \n- [roadmap](#roadmap)\n\n- [conclusion](#conclusion)\n\n- [contributors](#contributor)\n\n- - -\n# **INTRODUCTION**\n\nThis program is a calculator that can perform basic computer calculations. These operations \ninclude: addition, subtraction, multiplication, and division in a terminal-only interface.\n\n## **Why did made this project?**\n\nI made this project mainly to learn and practice, but it was also created to help me learn more \nabout how a project is structured and the best conventions for open-source software for later. \nSince I started coding, I’ve really wanted to create open-source software and contribute to other \nsoftware as well.\n\n## **Licence**\n\nThe entire project is licensed under the GPL 3.0 or later license. This means you are allowed to \nshare, modify, and distribute the project without limitation, except for the GPL 3.0 restrictions, \nsuch as if the project is released in a binary version, you must release the source code under the \nsame license (GPL 3.0 or a later version).\n\n- - -\n# **Small explanation of what the project does**\n\n**the project is divided into 3 systems**\n\n- system 1: Calculations and output\n- system 2: History and save system\n- system 3: Small ASCII UI for aesthetics\n\nThese 3 systems are connected by inclusion, like `#include` and they are partially independant, \nthat. This means system 1 can be fully\nindependant, but you need to remove all functions in the include files to fully separate it\n\n## **Files**\n\nThe projects has 4 source files and 3 header files, here is a little example of\nthe source files in a table:\n\n\n|Source files   |Desc |\n|---------------|-----|\n|calculator.cpp | Does all the computations |\n|save_system.cpp | Save the computations, type and  result in a file |\n|terminal_ui.cpp | Simple full ASCII interface for the calculator |\n|main.cpp |The base of the calculator, where the program will be executed |\n\nAll headers are pretty much the same, just declaring all functions, classes, and other components \nwithout the logic, because we add the logic in the source files.\n\nThere are also other files in `logs/` folder but they are only for history and are not useful \nexcept for `check logs` option.\n\n- - -\n\n# How to compile the program?\n\nto compile the program, you have 2 options\n\n- **using make:** Faster already automated and compiles everything with 1 command `make`\n- **manually:** Slower but lets you learn more about how compiler work for compiled language\n\n## Using make:\n\n### **INSTALLATION**\n\nTo use make, make sure you have it installed. If not, use the command adapted to your \npackage manager\n\n\n| Distros      | Commands |\n|--------------|----------|\n| Arch-based   |`pacman -S make` |\n| Debian-based |`apt install make` |\n| Fedora-based |`dnf make` |\n\n### **COMPILATION**\n\nRun `make` in any terminal you want, make sure you installed make before running the command.\n\nNormally, makefile are created to compile only the program, but not execute it. To execute the \nprogram immediately after compilling, type `make execute`\nand it will compile + execute the program.\n\n## **Manually compilation**\n\nto manually compile the program, it will take a little longer, but it is similar to using \nmakefile, but instead of using make, we do it manually by compiling file by file, here is a step \nby step to compile \nthe program:\n\n**/!\\\\ BE SURE TO HAVE GCC OR CLANG INSTALLED ON YOUR COMPUTER /!\\\\**\n\nto install GCC follow the same guide for installing make, but with gcc or clang\n\n - **step 1:**\n   - Compile all the source files into object file like this `g++ -o save_system.o -c \nsave_system.cpp` \n   - Be sure to compile `save_system.cpp` and `terminal_ui.cpp` before `calculator.cpp`\n \n - **step 2:**\n   - Compile all object files into one executable file like this `g++ -o main main.o calculator.o \n     save_system.o terminal_ui.o`\n   - If any error occur, it is probably because you did not compile the project, correctly, or \nthere might be errors in\n     the project itself. If you think it is a project error please open an issue on the github \n     repo\n     \n   - **step 3**\n     - Once the project is compiled, just type `./main` or the name of the executable you\n       made, and the program will start. Follow the instructions in the program for using it.\n     \n---\n\n# **How to contribute?**\n\nIf you want to contribute to the program, here are some rules and small conventions for making a \ngood contribution. Every skill and idea are welcome.\n\n## **Git commit message**\n\nFor commiting your modifications, use the following tags for specific types of commits. Include the \ntag in the first message of your commit.\n\n**FIX:** For bug fix (Include the issue number in GitHub).\n**FEATURE:** For any new features you add (e.g adding a new option to the calculator or adding a \nnew UI system etc.)\n**UPGRADE:** For code optimization or change that make the code more readable, etc.\n**CHANGE:** For minor change (e.g renaming a variable from \"his\" to \"history\"). Be sure to inculde \nthe new variable name in the commit message.\n\n## **Submitting issues or ideas**\n\nIf you discover a bug or just want to submit an idea, here is what you should include:\n\n### **For issues**:\n  - The type of bug (e.g infinite loop, crash, freeze, incorrect output).\n\n  - How to reproduct it.\n\n  - if the bug is difficult to explain, sending some pictures can help you \nand contributor fix the issue.\n\n### **For ideas**\n\n  - The type of idea (e.g adding a new option, adding a new UI style etc)\n\n  - A detailled description of what you want the idea to do and why.\n\nThese examples are not strict rules, but they help you to write good issues and ideas to help the \nprojet grow.\n\n---\n# **Conventions**\n\nFor a good project, we need a good conventions. Here are some conventions you need to follow when \ncontributing.\n\n  - For clasess, variables and other components, use the **CamelCase** for classes, structs etc., \nand **snake_case** for variables.\n \n  - For private member, use the **Hungarian Notation** (add `m_` before the variable name, e.g, \n`my_var` becomes `m_my_var` if it is private; if it is not private, just use `my_var` for naming \nvariables).\n\n  - Constants are written in **UPPER_CASE_SNAKE_CASE**.\n\nThese conventions **MUST** be followed in the program to keep the program homogeneous and avoid \nusing multiple convention, like mixing `m_my_var` and `my_var`, even if both are private.\n\n---\n# **Roadmap**\n\nThe program has a few roadmaps that I want to complete before makings this project as \n\"terminated.\" Here are the roadmaps:\n\n  - **Make an aesthetic UI for the entire project:** - `[###--]` ~10%\n\n  - **Make the project fully safe for all dangerous calculations (like division by 0)** - \n`[XXXXX]` not implemented yet.\n\n  - **Organize the project** - `[####-]` ~90% Already organized, but if new features are added, \nthe progress bar might be frozen.\n\n---\n# **Conclusion**\n\nThis program is mainly designed to help new coders learn how a basic calculator works, how \nto contribute, and how to submit good issuee or ideas.\n\nIt is not a fully structured project with strict commit rules and other conventions. It is just a \npreceful place to practice your commits in a public project. But please avoid broken codes.\n\n---\n# **Contributor**\n\nThanks to every contributor who helps make the project better.\n\nEvery commit made by someone will be listed here with some details (like \"new contributor\" or \n\"first commit\", maybe both sometime).\n\n### **CONTRIBUTORS:**\n  \n  not yet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegcoredrakon%2Fterminal-based-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegcoredrakon%2Fterminal-based-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegcoredrakon%2Fterminal-based-calculator/lists"}