https://github.com/lokranjanp/onlymemes
Custom flask based random reddit meme fetcher with fast retrieval based on selected subreddits providing a seamless meme scroll through multi-route unique caching in Redis.
https://github.com/lokranjanp/onlymemes
css flask html javascript praw-api praw-reddit python
Last synced: 2 months ago
JSON representation
Custom flask based random reddit meme fetcher with fast retrieval based on selected subreddits providing a seamless meme scroll through multi-route unique caching in Redis.
- Host: GitHub
- URL: https://github.com/lokranjanp/onlymemes
- Owner: lokranjanp
- Created: 2024-07-10T05:10:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T11:41:53.000Z (almost 2 years ago)
- Last Synced: 2025-01-05T06:41:52.757Z (over 1 year ago)
- Topics: css, flask, html, javascript, praw-api, praw-reddit, python
- Language: CSS
- Homepage: https://random-reddit-meme-dcd00e42e641.herokuapp.com/
- Size: 3.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reddit Meme Viewer with Flask
This Flask application fetches random memes from Reddit's r/memes subreddit and displays them with a dynamic countdown.
Hosted at : https://random-reddit-meme-dcd00e42e641.herokuapp.com/
## Features
- Fetches random memes from Reddit using the Reddit API.
- Displays each meme with its title and a link to the original Reddit post.
- Dynamically updates a countdown for displaying a new meme every 30 seconds.
## Technologies Used
- Python
- Flask
- PRAW (Python Reddit API Wrapper)
- HTML/CSS
- Redis NoSQL-Cache
## Prerequisites
- Python 3.11
- Flask
## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/your-repository.git
cd your-repository
```
2. Install dependencies using pip:
```bash
pip install -r requirements.txt
```
3. Set up environment variables:
- Create a `.env` file in the root directory.
- Add your Reddit API credentials in the `.env` file:
```
CLIENT_ID=your_reddit_client_id
CLIENT_SECRET=your_reddit_client_secret
USER_AGENT=your_user_agent
```
4. Run the Flask application:
```bash
python app.py
```
5. Open your web browser and go to `http://localhost:5000` to view the application.
## Usage
- Upon visiting `http://localhost:5000`, the application will fetch and display a random meme from Reddit.
- The meme will be automatically refreshed every 30 seconds.
## Deployment
Deployed in Heroku.
View website @ https://random-reddit-meme-dcd00e42e641.herokuapp.com/
## Acknowledgements
- Reddit API for providing access to memes from r/memes.
---