A simple Python script to generate a DOCX (Microsoft Word) file from multiple code files for your presentations or assignments.
- Clone the project
git clone https://github.com/SharafatKarim/code-to-docx- Navigate to the project directory
cd code-to-docx- Create a virtual environment
python -m venv .venv- Activate the virtual environment
-
Windows
.venv\Scripts\activate
-
Linux or macOS
source .venv/bin/activate
- Install dependencies
pip install -r requirements.txt- Place your files in the
inputdirectory and run the script
python main.pyA GUI version is available for easy input and output folder selection. Simply run:
python GUI.py- Add files to
blacklist.txtto ignore them during processing. - No need to specify file formats on the first run; the script will automatically search through all files and folders inside
input/.
python main.pycode.to.docx.mp4
Feel free to fork the repository and open pull requests. Contributions, patches, and advanced versions are welcome—your imagination is the limit!