Skip to content

Commit 4661a01

Browse files
authored
Merge pull request #21 from shloktech/refactoring-library-name
Refactoring library name
2 parents 8e61000 + 1a0d587 commit 4661a01

14 files changed

Lines changed: 79 additions & 122 deletions

File tree

.idea/git_toolbox_blame.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/md2docx-python.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
5.44 KB
Binary file not shown.

dist/md2docx_python-0.3.1.tar.gz

4.27 KB
Binary file not shown.

md2docx_python.egg-info/PKG-INFO

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: md2docx-python
3-
Version: 0.3.0
3+
Version: 0.3.1
44
Summary: Markdown to Word Converter.
55
Simple and straight forward Python utility
66
that converts a Markdown file (`.md`) to a Microsoft
@@ -39,20 +39,56 @@ Description: # Markdown to Word Converter
3939
- `python-docx` for creating and editing Word documents.
4040
- `beautifulsoup4` for parsing HTML.
4141

42-
You can install the required libraries using pip:
42+
Sure, let's enhance your instructions for clarity and completeness:
43+
44+
---
45+
46+
### How to Convert Markdown to Word Using `md2docx-python`
47+
48+
#### Step 1: Install the Required Library
49+
First, you need to install the `md2docx-python` library using pip. Open your terminal and run the following command:
4350

4451
```bash
45-
pip install -r requirements.txt
52+
pip install md2docx-python
4653
```
4754

48-
To run the sample files follow the below steps:
55+
#### Step 2: Import the Library in Your Code
56+
To use the library, import it into your Python code with the following line:
4957

50-
```bash
51-
python md2docx_python.py
52-
Enter the path to the Markdown file (e.g., README.md): ..\sample_files\amazon_case_study.md
53-
Enter the path for the output Word file (e.g., README.docx): ..\sample_files\amazon_case_study.docx
58+
```python
59+
from md2docx_python.src.md2docx_python import markdown_to_word
60+
```
61+
62+
#### Step 3: Convert Markdown to Word
63+
Call the `markdown_to_word()` function to convert your Markdown file to a Word document. Here's the syntax:
64+
65+
```python
66+
markdown_to_word(markdown_file, word_file)
67+
```
68+
69+
- `markdown_file`: The path to the Markdown file you want to convert.
70+
- `word_file`: The desired path and name for the output Word document.
71+
72+
#### Step 4: Sample Code
73+
Here's a complete example to illustrate how it works:
74+
75+
```python
76+
from md2docx_python.src.md2docx_python import markdown_to_word
77+
78+
# Define the paths to your files
79+
markdown_file = "sample_files/amazon_case_study.md"
80+
word_file = "sample_files/amazon_case_study.docx"
81+
82+
# Convert the Markdown file to a Word document
83+
markdown_to_word(markdown_file, word_file)
5484
```
5585

86+
This code will create a file named `amazon_case_study.docx`, which is the conversion of `amazon_case_study.md` to the Word format.
87+
88+
---
89+
90+
This should make it easier to understand and follow the steps. Let me know if you need any more help or further enhancements!
91+
5692
## Why this repo and not others ?
5793

5894
Here are some reasons why this repo might be considered better or more suitable for certain use cases compared to other scripts available on the internet:

md2docx_python_python.egg-info/PKG-INFO

Lines changed: 0 additions & 99 deletions
This file was deleted.

md2docx_python_python.egg-info/SOURCES.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)