Commit graph

215 commits

Author SHA1 Message Date
38a87e0b6b Add httpx for FastAPI TestClient 2026-01-06 09:37:40 -05:00
85d1d1e119 Add 'become un*' manifesto and cross to about footer
- become ungovernable/unstoppable/untouchable/unseen/unknown/un
- ✝️ cross with "Sorry for the convenience" (Mitch Hedberg)
- Translations in all 27 languages
2026-01-06 09:33:42 -05:00
0974593873 Refactor language handling to FastAPI Depends
- Replace get_lang() calls with Depends(get_language) dependency
- Language resolution: ?lang=XX query > cookie > Accept-Language header
- Middleware sets cookie, frontend cleans URL via history.replaceState
- view_page_by_hash now redirects instead of direct call
2026-01-06 08:25:50 -05:00
4b247f0be9 Fix lang param: middleware sets cookie, frontend cleans URL
No more redirect loop - middleware just sets cookie on response,
frontend uses history.replaceState to remove ?lang=XX from URL.
2026-01-05 22:17:13 -05:00
f124828c16 21 side quests scattered through the codebase
1-20 are findable. 21 is the absence itself.

fnord
2026-01-05 21:10:02 -05:00
0fec9abdd5 One CSS to rule them all: discordia.css
The Law of Fives - organized into 5 sections:
  I.   CHAOS      - The void from which all emerges
  II.  DISCORD    - Navigation through the confusion
  III. CONFUSION  - Forms that capture intent
  IV.  BUREAUCRACY - The grid that contains
  V.   AFTERMATH  - Side quests for the worthy

fnord
2026-01-05 20:52:02 -05:00
3714c9b6a9 Extract common CSS to 5 external stylesheets (DRY)
- base.css: Core layout, typography, container
- nav.css: Navigation bar styles
- forms.css: Form elements, buttons, inputs, checkboxes
- quests.css: CSS-only easter eggs
- results.css: Media grid and result card styles

