https://github.com/redinfinitypro/holidayposterbot
Holiday Poster is a Python script that finds and posts holiday details on Reddit, using Wikipedia and the holidays library to fetch holiday summaries.
https://github.com/redinfinitypro/holidayposterbot
Last synced: 3 months ago
JSON representation
Holiday Poster is a Python script that finds and posts holiday details on Reddit, using Wikipedia and the holidays library to fetch holiday summaries.
- Host: GitHub
- URL: https://github.com/redinfinitypro/holidayposterbot
- Owner: RedInfinityPro
- Created: 2024-05-23T22:11:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-12T22:08:29.000Z (9 months ago)
- Last Synced: 2025-04-04T22:35:26.549Z (3 months ago)
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HolidayPosterBot
Holiday Poster is a Python script that finds and posts holiday details on Reddit, using Wikipedia and the holidays library to fetch holiday summaries.[](https://pypi.org/project/logging/)
[](https://pypi.org/project/pycountry/)
[](https://pypi.org/project/datetime/)
[](https://pypi.org/project/os/)
[](https://pypi.org/project/holidays/)
[](https://pypi.org/project/praw/)
[](https://pypi.org/project/wikipedia/)## Table of Contents
- [About](#about)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)## About
Holiday Poster is a Python script that finds and posts holiday details on Reddit, using Wikipedia for holiday summaries and the holidays library for holiday data.
## Features
- **Logging:** Detailed logging using Python's logging library, which includes rotating file handlers.
- **Holiday Lookup:** Uses the holidays library to find holidays in various countries.
- **Wikipedia Integration:** Fetches holiday summaries from Wikipedia.
- **Reddit Posting:** Posts holiday details to a specified subreddit.
- **Environment Variable Handling:** Securely handles secret tokens using environment variables.## Installation
Prerequisites
- Python 3.6 or higher
- Reddit API credentials
- Wikipedia API library
- Holidays library
- Pycountry libraryDependencies
You can install the necessary dependencies using pip:
pip install praw wikipedia holidays pycountry
Configuration
Ensure you have your Reddit API credentials set up in environment variables or within your script securely. For example:
export SOME_SECRET='your_reddit_api_secret'
## Usage
Running the Script
To run the script, simply execute:
python your_script_name.py
## Contributing
Contributions are welcome! To contribute to Monster Maze, follow these steps:
1. Fork the repository.
2. Create a new branch:
```bash
git checkout -b feature/YourFeature
```
3. Make your changes and commit them:
```bash
git commit -m "Add new feature"
```
4. Push to the branch:
```bash
git push origin feature/YourFeature
```
5. Create a new Pull Request.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.