Skip to content

ktcodes-tech/daily-quote-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Daily Quote Python

A Python application that provides daily inspirational quotes to brighten your day.

Description

This project is a Python-based application that delivers a fresh, inspiring quote every day. It's designed to provide users with daily motivation and wisdom through carefully curated quotes.

Features

  • Daily refreshed quotes
  • Simple and easy to use interface
  • Collection of inspirational quotes
  • Python-powered functionality

Installation

  1. Clone the repository
git clone https://github.com/ktcodes-tech/daily-quote-python.git
  1. Navigate to the project directory
cd daily-quote-python
  1. Install required dependencies
pip install -r requirements.txt

Usage

To run the application:

python src/main.py

Project Structure

daily-quote-python/
├── src/
│   └── main.py
├── tests/
│   └── test_main.py
├── requirements.txt
└── README.md

Testing & Endpoint

How to run the program locally

  • Ensure you have Python 3.7+ installed.
  • From the project root run one of:
    • If the main script is in src/: python src/main.py
    • If the main script is at the project root: python main.py
  • Common flags:
    • --refresh (or -r) : fetch quotes from remote and update local cache
    • --all (or -a) : print all cached quotes
    • --date YYYY-MM-DD (or -d) : show quote for a specific date

Examples:

# Print today's quote
python src/main.py

# Force refresh from remote and print today's quote
python src/main.py --refresh

# Show all cached quotes
python src/main.py --all

# Show quote for a specific date
python src/main.py --date 2025-01-01

Remote API endpoint

curl -s https://type.fit/api/quotes | jq '.[0]'

(If jq is not installed, curl the URL and inspect the raw JSON.)

Running tests

  • If the project includes tests (tests/), run with pytest or unittest:
# Using pytest (recommended if available)
pytest

# Or using unittest discovery
python -m unittest discover -v

Troubleshooting

  • If the app fails to fetch quotes, run with --refresh to attempt to update the local cache; check network connectivity and that the endpoint is reachable.
  • If you see "No quotes available" make sure a cache exists at ./quotes.json or run --refresh to populate it.

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

  • @ktcodes-tech
  • @sahamidfathi

Acknowledgments

  • Thanks to all contributors
  • Inspired by the need for daily motivation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages