Skip to content

Lunatic16/patronreact-search

Repository files navigation

PatronReact Search Tools

CLI tools for searching and monitoring posts from PatronReact creators — a platform aggregating reaction content from Patreon creators.

Quick Start

# Interactive search — find a creator, then search their posts by keyword or tag
bash patronreact-interactive-search.sh

# Latest posts feed — scan all creators for posts from the last 24 hours
python3 patronreact-latest-posts.py

# Export feed to Markdown file (configurable time window)
python3 patronreact-export.py --output feed.md --hours 24

Architecture

┌──────────────────────────────────┐
│        CLI Tools (this repo)     │
│  ┌────────────────────────────┐  │
│  │ patronreact-interactive    │  │
│  │ -search.sh                 │  │
│  └────────────┬───────────────┘  │
│               │ curl              │
│  ┌────────────────────────────┐  │
│  │ patronreact-latest-posts   │  │
│  │ .py (subprocess + curl)    │  │
│  └────────────────────────────┘  │
│  ┌────────────────────────────┐  │
│  │ patronreact-export.py      │  │
│  │ (urllib.request, stdlib)   │  │
│  └────────────┬───────────────┘  │
└───────────────┼──────────────────┘
                │
                ▼
┌───────────────────────────────────┐
│  API: patronreact.ny4n.my.id      │
│  /api/v1/search                   │
│  /api/v1/recent                   │
│  /api/v1/tags-list                │
└───────────────┬───────────────────┘
                │
                ▼
┌───────────────────────────────────┐
│  Frontend: www.patronreact.com    │
│  /channel/{id}                    │
│  /post/{id}?c={id}                │
└───────────────────────────────────┘

Tools

1. Interactive Search (patronreact-interactive-search.sh)

Step-by-step CLI for exploring a specific creator's content.

Workflow:

  1. Search creator — type part of a name; supports fuzzy matching
  2. View tags — see the creator's most popular tags with post counts
  3. Search posts — keyword search or tag-based filtering

Interactive commands (during search loop):

Command Description
quit, q, exit Exit the tool
tags, t List all available tags with post counts
all, a Fetch all recent posts (no filter)

Example session:

$ bash patronreact-interactive-search.sh

============================================================
  PatronReact Interactive Post Search
============================================================

📋 STEP 1: Search Creator by Name
-------------------------------------------
Enter creator name (or part of it): normies

✅ Found: The Normies
   Channel ID: 573397

📋 Loading creator data...
✅ Loaded! Creator has 42 tags

🏷️  Popular tags:
   - One Piece (156 posts)
   - Jujutsu Kaisen (89 posts)
   - Attack on Titan (67 posts)
   ...

🔍 Searching for: One Piece
✅ Found 23 posts matching "One Piece"

  1. One Piece Episode 1071 Reaction
       Type: video | Views: 12453 | Published: 2024-03-15
       Link: https://www.patronreact.com/post/abc123?c=573397

2. Latest Posts Feed (patronreact-latest-posts.py)

Aggregates recent posts from all 138 creators and displays only those published within the last 24 hours.

Features:

  • Concurrent requests (3 workers) for faster scanning
  • Exponential backoff retry on failures
  • Time-filtered output (configurable HOURS_BACK)
  • Sorted newest-first

Example output:

============================================================
  PatronReact — Latest Posts Feed
  April 08, 2026 at 14:30
  Showing posts from the last 24 hours
============================================================

📡 Scanning 138 creators for recent posts...

   ✅ Completed! Checked 138 creators. 12 have new posts.

============================================================
  📺 New Posts (Last 24 Hours)
============================================================

  1. Jujutsu Kaisen Season 2 Episode 15
       Creator: The Normies | Published: 2026-04-08 12:15 | Views: 3421
       Link: https://www.patronreact.com/post/xyz789?c=573397
  ...

3. Feed Export with Markdown (patronreact-export.py)

Enhanced version of the latest posts feed with Markdown file export, configurable time window, and silent mode.

Features:

  • All features of patronreact-latest-posts.py (concurrent scanning, exponential backoff)
  • Markdown export with posts grouped by creator, sorted by post count
  • Configurable time window (--hours)
  • Silent mode (--no-console) for cron/automation use
  • Zero external dependencies — uses urllib.request (Python stdlib)

Usage:

# Console output only (same as patronreact-latest-posts.py)
python3 patronreact-export.py

# Console + Markdown file export
python3 patronreact-export.py --output feed.md

# Custom time window (last 48 hours)
python3 patronreact-export.py --output feed.md --hours 48

# Silent mode — file only, no console output
python3 patronreact-export.py --output feed.md --no-console

Example Markdown output:

# PatronReact — Latest Posts Feed

**Generated:** April 11, 2026 at 16:13
**Time Range:** Last 24 hours
**Creators Scanned:** 138
**Creators with Posts:** 80
**Total Posts Found:** 257

## Summary

| Metric | Value |
|--------|-------|
| Total Posts | 257 |
| Unique Creators | 80 |
| Time Range | 24 hours |

## Posts by Creator

### Angel Rodriguez

**13 post(s)**

1. **Black Clover Episode 125 Reaction!**
   - Published: 2026-04-10 23:43
   - Views: 0
   - Type: video_embed
   - [View Post](https://www.patronreact.com/post/155312668?c=10392571)

4. Creator Mapping (creator-mapping-correct.md)

Authoritative source of truth for creator name-to-ID mappings. Format: lowercase_name|channel_id|Display Name.

Contains ~150 entries. Use this file to verify or update creator IDs in the scripts.

API Reference

Full API documentation with request/response schemas, code examples, and error handling is available in API.md.

Endpoint Method Description Parameters
/api/v1/search GET Search posts by keyword or tag campaignId, query, tag (optional), kservice (optional)
/api/v1/recent GET Recent posts for a creator campaignId, isStar (optional)
/api/v1/tags-list GET Available tags for a creator campaignId, kservice (optional)

Fallback strategy: Both tools try requests without kservice=true first, then retry with it if no results are returned.

Requirements

  • Bash script: bash, curl, python3 (for JSON parsing and URL encoding)
  • Python scripts: Python 3 (standard library only)

No pip packages required:

  • patronreact-latest-posts.py uses subprocess + curl
  • patronreact-export.py uses urllib.request (zero external dependencies)

Known Data Discrepancies

There is a known ID mismatch for Alex Hefner between files:

  • creator-mapping-correct.md / patronreact-interactive-search.sh: 2693197
  • patronreact-latest-posts.py: 269197

The mapping file (creator-mapping-correct.md) is considered the authoritative source.

Project Structure

patronreact-search/
├── README.md                         # This file
├── API.md                            # Full API documentation
├── creator-mapping-correct.md        # Creator name→ID mappings (source of truth)
├── patronreact-interactive-search.sh # Interactive CLI search tool
├── patronreact-latest-posts.py       # Concurrent feed aggregator (subprocess + curl)
└── patronreact-export.py             # Feed aggregator + Markdown export (urllib)

About

CLI tools for searching and monitoring posts from PatronReact creators — a platform aggregating reaction content from Patreon creators.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors