ZMediumToMarkdown is a powerful tool that allows you to effortlessly download and convert your Medium posts to Markdown format.
This project can help you create an auto-sync or auto-backup service from Medium, such as automatically syncing Medium posts to Jekyll or other static markdown blog engines, or backing up Medium posts to Github pages.
If this project has helped you, feel free to sponsor me a cup of coffee, thank you.
and I use this tool to convert from Meidum to jekyllrb
I have just created a brand new GitHub repository template that allows you to move your Medium blog to your own Jekyll blog with just one click. Check it out: ZMediumToJekyll.
How to use Github Action as your free & no code Medium Posts backup service
git clone https://github.com/ZhgChgLi/ZMediumToMarkdown
cd /ZMediumToMarkdown
docker build -t zmediumtomarkdown:latest --build-arg CRON_SETTING="0 8 * * *" --build-arg ZMEDIUMTOMARKDOWN_COMMAND="-u [YOUR_MEDIUM_USERNAME]" .
docker run -v ./:/usr/src/app zmediumtomarkdown
2.7.5
)2.3.13
)gem install ZMediumToMarkdown
in terminal2.6.X
)which ruby
in terminal to make sure current Ruby is NOT /usr/bin/ruby
gem install ZMediumToMarkdown
in terminalCommand: ZMediumToMarkdown
Downloading all posts from any user
ZMediumToMarkdown -u [USEERNAME]
Downloading single post
ZMediumToMarkdown -p [MEDIUM POST URL]
Update to latest version
ZMediumToMarkdown -n
Remove all downloaded posts data
ZMediumToMarkdown -c
Print current ZMediumToMarkdown Version & Output Path
ZMediumToMarkdown -v
Provide valid Medium Member cookies to access paywall posts ZMediumToMarkdown requires uid and sid cookies to access paywalled posts on Medium.
If you don’t provide valid Medium Member cookies, you will receive this warning message while downloading a Medium post if the post is behind a paywall:
This post is behind Medium's paywall. You must provide valid Medium Member login cookies to download the full post.
ZMediumToMarkdown --cookie_uid uid --cookie_sid sid
You can obtain cookie_uid
and cookie_sid
from Medium by following these steps:
sid
and uid
values under "Cookies."Downloading all posts from user with Jekyll friendly
ZMediumToMarkdown -j [USEERNAME]
Downloading single post with Jekyll friendly
ZMediumToMarkdown -k [MEDIUM POST URL]
2.6.X
)which ruby
in terminal to make sure current Ruby is NOT /usr/bin/ruby
gem install bundler
install RubyGem dependency manager (you can install Bundle version 2.3.x
)cd ./ZMediumToMarkdown
go into projectbundle install
in terminal to install project dependenciesbundle exec ruby [USAGE Command]
in the furture (USAGE Command write down below)Execute File: bin/ZMediumToMarkdown
Downloading all posts from any user
bundle exec ruby bin/ZMediumToMarkdown -u [USEERNAME]
Downloading single post
bundle exec ruby bin/ZMediumToMarkdown -p [MEDIUM POST URL]
Update to latest version
bundle exec ruby bin/ZMediumToMarkdown -n
Remove all downloaded posts data
bundle exec ruby bin/ZMediumToMarkdown -c
Print current ZMediumToMarkdown Version & Output Path
bundle exec ruby bin/ZMediumToMarkdown -v
The default path of the downloaded post will be in the ./Output
directory.
./Ouput/users/[USERNAME]/posts/[POST_PATH_NAME]
./Ouput/posts/[POST_PATH_NAME]
[POST_PATH_NAME]/images/[POST_ID]/[IMAGE_PATH_NAME]
All content downloaded using ZMediumToMarkdown, including but not limited to articles, images, and videos, are subject to copyright laws and belong to their respective owners. ZMediumToMarkdown does not claim ownership of any content downloaded using this tool.
Downloading and using copyrighted content without the owner's permission may be illegal and may result in legal action. ZMediumToMarkdown does not condone or support copyright infringement and will not be held responsible for any misuse of this tool.
Users of ZMediumToMarkdown are solely responsible for ensuring that they have the necessary permissions and rights to download and use any content obtained using this tool. ZMediumToMarkdown is not responsible for any legal issues that may arise from the misuse of this tool.
By using ZMediumToMarkdown, users acknowledge and agree to comply with all applicable copyright laws and regulations.
name: ZMediumToMarkdown
on:
workflow_dispatch:
schedule:
- cron: "10 1 15 * *" # At 01:10 on day-of-month 15.
jobs:
ZMediumToMarkdown:
runs-on: ubuntu-latest
steps:
- name: ZMediumToMarkdown Automatic Bot
uses: ZhgChgLi/ZMediumToMarkdown@main
with:
command: '[USAGE Command]' # e.g. -u zhgchgli
If you find this library helpful, please consider starring the repo or recommending it to your friends.
Feel free to open an issue or submit a fix/contribution via pull request. :)