{"id":25376567,"url":"https://github.com/gappeah/docx-to-md","last_synced_at":"2025-04-09T10:29:48.411Z","repository":{"id":275372351,"uuid":"925889983","full_name":"gappeah/docx-to-md","owner":"gappeah","description":"Easy  to use read docx to md converter","archived":false,"fork":false,"pushed_at":"2025-02-02T02:27:43.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T04:36:38.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gappeah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-02T01:37:09.000Z","updated_at":"2025-02-02T02:27:47.000Z","dependencies_parsed_at":"2025-02-02T03:18:03.221Z","dependency_job_id":"9004f879-e080-4702-b536-025a2ed9baa4","html_url":"https://github.com/gappeah/docx-to-md","commit_stats":null,"previous_names":["gappeah/docx-to-md"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Fdocx-to-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Fdocx-to-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Fdocx-to-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Fdocx-to-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gappeah","download_url":"https://codeload.github.com/gappeah/docx-to-md/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248019889,"owners_count":21034327,"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":[],"created_at":"2025-02-15T04:36:41.412Z","updated_at":"2025-04-09T10:29:48.390Z","avatar_url":"https://github.com/gappeah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DOCX to Markdown Converter\n\nThis repository contains Python scripts to batch convert `.docx` files to `.md` (Markdown) format while preserving the folder structure. Two versions of the script are provided:\n\n1. **With Pandoc**: Uses `pypandoc` for accurate Markdown conversion (supports headings, lists, tables, etc.).\n2. **Without Pandoc**: Uses `python-docx` for plain text extraction (no advanced Markdown formatting).\n\n---\n\n## Prerequisites\n\nBefore running the scripts, ensure you have the following installed:\n\n- Python 3.x\n- Required Python libraries (install via `pip`):\n  ```bash\n  pip install python-docx pypandoc\n  ```\n\nFor the **Pandoc version**, you also need to install `pandoc`:\n- Download and install `pandoc` from [https://pandoc.org/installing.html](https://pandoc.org/installing.html).\n- Ensure `pandoc` is added to your system's PATH.\n\n---\n\n## Scripts\n\n### 1. `main_with_pandoc.py`\nThis script uses `pypandoc` to convert `.docx` files to `.md` with proper Markdown formatting.\n\n#### Features:\n- Preserves folder structure.\n- Supports advanced Markdown formatting (headings, lists, tables, etc.).\n- Requires `pandoc` to be installed.\n\n#### Usage:\n1. Run the script:\n   ```bash\n   python main_with_pandoc.py\n   ```\n2. A popup window will prompt you to select the input folder (containing `.docx` files).\n3. Another popup window will prompt you to select the output folder (where `.md` files will be saved).\n4. The script will convert all `.docx` files in the input folder (and subfolders) to `.md` files in the output folder.\n\n---\n\n### 2. `main_without_pandoc.py`\nThis script uses `python-docx` to extract plain text from `.docx` files and save it as `.md`.\n\n#### Features:\n- Preserves folder structure.\n- Does not require `pandoc`.\n- Outputs plain text (no advanced Markdown formatting).\n\n#### Usage:\n1. Run the script:\n   ```bash\n   python main_without_pandoc.py\n   ```\n2. A popup window will prompt you to select the input folder (containing `.docx` files).\n3. Another popup window will prompt you to select the output folder (where `.md` files will be saved).\n4. The script will convert all `.docx` files in the input folder (and subfolders) to `.md` files in the output folder.\n\n---\n\n## Folder Structure\n\nThe scripts preserve the folder structure of the input folder. For example:\n\n```\ninput_folder/\n├── file1.docx\n├── file2.docx\n└── subfolder/\n    ├── file3.docx\n    └── file4.docx\n```\n\nWill be converted to:\n\n```\noutput_folder/\n├── file1.md\n├── file2.md\n└── subfolder/\n    ├── file3.md\n    └── file4.md\n```\n\n---\n\n## Which Script to Use?\n\n- Use **`main_with_pandoc.py`** if:\n  - You need accurate Markdown formatting (headings, lists, tables, etc.).\n  - You have `pandoc` installed on your system.\n\n- Use **`main_without_pandoc.py`** if:\n  - You only need plain text extraction.\n  - You don't want to install `pandoc`.\n\n---\n\n## Example\n\n### Input Folder\n```\ninput_folder/\n├── document1.docx\n└── notes/\n    ├── note1.docx\n    └── note2.docx\n```\n\n### Output Folder (After Conversion)\n```\noutput_folder/\n├── document1.md\n└── notes/\n    ├── note1.md\n    └── note2.md\n```\n\n---\n\n## Contributing\n\nIf you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgappeah%2Fdocx-to-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgappeah%2Fdocx-to-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgappeah%2Fdocx-to-md/lists"}