Templates now link external CSS via extra_css_links block.
Page-specific styles remain inline (correct pattern).
Fixed OVER_9000 test (it's OVER 9000, so 9001).
2026-01-05 20:44:35 -05:00
7fff500f2f CSS-only side quests: no JS, pure delight
Interactions via CSS animations and SVG:
- Hover logo: 🐷 appears, click: oink!
- Hover body: 'grow food not lawn' rises from below
- Print stylesheet: Sign Maker approves
- Spider descends from nav on hover
- About page: spider-pig SVG descends on hero hover
- Sign Maker's mark ☉ at page end - spins on hover
- ::selection styled in brand colors

Side quest comments scattered: 1/21, 2/21, 3/21...

No JavaScript easter eggs. CSS only. The way it should be.
2026-01-05 20:31:29 -05:00
e9c0cf965f The 5 Adventures: View Source rewards the curious
Setting Orange, 5th of Chaos, YOLD 3192 - Mungday

Adventure #1: View Source on any page
Adventure #2: /fnord - you weren't supposed to see it
Adventure #3: /5 - The Law of Fives is never wrong
Adventure #4: /23 - The 23 enigma
Adventure #5: /kallisti - ΚΑΛΛΙΣΤΙ - to the prettiest one

Hidden throughout:
- HTML comments in templates guide the seeker
- fnord appears where you least expect it
- 23 skidoo in the live feed
- The Sign Maker leaves breadcrumbs

Truth, Freedom, Harmony, Love.
2026-01-05 20:22:34 -05:00
81662f1781 Mungday chaos: Sign Maker easter eggs, fix OVER_9000, England flag
Setting Orange, 5th of Chaos, YOLD 3192 - Celebrate Mungday!

- Add Sign Maker comments throughout codebase
- Fix OVER_9000 = 9001 (it's OVER 9000, not exactly 9000)
- Change English flag from 🇺🇸 to 🏴󠁧󠁢󠁥󠁮󠁧󠁿 (St. George's Cross)
- Fnord. You didn't see this commit.
2026-01-05 20:18:23 -05:00
c7c20c5bce Refactor serp.py into serp/ package, add /eggs endpoint
- Extract serp.py into serp/ package for better testability
  - serp/app.py: FastAPI app, LanguageMiddleware
  - serp/server.py: All route handlers
  - serp/i18n.py: Translations, LANG_NAMES with flags
  - serp/models.py: CrawlRequest model
  - serp/archive.py: Tarball handling
  - serp/logging.py: Job logging
  - serp/utils.py: slugify function
- Add /eggs endpoint listing easter eggs:
  - #0: ?lang=XX forces language via middleware
  - #1: OVER_9000 pagination limit
  - #2: The 72 Rules of St. Benedict (A Way)
- Fix test module import issue (app_module -> app_config)
- LANG_NAMES includes flags and codes (e.g., 🇺🇸 EN English)
2026-01-05 19:16:04 -05:00
7883ae0eba Refactor: Extract neopig package from neopig.py
Phase 1 of module restructuring as outlined in docs/REFACTOR.md:

New neopig/ package modules:
- live.py: Live media queue (get_live_queue, emit_live_media)
- state.py: AppendOnlyStateLog, state file helpers
- html_utils.py: trim_html_wrapper, extract_meta_from_html
- logging.py: TqdmLoggingHandler, job logging functions
- backfill/: markdown and screenshot backfill operations

Package features:
- Lazy import of NeoPig/main from neopig.py via __getattr__
- Full backwards compatibility with existing imports
- 42 new unit tests for extracted modules

Total: 458 tests passing
2026-01-05 17:30:58 -05:00
bf4fd9e1e8 modified: .gitignore
new file:   docs/REFACTOR.md
2026-01-05 17:11:42 -05:00
00bad59920 Fix test_database.py method names to match Database API
- upsert_page → store_page (2 occurrences)
- get_media → get_media_by_hash (2 occurrences)
- search_media → search_media_advanced
2026-01-05 14:57:49 -05:00
c351753290 Fix test_live_stream_endpoint_exists hanging on SSE request 2026-01-05 14:52:58 -05:00
8d2fbbf8b1 Fix test_stats_endpoint async context manager mock 2026-01-05 14:51:51 -05:00
3303554a8a Add 72 Rules of St. Benedict translations for all 27 languages
- rules_benedict.py: Source translations for all 72 rules in 27 languages
- inject_rules.py: Script to inject rules into i18n.py TRANSLATIONS
- i18n.py: Added rule_1..rule_72 for all language dicts
- about.html.j2: Fixed HTML escaping with |safe filter for rules
2026-01-05 13:09:06 -05:00
5877c950dc Add complete about page body translations for all 27 languages
- translations_body.py: 26 languages × 74 keys (1,924 strings)
- inject_translations.py: Script to merge body translations into i18n.py
- Languages: en, es, fr, de, ja, pt, ru, ko, it, ar, hi, nl, pl, tr, vi,
  th, id, uk, sv, zh, zh-tw, bn, ur, sw, mr, te, ka
2026-01-05 12:20:26 -05:00
a46f93aaf1 Extract i18n to module, add Georgian, translate about page body
- Extract 1100+ lines of translations from serp.py to i18n.py
- Add Georgian (ka) as 27th supported language
- Add 74 about page body text keys (hero, chapters, features, footer)
- Update about.html.j2 to use translation placeholders
- Full Chinese translations for all body text
- English fallback for other 25 languages (can be translated later)
- serp.py reduced from 3291 to 2142 lines
- i18n.py now 3808 lines with 190 keys per language
2026-01-05 10:16:48 -05:00
1df3e82be9 Add critical warning: never destroy prod services, use --redeploy 2026-01-04 15:47:28 -05:00
dc72904aff Allow replay for import jobs (they have valid discovered_at timestamps) 2026-01-04 15:43:41 -05:00
d7f736f5ab Fix replay: stream immediately with pagination, skip poll() in replay mode 2026-01-04 11:04:00 -05:00
73ee232def Remove search box from crawl page 2026-01-04 10:56:17 -05:00
dd7775db5d Show Replay button for all completed jobs, not just those with stats 2026-01-04 10:55:26 -05:00
e5972a3171 Add instant replay for crawl jobs and NEOPIG_NO_VCS flag
- Add /api/crawl/jobs/{job_id}/replay SSE endpoint for replaying crawls
- Replay streams media at original discovery pace with speed multiplier
- Add Replay button to crawl jobs UI (works even when crawling disabled)
- Track active replays to prevent double-clicking same job
- Live feed page handles ?replay=JOB_ID parameter for replay mode
- Add NEOPIG_NO_VCS=1 env var to skip VCS repository detection
- Fix hljs.highlightAll() call when highlight.js not loaded
2026-01-04 10:47:11 -05:00
2dc46b1bce Preserve original post IDs (remarkbox etc), only generate if missing 2026-01-04 08:56:12 -05:00
f4fb518ad6 Add anchor IDs to forum posts with copy-link and 8s highlight on navigation 2026-01-04 08:55:23 -05:00
b5497dfe0d Change 'Rules?' to 'A Way.' on about page 2026-01-03 14:02:37 -05:00
11f8fc59ae modified: requirements.txt
modified:   serp.py
	new file:   templates/about.html.j2
	new file:   templates/base.html.j2
	new file:   templates/crawl.html.j2
	new file:   templates/import.html.j2
	new file:   templates/live.html.j2
	new file:   templates/partials/search_box.html.j2
	new file:   templates/phantom.html.j2
	new file:   templates/search.html.j2
	new file:   templates/view.html.j2
2026-01-03 13:48:47 -05:00
d98236c0c0 Fix results count display: move above grid instead of inside it 2026-01-03 08:39:09 -05:00
6736f5718e Fix mobile search form: input on own line, dropdown and button wrap below 2026-01-03 08:37:54 -05:00
1f969c900d Add missing metadata label translations for all languages, fix sources translation bugs 2026-01-03 08:37:26 -05:00
8e5f0ded1f Add viewport meta tag to all HTML templates for mobile 2026-01-03 08:27:20 -05:00
8ab4dc4950 Force 2-column grid on mobile for home and live feed 2026-01-03 08:24:49 -05:00
71d4b10271 Add purple circle emoji after terminated 2026-01-03 08:19:41 -05:00
81d01800f2 Remove 'the' from bones of platforms 2026-01-03 08:17:45 -05:00
75e9f83a75 Remove italic from footer tagline 2026-01-03 08:12:57 -05:00
4d006f3cbe Improve mobile nav: remove Import emoji, swap with About, add responsive styles 2026-01-03 08:12:43 -05:00
450f0776fc Add extra line break before Aquarius tagline 2026-01-03 07:51:55 -05:00
e36dcab83b Link TempleOS image to templeos.org 2026-01-03 07:51:36 -05:00
11eca456a2 Vendor all About page images locally 2026-01-03 07:48:36 -05:00
eac1aae8a6 Resize internet for all image to 21% 2026-01-03 07:46:35 -05:00
a684fdd6c7 Set gift image to native 200x200 size 2026-01-03 07:46:08 -05:00
2aa48a6134 Change donated to gifted, add pixel art gift image 2026-01-03 07:45:22 -05:00
4b3f3b2294 Change 'the public domain' to 'our public domain' 2026-01-03 07:43:24 -05:00
0f1bd3d70d Move skeleton key image below intro paragraph 2026-01-03 07:42:54 -05:00
fce88e5866 Add oven fresh internet image to footer 2026-01-03 07:41:23 -05:00
97d8195725 Welcome to An Age of Aquarius 2026-01-03 07:39:33 -05:00
3bdfd0a302 Put Aquarius tagline on new line 2026-01-03 07:39:20 -05:00
2f1761b713 Remove unnecessary 'The/the' articles throughout About page 2026-01-03 07:17:29 -05:00