Medium Automater is a tool that automates the process of generating articles using the OpenAI API and publishing them on Medium.
-
Clone the repository from GitHub:
git clone https://github.com/aarav-malik/medium-automater.git
-
Install the dependencies:
python generate_article.py --prompt "Your prompt goes here"
-
Set up your OpenAI API key:
- Sign up for an OpenAI API key here.
- Copy your API key and set it as an environment variable named
OPENAI_API_KEY
.
- Set up your Medium account:
- Sign up for a Medium account if you don't have one already.
- Create a new integration here by clicking on "Integration tokens" in the left sidebar.
- Copy your integration token and set it as an environment variable named
API_KEY
. - Set your client id as the variable
CLIENT_ID
.
- To generate an articles, replace "Hello" in the topics array to the topic of your choice
- Tags can be changed by adding strings to the Tags array
- Status of article can be changed by modifying
publishStatus
-> set to "public" to publish upon running code or "draft" to send it to medium as a draft - Run the code
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more information.