Commit e38648d
v0.2.0: standalone viewer as app, narratology runtime, rename tvplotlines → tvplot (#1)
* Add HTML build script and shell template for standalone viewer
Build script assembles shell.html + parts (CSS, JS, demo data) into a
single self-contained HTML file. Three-screen layout: welcome, grid,
analytics with modal container and placeholder slots.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: build.py concatenates all JS parts, not just app.js
* Port CSS from tvplotlines-app for standalone HTML viewer
Keep battle-tested styles: color palette (light + Catppuccin Mocha dark),
function colors, rank badges, tension variables, grid layout, analytics.
Remove HTMX/edit-mode/merge/split styles (v1 is read-only).
Add screen routing, welcome screen, and toolbar/navigation styles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add grid rendering and app init for standalone HTML viewer
Port plotline x episode grid from tvplotlines-app Jinja2 template to
vanilla JS. Includes event grid lookup, character resolution, guest
detection, rank sorting, function legend filtering, season/character
filters, and read-only event detail modal. App.js handles screen
routing, dark mode persistence, demo data loading, and file upload.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add analytics rendering with 5 sections ported from tvplotlines-app
Port computation (analytics.py) and rendering (analytics.html) to
standalone JS: scorecard, arc map, episode pulse, convergence moments,
character weight. Wire up Analytics button in app.js.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add router, localStorage Store, toolbar, and JSON import
Store object centralizes all localStorage access (API keys, results,
settings, onboarding state). Toolbar now has series dropdown, Grid/Analytics
tab buttons, dark mode toggle, load/export/LLM/onboarding placeholders.
Series switching re-renders current view and persists last selection.
Drop zone overlay supports drag-and-drop and file picker for JSON import.
Init logic checks onboarding state and restores last session.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add export functions: JSON, TXT, CSV, Final Draft .fdx
Export dropdown in toolbar with 4 formats. Single floating menu
shared between grid and analytics screens. CSV chosen over XLS
to avoid SheetJS dependency — includes both events and plotlines
summary.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add LLM pipeline for browser-side plotline extraction
Implement pipeline.js with streaming API client (Anthropic + OpenAI),
all 5 passes with embedded prompts, post-processing, and synopsis
file upload. Wire drop zone to accept .txt synopses alongside JSON,
add LLM settings dialog, and pipeline progress overlay.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: dark mode CSS, inciting_incident styling, analytics header, episode labels
- Force color-scheme to prevent Firefox dark mode override
- .hidden !important to fix drop zone appearing on load
- inciting_incident: no background, bright green text
- crisis function color added
- Story engine / logline moved above all analytics sections
- Episode numbers shown once in scorecard header
- Episode Pulse: removed themes, added plotline color legend
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add --html and --html-output flags to CLI run command
Generate a standalone HTML viewer alongside the result JSON when
--html is passed. Uses build_html() from the html module. Defaults
to saving next to the JSON with .html extension; --html-output
overrides the path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add minimal welcome screen with first-visit detection
Japanese minimalism aesthetic: lightweight typography, pill-shaped
"Play me" button, subtle "Skip" link. First visit shows welcome,
returning visits skip straight to grid. Smooth fade-out transition.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add onboarding animation that demos full pipeline on real UI
Animated walkthrough plays on actual app screens using Breaking Bad
demo data: LLM settings modal, file upload, pipeline progress,
grid reveal, analytics tour, and export. Ends with real LLM modal
so user can connect their key. Skip link aborts animation cleanly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: consolidate hollywood and narratology prompts under one system parameter
- Rename prompts_en/ to prompts/hollywood/
- Import 8 narratology prompts (formerly tvplotlines_narratology repo) into prompts/narratology/
- Drop prompts_ru/ entirely — Russian support out of current scope
- Replace lang parameter with system across library: get_plotlines, LLMConfig, CLI
- Narratology pipeline raises NotImplementedError for now; prompts in place for v2
- Copy schema.md into docs/layered-schema.md (base + layers JSON design)
- Update pyproject.toml artifacts, example, tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor(narratology): thread stable event ids through passes 2–6
- Pass 2: every event gets id {episode}#{index:02d} and keeps it downstream
- Passes 4–6: reference events by id, not by description
- Pass 5 mre: event_id instead of episode+description
- glossary: plain-English actant names (who_chases, bigger_force, …)
now mapped to their Greimas terms (subject, power, …)
- docs/layered-schema.md aligned with prompt output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(viewer): turn the HTML viewer into an end-to-end app
- Welcome screen now has an "Analyze a series" form (show + season).
Clicking Analyze asks the configured LLM for episode synopses from
its training memory, shows them in an editable preview modal, then
runs the 5-pass pipeline on whatever the user confirms.
- LLM settings modal gains an "Analysis system" selector. Hollywood is
live; Narratology is disabled with a "coming soon" note until its
runtime lands in v2.
- Exports: added "PDF (via print)" that calls window.print(); a print
stylesheet hides the toolbar/modals and lays the grid out in
landscape, so Cmd+P → "Save as PDF" produces a usable document.
- Drag-and-drop .txt flow unchanged — it's the fallback when the model
doesn't know the show.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: v2 scope — narratology runtime, prompt inlining, native PDF, knowledge move
1. Narratology pipeline is now runnable, Python and browser both:
- src/tvplotlines/narratology.py runs all six passes (context → fabula →
actants → story → arc → review) and maps results into the existing
TVPlotlinesResult shape so the viewer renders either system unchanged
- pipeline.js grows runPipelineNarratology mirroring the Python orchestrator
(per-episode and per-plotline passes parallelised), and the top-level
runPipeline dispatches on the user's system choice
- The "Narratology" option in LLM settings is enabled
2. Viewer prompts are no longer hardcoded. build.py reads every
prompts/{hollywood,narratology}/*.md at build time and injects them as a
_PROMPTS object, eliminating drift between source prompts and the viewer
3. Native PDF export — jsPDF is lazy-loaded from CDN and generates a vector
PDF from the loaded result (title, per-plotline sections with actants/
story-DNA + event list, episode appendix). Falls back to window.print()
when offline
4. Knowledge consolidated from 3-resources/tvplotlines/ into
docs/knowledge/ (decisions, specs, theory, prompting, results,
v3_narratology evergreens, archive). Personal artifacts stay in place
All 115 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore(repo): pull internal docs back to 3-resources, rewrite README
- docs/knowledge/ — moved to 3-resources/tvplotlines/. Knowledge,
evergreens, autoresearch drafts, and strategy notes belong out of the
public repo. Personal artifacts already lived there
- docs/viewer/{spec,plan,decisions}.md — internal Russian planning docs,
moved to 3-resources/tvplotlines/viewer-planning/
- .gitignore — exclude Untitled.md draft and the dacomply compliance/
scan output so they can sit in the working tree without leaking
- README — rewrite to reflect the current code: hollywood + narratology
systems with the --system flag, standalone HTML viewer mode, the
"Analyze a series" entry flow, --html/--html-output, narratology's
six-pass table, fixed the broken license badge and the dead
prompts_en/glossary.md link
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: sync docs/ with the current code (hollywood + narratology)
- api.md: get_plotlines signature gains `system`, `skip_review`,
`base_url`, `suggested_plotlines`; new system-comparison table;
Plotline gets reviewed_rank/computed_rank/nature/confidence,
Event gets plot_fn; full CLI flag table for run + write-synopses
- quickstart.md: --system and --html flags, standalone-viewer section
with "Analyze a series" flow, system switch in Python example
- index.md: mentions standalone viewer + layered-schema link
- formulas.md: Pass 4 section (was missing), narratology pipeline
section at the end documenting all six passes and the actant ↔
hero/goal/obstacle/stakes mapping
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: drop gitignore entries for drafts now moved out
Untitled.md and compliance/ live in 3-resources/tvplotlines/
alongside the rest of the private notes; they don't need
to be ignored here any more.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add AI disclosure, methodology, and viewer footer
Address the compliance scan items that actually apply to an installable
library with no hosted service:
- docs/ai-disclosure.md — single source of truth for data flow,
vendor policies, and user rights. Alpine Animation (Switzerland) is
named as publisher; we collect nothing. Names the three synopsis
paths (user-supplied, Wikipedia-scraped via write-synopses, and the
browser's "Analyze a series" flow), covers Anthropic AUP and OpenAI
Usage Policies compliance, and records a use-case paper trail
- docs/methodology.md — plain-language Art. 50 explainer written from
the code (pipeline.py, narratology.py, pass*.py, postprocess.py),
not the dacomply template. Points to formulas.md for line-by-line
rules
- README gains a "How this uses AI" section linking both docs
- HTML viewer shows a dismissible AI-assisted-content footer naming
the model family and Alpine Animation; dismissal persists in
localStorage; footer is hidden at print time so PDF exports stay clean
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add 411@alpineanimation.ch as contact
Alongside GitHub issues — gives data-subject and methodology requests
a direct channel to the publisher, which is what the compliance scan
flagged as missing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: obfuscate contact email against naive scrapers
Replace <411@alpineanimation.ch> with "411 [at] alpineanimation [dot] ch".
Defeats ~80–90% of off-the-shelf email harvesters that look for
mailto: links or @-symbols; humans read it without effort.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: switch contact to purpose-specific alias
tvplotlines@alpineanimation.ch — easy to kill and recreate if it ever
gets scraped, which is a better strategy than trying to obfuscate a
shared catch-all mailbox.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: rename tvplotlines → tvplot
Shorter, snappier. PyPI name, import path, CLI command (tvplot run),
env vars (TVPLOT_*), localStorage keys, and all docs move in one step.
Version bumps to 0.2.0 and CHANGELOG carries a BREAKING migration note.
What changes externally:
- pip install tvplot
- from tvplot import get_plotlines
- tvplot run my-show/ --system narratology
- TVPLOT_OUTPUT_DIR, TVPLOT_SYNOPSES_DIR
What stays:
- Public API surface (get_plotlines signature, Plotline/Event models)
- All pipeline logic and prompts
- Existing result JSONs remain valid
Rationale: no meaningful users yet on PyPI (80%+ of the 0.1.0
download count is bots and scanners), the rename is much cheaper
now than after promotion.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 0fd057e commit e38648d
81 files changed
Lines changed: 8653 additions & 3007 deletions
File tree
- docs
- viewer
- examples
- src
- tvplotlines
- prompts_en
- prompts_ru
- tvplot
- html
- parts
- prompts
- hollywood
- narratology
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
4 | 25 | | |
5 | 26 | | |
6 | 27 | | |
| |||
15 | 36 | | |
16 | 37 | | |
17 | 38 | | |
18 | | - | |
| 39 | + | |
19 | 40 | | |
20 | 41 | | |
21 | 42 | | |
| |||
56 | 77 | | |
57 | 78 | | |
58 | 79 | | |
59 | | - | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | | - | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | | - | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
46 | 75 | | |
47 | 76 | | |
48 | 77 | | |
49 | 78 | | |
50 | 79 | | |
51 | 80 | | |
52 | | - | |
| 81 | + | |
53 | 82 | | |
54 | 83 | | |
55 | 84 | | |
| |||
85 | 114 | | |
86 | 115 | | |
87 | 116 | | |
| 117 | + | |
88 | 118 | | |
89 | 119 | | |
90 | 120 | | |
| |||
97 | 127 | | |
98 | 128 | | |
99 | 129 | | |
100 | | - | |
| 130 | + | |
101 | 131 | | |
102 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
103 | 135 | | |
104 | 136 | | |
105 | 137 | | |
| |||
111 | 143 | | |
112 | 144 | | |
113 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
114 | 163 | | |
115 | 164 | | |
116 | 165 | | |
117 | 166 | | |
118 | | - | |
| 167 | + | |
119 | 168 | | |
120 | 169 | | |
121 | 170 | | |
122 | | - | |
| 171 | + | |
123 | 172 | | |
124 | 173 | | |
125 | 174 | | |
| |||
131 | 180 | | |
132 | 181 | | |
133 | 182 | | |
134 | | - | |
| 183 | + | |
135 | 184 | | |
136 | 185 | | |
137 | 186 | | |
138 | 187 | | |
139 | 188 | | |
140 | | - | |
| 189 | + | |
141 | 190 | | |
142 | 191 | | |
143 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
144 | 198 | | |
145 | 199 | | |
146 | 200 | | |
147 | 201 | | |
148 | 202 | | |
149 | 203 | | |
150 | 204 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
154 | 209 | | |
155 | 210 | | |
156 | 211 | | |
157 | 212 | | |
158 | 213 | | |
159 | 214 | | |
160 | 215 | | |
161 | | - | |
| 216 | + | |
162 | 217 | | |
163 | 218 | | |
164 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
165 | 231 | | |
166 | 232 | | |
167 | 233 | | |
168 | 234 | | |
169 | | - | |
| 235 | + | |
170 | 236 | | |
171 | | - | |
| 237 | + | |
172 | 238 | | |
173 | | - | |
| 239 | + | |
174 | 240 | | |
175 | 241 | | |
176 | 242 | | |
| |||
0 commit comments