🧾 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
-
Clone the git repository
git clone https://github.com/yourusername/code-formatter-cli.git cd code-formatter-cli pip install .
-
Install the required dependencies:
pip install -r requirements.txt
🚀 Usage
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
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:
-
Fork the repository.
-
Create a feature branch:
git checkout -b feature-name
-
Commit your changes:
git commit -m "Add feature description"
-
Push to your forked repository and create a pull request.
Contact
If you have any questions or suggestions, feel free to reach out:
Metadata
Release files for code-formatter-cli 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| code_formatter_cli-1.1.0.tar.gz | 7.2 kB | Without provenance | Details for code_formatter_cli-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| code_formatter_cli-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for code_formatter_cli-1.1.0-py3-none-any.whl |
Total release size: 15.8 kB
Release files / code_formatter_cli-1.1.0.tar.gz
| Download URL | code_formatter_cli-1.1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcdb5e5842b9f34eaa45c3865994ee2dd0b187ac205ce4b37a130f3eff111961
|
|
BLAKE2b-256 checksum How to use checksums |
014cec6c285762e082b7b215bb4a3586cd5008b3158483b88ead20777bd015f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Release files / code_formatter_cli-1.1.0-py3-none-any.whl
| Download URL | code_formatter_cli-1.1.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1dbccda5255ab9f3d83ec05670f9211f4df759708786746f2b121dc6c4169f8e
|
|
BLAKE2b-256 checksum How to use checksums |
06716e0ba1d4bf580133d7b825f86973d32c313882206e48bbf780ccc6f6033a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Security for code-formatter-cli 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.