Skip to content

Adjust BASE timing constant from 22 to 36 seconds - #13

Open
ddyson1 wants to merge 10 commits into
mainfrom
claude/artwork-sales-website-01JWP9tY4m4hfX8WyoEQZ1kU
Open

Adjust BASE timing constant from 22 to 36 seconds#13
ddyson1 wants to merge 10 commits into
mainfrom
claude/artwork-sales-website-01JWP9tY4m4hfX8WyoEQZ1kU

Conversation

@ddyson1

@ddyson1 ddyson1 commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

Updated the BASE timing constant used for plot animation calculations from 22 seconds to 36 seconds for a full plot at 1x speed.

Changes

  • Updated BASE constant in preview.html from 22 to 36
  • Updated BASE constant in scripts/plotter.js from 22 to 36
  • Updated corresponding comment to reflect the new timing value

Details

The BASE constant controls the duration of a complete plot animation at normal (1x) speed. This change increases the animation duration by approximately 64%, allowing for slower, more deliberate animation playback. Both the inline script in the HTML preview and the separate plotter.js module have been updated to maintain consistency across the codebase.

https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU

claude added 10 commits July 5, 2026 01:23
Increased BASE from 22 to 36 seconds for 1x speed.

New animation durations:
- 0.5× speed: 72 seconds (was 44s) - slow and watchable
- 1× speed: 36 seconds (was 22s)
- 2× speed: 18 seconds (was 11s)
- 4× speed: 9 seconds (was 5.5s)

Makes the 0.5x speed much more enjoyable to watch the plotting process unfold.
Automated content generation and posting system for PlotFlow editions.

Content generation (content_generator.py):
- Reads real edition data from data/editions.js (window.PLOTFLOW)
- AI-powered captions via Claude with template fallback
- 3 caption variations per post, bilingual (EN + 一筆書き)
- Smart hashtag selection by post type (max 20)
- Three post types: showcase (50%), process (30%), behind-scenes (20%)
- Degrades gracefully when anthropic SDK / API key absent

Instagram posting (instagram_api.py):
- Instagram Graph API wrapper (images, videos, carousels)
- Video processing status polling
- Connection testing and account info

Scheduling (scheduler.py):
- Distributes posts across configured times/days
- Queue management: pending, posted, failed
- Natural timing jitter (±15 min)

Orchestration (automate.py):
- CLI: generate / schedule / post / status / full
- Dry-run mode for safe testing
- Cron-friendly for hands-off automation

Config & docs:
- settings.example.json template (real settings.json gitignored)
- .env.example for API keys
- Comprehensive README with setup, usage, cron examples
- requirements.txt

Secrets (settings.json, .env, generated content/media/logs) are gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
… stills

Closes the loop between content generation and posting: the automation now
has real media to publish, hosted on the live site.

media_generator.py — self-contained renderer (no browser, no system ffmpeg):
- Parses M/L path data straight from data/editions.js
- Process video: 1080x1080 H.264, suit drawn line-by-line in red ink on
  Bristol paper with moving pen head + bed label — the site's Live Plot as MP4
