https://github.com/smrfeld/medium-to-markdown
Helpers to parse your data downloaded from Medium into markdown
https://github.com/smrfeld/medium-to-markdown
convert html markdown medium python
Last synced: 2 months ago
JSON representation
Helpers to parse your data downloaded from Medium into markdown
- Host: GitHub
- URL: https://github.com/smrfeld/medium-to-markdown
- Owner: smrfeld
- Created: 2022-07-24T23:04:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T01:25:06.000Z (over 2 years ago)
- Last Synced: 2025-07-24T16:24:58.044Z (11 months ago)
- Topics: convert, html, markdown, medium, python
- Language: Python
- Homepage:
- Size: 1.23 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Medium to markdown
Convert your medium articles from their `html` format to `markdown`. A deep copy of your data can be made, including images.
## Example
An example input and output are located in the `example` directory.


## Usage
1. Go to your medium account and request a copy of your data.
2. Look for the `posts` directory where your articles are located in `html` format.
3. Execute:
```
python run.py convert --posts-dir --output-dir
```
to convert the posts into the output directory in Markdown format.
The default posts directory is `posts` and the default output directory is `output`.
The `convert` command executes the following commands:
```
convert_html_to_md(args)
download_imgs(args, cover_img_only=True)
resize_cover_imgs0(args)
```
i.e.
1. Converts HTML in the `posts` directory to markdown
2. Downloads the cover images
3. Resizes the cover images
You can also run the commands independently:
```
python run.py convert-html-to-md
python run.py download-cover-imgs
python run.py resize-cover-imgs
```
To see a full list of options:
```
python run.py -h
```