The Daily Quote Generator is a Python-based automation tool that fetches a random inspirational quote daily from a public API and commits it to this repository. This project showcases automation, API integration, sentiment analysis, and containerization using Docker.
- Automated Quote Fetching: Retrieves a new inspirational quote daily from the API Ninjas Quotes API.
- Multi-language Support: Translates quotes into Spanish and Portuguese using the MyMemory Translation API.
- Sentiment Analysis: Analyzes the sentiment of each quote using NLTK's VADER and visualizes the results with t-SNE.
- Version Control Integration: Commits and pushes new quotes to the repository automatically.
- Dockerized Setup: Easily build and run the application in a Docker container.
- Logging: Comprehensive logging for monitoring and troubleshooting.
Follow these instructions to set up and run the Daily Quote Generator on your local machine.
- Python: Version 3.8 or higher. Download Python
- Git: For version control. Download Git
- Docker: (Optional) For containerization. Download Docker
-
Clone the Repository:
git clone https://github.com/hipnologo/daily_quote.git
-
Navigate to the project directory:
cd daily_quote
-
Install Python Dependencies: It's recommended to use a virtual environment.
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install --upgrade pip pip install -r requirements.txt
-
Install NLTK Data: The script uses NLTK's VADER for sentiment analysis.
python -c "import nltk; nltk.download('vader_lexicon')"
Run the script manually to generate and commit a new quote:
python daily_quote.py
To automate the execution, schedule the script using cron jobs (Linux/macOS) or Task Scheduler (Windows).
We welcome contributions! Please see CONTRIBUTING.md
for more details.
This project is licensed under the MIT License - see the LICENSE
file for details.