c5391a957d3bc1f88054c57cc0186198160e49cd
Image Swipe App
A web application for sorting and organizing images using swipe gestures, similar to dating apps.
Features
- Swipe Interface: Swipe images in four directions (left, right, up, down) to categorize them
- Full-size Image View: Click on any image to view it in full resolution with metadata
- History Page: View all your past selections with rich filtering and sort options
- NSFW Filtering: Toggle to include/exclude NSFW images on both the main swiper and history pages
- NSFW Blur: Optional blur for NSFW thumbnails on the history page with a toolbar toggle
- Orientation & Action Filters: Filter results by orientation (portrait/landscape/square) and by action taken
- Database Storage: All selections are saved in a SQLite database
- Reset Functionality: Option to clear all selections and start fresh
File Structure
server.py: Entry point that starts the HTTP serverhandler.py: HTTP request handler implementing all API endpointsdatabase.py: SQLite helpers (initialisation, queries, sync)config.py: Centralised constants (paths, port)index.html: Main page with the swipe interfacehistory.html: Page to view and manage past selectionsjs/: Front-end JavaScript (main.js,utils.js, etc.)styles.css: CSS styling for the applicationupdate_nsfw_flags.py: Utility script to (re)calculate NSFW flags for existing images after changing keyword lists
How to Use
- Run the server:
python server.py - Open a web browser and navigate to
http://localhost:8000 - Use the on-screen buttons or swipe gestures to categorize images:
- Left: Discard
- Right: Keep
- Up: Favorite
- Down: Review Later
- Click on an image to view it in full resolution
- Use the "View History" link to see all your selections. The toolbar lets you:
- Filter by action/orientation/NSFW status
- Toggle blur of NSFW thumbnails
- Sort by creation date, swipe date or resolution
- Use the "Reset Database" button in the history page to clear all selections
NSFW Detection & Maintenance
NSFW status is inferred from prompt keywords defined in config.py (NSFW_KEYWORDS).
After changing the keyword list or adding new images you can refresh the database flags:
python update_nsfw_flags.py
This will reset and recalculate all nsfw flags so that the new filters work correctly.
Requirements
- Python 3.x
- Standard Python libraries (http.server, sqlite3, etc.)
- Web browser with JavaScript enabled
Description
Languages
JavaScript
52.2%
Python
14.3%
SCSS
13.1%
CSS
11.5%
HTML
5%
Other
3.9%