- Showcase still: 1080x1350 finished plot with code/edition/name/日本語/price
- Authentic palette from tokens.css (bristol #f6f3ec, red #e8351f)
- 2x supersampled, silent AAC track + faststart for IG compatibility
- Encodes via imageio-ffmpeg's bundled static ffmpeg binary
- build_all() renders every edition + writes manifest.json (edition → URLs)
- MediaLibrary reads the manifest so the poster resolves real hosted URLs

Pipeline integration:
- content_generator now carries edition_key; media types map 1:1 to what we
  render (process→video, everything else→image)
- automate.py resolves media from the manifest (no more placeholder URLs);
  dry-run shows the resolved URL per post; new `media` command builds+publishes
- settings gains a `site` block (url + social_path) for public URL construction

assets/social/ — rendered media for all 6 editions (zaku, guncannon, bigzam,
dom, zgok, gp02), served by GitHub Pages at plotflow.io/assets/social so the
Instagram API can fetch them.

requirements.txt: Pillow + numpy + imageio + imageio-ffmpeg (dropped unused opencv).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
Make the Graph API host configurable so posting works with either Meta setup:
- graph.instagram.com — "Instagram API with Instagram login", no Facebook
  Page required; simplest for publishing to our own @plotflow account
- graph.facebook.com — "Instagram API with Facebook login", needs a Page

Defaults to graph.instagram.com since @plotflow is a professional account.
Set via instagram.graph_host in settings.json.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
The official Meta API requires a working Facebook/Meta developer account. When
that's unavailable (disabled account, no approved app, or posting by hand), the
exporter provides a full no-API path.

exporter.py:
- Reads the scheduled queue and writes exports/<timestamp>/
- Per post: a folder with the media file (from the manifest) + caption.txt
- index.html review board: media preview, scheduled time, one-click Copy caption
- posts.json for machine-readable access
- Falls back to committed assets/social if media/generated is cleared

automate.py: new `export` command wires it into the main CLI.
exports/ is gitignored (generated output with media copies).

Workflow: schedule --days 7 → export → open index.html → post via the IG app.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
…r stats

Per request — posts read as a gallery, not a storefront.

tools/gen_posts.py (the 5 post types):
- Drop: price → "EDITION OF 25 · SIGNED & NUMBERED"
- Lore: price → 一筆書き / ONE CONTINUOUS LINE signature
- Spec: PRICE column → VERTICES (actual point count of the continuous path)
- Spec: fixed tofu (マシンドロー) in the bottom strip — dropped from Latin-font line
- Output now writes to assets/posts/ (was /tmp)

tools/captions.json: rewritten with accurate Universal-Century lore (pilots,
battles, dates — Char/Red Comet, Dozle at Solomon, Gato & the GP02, etc.),
prices stripped.

marketing/media_generator.py: showcase still drops price for the 一筆書き mark.

Regenerated: 26 post cards (assets/posts) + 6 showcase stills (assets/social).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
Both follow-ups:

1) Lore-accurate cards — enriched tools/build_data.py LORE with Universal
   Century canon (Red Comet & 3x speed, Project V, Dozle at Solomon, the Black
   Tri-Stars' Jet Stream Attack, Gato stealing the GP02), regenerated
   data/editions.js and the 6 lore cards. Verified each fits the card's
   7-line cap. This also deepens the on-site product-page lore.

2) Card-library export — marketing/exporter.py now has export_cards(): bundles
   assets/posts/ (process, lore, spec, drop per suit + 2 brand cards), each
   paired with its canon caption from tools/captions.json, into per-card packs
   plus a suit-grouped review board with Copy-caption buttons. `automate.py
   export` now defaults to this; the old still+video scheduler export stays
   available via `exporter.py --queue`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
tools/gen_concepts.py renders new design directions to mockups/ (gitignored,
draft staging) for review before anything graduates into gen_posts.py:

- gradient  — path colored start→end to visually prove one continuous line
              (light + dark variants) + gradient legend
- blueprint — cyan technical schematic on navy, grid + registration marks
- macro     — extreme abstract crop of the linework (gallery-object)
- roster    — contact-sheet poster of all six editions
- statement — bold typographic philosophy card ("NOTHING IS PRINTED.")

Run from repo root: python tools/gen_concepts.py

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
concept_spectrum() renders the gradient as N solid arc-length bands — what a
real multi-pen swap plot physically produces (stepped, not smooth) — with a
pen-order swatch legend.

export_spectrum_layers() writes plot-ready per-pen SVGs (one color band each)
in the suit's coordinate space + a PLOT_PLAN.txt, so an AxiDraw (or vpype/saxi)
can actually plot the edition by swapping pens between layers. Registration is
exact, so the bands align into one flowing path.

Demo: python tools/gen_concepts.py → mockups/spectrum-zaku/ (8 pens).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
… mockups

tools/gen_merch.py (the earlier merch generator, now review-ready):
- Output moved /tmp → mockups/merch/ (gitignored validation staging), with
  ROOT-relative paths so it runs from anywhere
- Poster: PRICE column → VERTICES (consistent with the spec card); bottom
  strip tofu fixed (JP dropped from Latin-font line)
- Lineup tee footer + mug wrap brand: マシンドロー now rendered in the JP font
- New presentation mockups: present_tee / present_tote / present_mug composite
  the print files onto flat garment silhouettes (masked, exact bg color match,
  brand-consistent flat style) so designs can be judged as products
- Generates 47 files: 6 suits × (tee back ×2, poster, sticker, pin) + fronts,
  lineups, totes, mug wrap + 6 garment mockups

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWP9tY4m4hfX8WyoEQZ1kU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants