Tool for creating stickers.
The steps below walk you through an initial setup and a clean Python environment.
I use Pipenv
to manage the project environment
and pre-commit
to run CI actions both locally and in PR checks.
-
Install Python 3.10 - https://www.python.org/downloads/
-
Install Virtualenv - https://pypi.org/project/virtualenv/
-
Make sure your virtual environment is running -
which python
-
Install pipenv within your running virtualenv
pip install pipenv
- Install dependencies
pipenv sync
- Run virtual environment (after setting environment variables)
pipenv shell
Make sure to create a .env file
The following environment variables must be set:
- ENV_OPENAI_KEY
- ENV_OPENAI_ORG
- ENV_CHROME_PROFILE -- Temp not needed
For more information on setting openai variables see: https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key
For ENV_CHROME_PROFILE see First Time Setup Selenium step below.
Currently: run main.py in the root directory -- make sure the above environment variables are set.
Open up your chrome and go to chrome://version/ and identify the default profile. Set this as your ENV_CHROME_PROFILE variable.
Go to whichever website you want to sell stickers on and login with the chrome browser you are planning to use with Selenium.
Run the Selenium driver
python Selenium/driver.py
run clean_up.py in the base directory to remove generated stickers in Sticker_Generator/data