Skip to content

Commit 0b36cb0

Browse files
authored
Revert creating-docx-to-md-flow
Reverting this as unable to create wheel
2 parents bbf9c6c + 6e43642 commit 0b36cb0

18 files changed

Lines changed: 144 additions & 601 deletions

Readme.md

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,8 @@
22

33
## Overview
44

5-
Simple and straight forward Python utility that converts Markdown files (`.md`) to Microsoft Word documents (`.docx`) and vice versa. It supports multiple Markdown elements, including headings, bold and italic text, both unordered and ordered lists, and many more.
5+
Simple and straight forward Python utility that converts a Markdown file (`.md`) to a Microsoft Word document (`.docx`). It supports multiple Markdown elements, including headings, bold and italic text, both unordered and ordered lists, and many more.
66

7-
## Word to Markdown Conversion Example:
8-
#### Input .docx file:
9-
![image](https://github.com/user-attachments/assets/2891ebdf-ff36-4fd5-af2f-b35413264b06)
10-
11-
#### Output .md file:
12-
![image](https://github.com/user-attachments/assets/e46c096b-762e-4f0c-a0ab-f81c3069a533)
13-
14-
15-
## Markdown to Word Conversion Example:
167
#### Input .md file:
178
![image](https://github.com/user-attachments/assets/c2325e52-05a7-4e11-8f28-4eeb3d8c06f5)
189

@@ -22,22 +13,18 @@ Simple and straight forward Python utility that converts Markdown files (`.md`)
2213

2314
## Features
2415

25-
- Bi-directional conversion between Markdown and Word documents
26-
- Handles various programming languages code given in word doc like python, ruby and more.
27-
- Converts Markdown headers (`#`, `##`, `###`) to Word document headings and back
28-
- Supports bold and italic text formatting
29-
- Converts unordered (`*`, `-`) and ordered (`1.`, `2.`) lists
30-
- Handles paragraphs with mixed content
31-
- Preserves document structure during conversion
16+
- Converts Markdown headers (`#`, `##`, `###`) to Word document headings.
17+
- Supports bold and italic text formatting.
18+
- Converts unordered (`*`, `-`) and ordered (`1.`, `2.`) lists.
19+
- Handles paragraphs with mixed content.
3220

3321
## Prerequisites
3422

3523
You need to have Python installed on your system along with the following libraries:
3624

37-
- `markdown` for converting Markdown to HTML
38-
- `python-docx` for creating and editing Word documents
39-
- `beautifulsoup4` for parsing HTML
40-
- `mammoth` for converting Word to HTML
25+
- `markdown` for converting Markdown to HTML.
26+
- `python-docx` for creating and editing Word documents.
27+
- `beautifulsoup4` for parsing HTML.
4128

4229
Sure, let's enhance your instructions for clarity and completeness:
4330

@@ -87,33 +74,7 @@ This code will create a file named `amazon_case_study.docx`, which is the conver
8774

8875
---
8976

90-
#### For Converting Word to Markdown
91-
Use the `word_to_markdown()` function to convert your Word document to Markdown:
92-
93-
```python
94-
word_to_markdown(word_file, markdown_file)
95-
```
96-
97-
- `word_file`: The path to the Word document you want to convert
98-
- `markdown_file`: The desired path and name for the output Markdown file
99-
100-
101-
Here's a complete example:
102-
103-
```python
104-
from md2docx_python.src.docx2md_python import word_to_markdown
105-
106-
# Define the paths to your files
107-
word_file = "sample_files/test_document.docx"
108-
markdown_file = "sample_files/test_document_output.md"
109-
110-
# Convert the Word document to a Markdown file
111-
word_to_markdown(word_file, markdown_file)
112-
```
113-
114-
This code will create a file named `test_document_output.md`, which is the conversion of `test_document.docx` to the Markdown format.
115-
116-
---
77+
This should make it easier to understand and follow the steps. Let me know if you need any more help or further enhancements!
11778

11879
## Why this repo and not others ?
11980

@@ -147,11 +108,6 @@ Here are some reasons why this repo might be considered better or more suitable
147108
### 8. **Privacy**
148109
- If you are working in a corporate firm and you want to convert your markdown files to word and you use a online tool to do it then there are chances that they will store your file which can cause to a vital information leak of your company. With use of this repo you can easily do the conversion in your own system.
149110

150-
### 9. **Bi-directional Conversion**
151-
- **Complete Workflow**: Convert documents in both directions, allowing for round-trip document processing
152-
- **Format Preservation**: Maintains formatting and structure when converting between formats
153-
- **Flexibility**: Easily switch between Markdown and Word formats based on your needs
154-
155111
### Comparison to Other Scripts
156112
- **Feature Set**: Some scripts may lack comprehensive support for Markdown features or may not handle lists and text formatting well.
157113
- **Performance**: Depending on the implementation, performance might vary. This script is designed to be efficient for typical Markdown files.

build/lib/md2docx_python/src/docx2md_python.py

Lines changed: 0 additions & 95 deletions
This file was deleted.
-6.93 KB
Binary file not shown.

0 commit comments

Comments
 (0)