m2m
m2m copied to clipboard
Transform a Medium post into a Markdown file
M2M or Medium to Markdown
A project to transform a Medium post into a Markdown file
Environment Variables
This project uses 2 environment variables: GITHUB_USERNAME
and GITHUB_PASSWORD
. They are used in the GistToCodeblock
class to authenticate user in the Github API.
Copy the .sample-env
and update the variables with your Github username and password
cp .sample-env .env
Requirements
Create your virtual environment
virtualenv m2menv
Activate your virtualenv
source m2menv/bin/activate
Run this command to install all required libraries
pip install -r requirements.txt
- Python 3
- BeautifulSoup: Easily parse HTML
- Python DotEnv: Store environment variables
- Requests: Access public APIs & HTML pages
Usage
To do the Medium to Markdown transformation, call the core.py
passing the post url
python m2m/core.py http://bit.ly/2FG5GgT
If you not pass the post url, the core.py
will use the default post url