This Python script allows you to join multiple text, markdown, HTML, or DOCX files into a single file. The script prompts you to select the files you want to merge, then combines their contents into one file with the name of each file inserted as a separator between the contents. The resulting merged file is saved in the same directory as the first selected file.
- Select multiple text, markdown, HTML, or DOCX files to merge using a file dialog.
- Each file's contents are separated by the file name, with customizable spacing around the file name.
- The merged file can be saved in either
.txt,.md,.html, or.docxformat, based on user input. - The merged file is named based on the number of files merged and the current date and time.
- Python 3.x
tkinterlibrary (usually included with Python)python-docxlibrary (install usingpip install python-docx)pypandoclibrary (install usingpip install pypandoc)pandoclibrary (install usingbrew install pandoc)
- Clone or download this repository.
- Open the script in PyCharm CE or any other Python IDE.
- Run the script.
- Select the text, markdown, HTML, or DOCX files you want to merge.
- Enter the desired output format (
txt,md,html, ordocx) when prompted.
The merged file will be named in the format:
Merged_text_of_X_files_YYYY-MM-DD_HH-MM-SS.txt or .md or .html or .docx
Where X is the number of files merged and YYYY-MM-DD_HH-MM-SS is the current date and time.
This project is licensed under the MIT License.