# ๐งพ Code Formatter CLI
A simple command-line tool to generate well-formatted **experiment reports** from your code in **Python, C, C++, or Java**, along with its **compiled output**.
Built out of absolute laziness and the compulsion to **save time** and focus on the really important work at hand (writing the code).
Output formats include: **DOCX**, **LaTeX** and **Plain Text**. (In the order of usage priority)
---
## โจ Features
- โ
Supports **Python**, **C**, **C++**, and **Java** code
- ๐ Formats the code and its output into:
- Microsoft Word (.docx)
- Plain text (.txt)
- LaTeX (.tex)
- ๐ง Custom metadata:
- Student Name
- Class
- Roll Number
- Experiment Number
---
## ๐ฆ Installation
1. Clone the git repository
```bash
git clone https://github.com/yourusername/code-formatter-cli.git
cd code-formatter-cli
pip install .
```
2. Install the required dependencies:
```bash
pip install -r requirements.txt
```
---
## ๐ Usage
```bash
formatcode \
--file sample.py \
--lang python \
--format docx \
--name "Alice Doe" \
--class_ "Your class name" \
--roll "Your Roll Number" \
--expno "Experiment Number"
```
--file: Path to the source code file
--lang: Programming language (python, c, cpp, java)
--format: Output format (docx, txt, latex)
--name, --class_, --roll, --expno: Student details
---
## Output Examples
```docx
Name: Alice Doe Class: SE-A Roll No: 42
EXPERIMENT 03
Code:
[Code block here]
Output:
[Compiled output here]
```
---
## Contributions
Contributions are welcome! If you'd like to contribute, please:
1. Fork the repository.
2. Create a feature branch:
```bash
git checkout -b feature-name
```
3. Commit your changes:
```bash
git commit -m "Add feature description"
```
4. Push to your forked repository and create a pull request.
---
## Contact
If you have any questions or suggestions, feel free to reach out:
- Email: <write2andrew.important@gmail.com>
Raw data
{
"_id": null,
"home_page": null,
"name": "code-formatter-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "cli, code, formatter, python, latex, docx, c, java",
"author": "Andrew Fernandes",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/01/4c/ec6c285762e082b7b215bb4a3586cd5008b3158483b88ead20777bd015f5/code_formatter_cli-1.1.0.tar.gz",
"platform": null,
"description": "# \ud83e\uddfe Code Formatter CLI\r\n\r\nA simple command-line tool to generate well-formatted **experiment reports** from your code in **Python, C, C++, or Java**, along with its **compiled output**. \r\nBuilt out of absolute laziness and the compulsion to **save time** and focus on the really important work at hand (writing the code).\r\n\r\nOutput formats include: **DOCX**, **LaTeX** and **Plain Text**. (In the order of usage priority)\r\n\r\n---\r\n\r\n## \u2728 Features\r\n\r\n- \u2705 Supports **Python**, **C**, **C++**, and **Java** code\r\n- \ud83d\udcc4 Formats the code and its output into:\r\n - Microsoft Word (.docx)\r\n - Plain text (.txt)\r\n - LaTeX (.tex)\r\n- \ud83e\udde0 Custom metadata:\r\n - Student Name\r\n - Class\r\n - Roll Number\r\n - Experiment Number\r\n\r\n---\r\n\r\n## \ud83d\udce6 Installation\r\n\r\n1. Clone the git repository\r\n\r\n ```bash\r\n git clone https://github.com/yourusername/code-formatter-cli.git\r\n cd code-formatter-cli\r\n pip install .\r\n ```\r\n\r\n2. Install the required dependencies:\r\n\r\n ```bash\r\n pip install -r requirements.txt\r\n ```\r\n\r\n---\r\n\r\n## \ud83d\ude80 Usage\r\n\r\n```bash\r\n formatcode \\\r\n --file sample.py \\\r\n --lang python \\\r\n --format docx \\\r\n --name \"Alice Doe\" \\\r\n --class_ \"Your class name\" \\\r\n --roll \"Your Roll Number\" \\\r\n --expno \"Experiment Number\"\r\n```\r\n\r\n--file: Path to the source code file\r\n\r\n--lang: Programming language (python, c, cpp, java)\r\n\r\n--format: Output format (docx, txt, latex)\r\n\r\n--name, --class_, --roll, --expno: Student details\r\n\r\n---\r\n\r\n## Output Examples\r\n\r\n```docx\r\nName: Alice Doe Class: SE-A Roll No: 42\r\n\r\n EXPERIMENT 03\r\n\r\nCode:\r\n[Code block here]\r\n\r\nOutput:\r\n[Compiled output here]\r\n\r\n```\r\n\r\n---\r\n\r\n## Contributions\r\n\r\nContributions are welcome! If you'd like to contribute, please:\r\n\r\n1. Fork the repository.\r\n2. Create a feature branch:\r\n\r\n ```bash\r\n git checkout -b feature-name\r\n ```\r\n\r\n3. Commit your changes:\r\n\r\n ```bash\r\n git commit -m \"Add feature description\"\r\n ```\r\n\r\n4. Push to your forked repository and create a pull request.\r\n\r\n---\r\n\r\n## Contact\r\n\r\nIf you have any questions or suggestions, feel free to reach out:\r\n\r\n- Email: <write2andrew.important@gmail.com>\r\n",
"bugtrack_url": null,
"license": null,
"summary": "CLI tool to execute and format code output in txt, docx, or LaTeX formats",
"version": "1.1.0",
"project_urls": null,
"split_keywords": [
"cli",
" code",
" formatter",
" python",
" latex",
" docx",
" c",
" java"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "06716e0ba1d4bf580133d7b825f86973d32c313882206e48bbf780ccc6f6033a",
"md5": "86ef0029917ce4c6cc84c044566fa873",
"sha256": "1dbccda5255ab9f3d83ec05670f9211f4df759708786746f2b121dc6c4169f8e"
},
"downloads": -1,
"filename": "code_formatter_cli-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "86ef0029917ce4c6cc84c044566fa873",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8579,
"upload_time": "2025-07-20T19:47:02",
"upload_time_iso_8601": "2025-07-20T19:47:02.225300Z",
"url": "https://files.pythonhosted.org/packages/06/71/6e0ba1d4bf580133d7b825f86973d32c313882206e48bbf780ccc6f6033a/code_formatter_cli-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "014cec6c285762e082b7b215bb4a3586cd5008b3158483b88ead20777bd015f5",
"md5": "91ef9c7004cf6eac6862b297a1d8e4fb",
"sha256": "bcdb5e5842b9f34eaa45c3865994ee2dd0b187ac205ce4b37a130f3eff111961"
},
"downloads": -1,
"filename": "code_formatter_cli-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "91ef9c7004cf6eac6862b297a1d8e4fb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 7204,
"upload_time": "2025-07-20T19:47:03",
"upload_time_iso_8601": "2025-07-20T19:47:03.289303Z",
"url": "https://files.pythonhosted.org/packages/01/4c/ec6c285762e082b7b215bb4a3586cd5008b3158483b88ead20777bd015f5/code_formatter_cli-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-20 19:47:03",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "code-formatter-cli"
}