Commit Graph

9 Commits

Author SHA1 Message Date
Claude
3f7e8196e3 Sort CheapShark deals by recency instead of deal rating
The bot polls periodically for new deals, but sorting by "Deal Rating"
meant it always returned the same top-rated deals and would never
discover new listings that aren't in the top 10 by rating. Sorting by
"recent" ensures newly added or updated deals are seen on each poll.

https://claude.ai/code/session_017eMsVwUopgmnEyd6JJedpV
2026-02-28 02:49:28 +00:00
Claude
c33e46c3cf Fix CheapShark rating filter: correct scale and skip unrated deals
Two bugs fixed:
1. Function signature used old 0-100 scale defaults (min_rating: int = 80)
   but dealRating from CheapShark is 0-10. Updated to float = 8.0.
2. Deals with dealRating of 0.0 (unrated/insufficient data) were being
   filtered out as "poorly rated". Now treats 0.0 as unrated and skips
   the rating check, so games like Leisure Suit Larry that lack a
   CheapShark deal rating aren't incorrectly excluded.

https://claude.ai/code/session_017eMsVwUopgmnEyd6JJedpV
2026-02-28 02:47:15 +00:00
Claude
c114f3e99f Add debug logging for deal filtering and --debug flag
Log the raw deal count before filtering and log each filtered-out
deal with the reason (savings too low, rating too low) at DEBUG level.
Use --debug flag to enable verbose output for troubleshooting.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
2026-02-28 02:29:43 +00:00
Claude
88377e258a Use CheapShark's native 0-10 scale for MIN_DEAL_RATING
The previous 0-100 scale with a * 10 conversion was confusing —
CheapShark returns deal ratings as floats (e.g. 9.8, 7.5) so the
config should match. Default is now 8.0 instead of 80.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
2026-02-28 02:21:24 +00:00
Claude
3138fe314f Load .env file at startup via python-dotenv
Running directly with `python -m gaming_deals_bot` didn't pick up
variables from .env — only the Docker path (--env-file) did. Now
dotenv is loaded before config parsing so both workflows work.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
2026-02-28 02:04:37 +00:00
Claude
016d2c1973 Add --check preflight to validate config and connectivity
`python -m gaming_deals_bot --check` tests each external dependency
before starting the bot:

- Matrix: verifies access token (whoami) and room membership
- CheapShark: hits the deals endpoint
- Epic Games Store: hits the free-games endpoint
- Frankfurter: fetches exchange rates
- IsThereAnyDeal: validates the API key (skipped if not set)

Exits 0/1 so it works in CI pipelines and Docker health-checks.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
2026-02-28 01:52:48 +00:00
Claude
6fdbc9f9a0 Reduce exchange rate refresh to twice daily
Be respectful of the free Frankfurter API — ECB rates only update once
a day anyway, so a 12-hour cache TTL is more than sufficient.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
2026-02-28 00:56:21 +00:00
Claude
8277cf37e2 Add multi-currency pricing (USD, CAD, EUR, GBP) for deal posts
Fetches live exchange rates from the Frankfurter API (ECB data, free,
no API key) and displays converted prices alongside USD in every deal
message. Rates are cached in memory and auto-refreshed hourly.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
2026-02-28 00:51:52 +00:00
Claude
6e84429ad1 Add gaming deals Matrix bot
Implements a Matrix bot that posts PC gaming deals and free game alerts:
- CheapShark API integration (Steam, GOG, Humble, GMG) polled every 2 hours
- Epic Games Store free games detection polled daily
- IsThereAnyDeal historical low price flagging (optional)
- SQLite deduplication with 30-day pruning
- First-run population (records existing deals without posting)
- Matrix-flavored HTML + plain text fallback messages
- Dockerfile for containerized deployment

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
2026-02-28 00:00:22 +00:00