@softure-ai/marketing-kit 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -17
- package/dist/cli/main.js +93 -33
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/og.d.ts +4 -1
- package/dist/cli/og.d.ts.map +1 -1
- package/dist/cli/og.js +15 -7
- package/dist/cli/og.js.map +1 -1
- package/dist/cli/options.d.ts +29 -2
- package/dist/cli/options.d.ts.map +1 -1
- package/dist/cli/options.js +106 -14
- package/dist/cli/options.js.map +1 -1
- package/dist/cli/voice.d.ts +19 -0
- package/dist/cli/voice.d.ts.map +1 -1
- package/dist/cli/voice.js +37 -5
- package/dist/cli/voice.js.map +1 -1
- package/dist/config/actions-schema.d.ts +14 -14
- package/dist/config/config.d.ts +5 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +2 -1
- package/dist/config/config.js.map +1 -1
- package/dist/config/og-image-names.d.ts +7 -0
- package/dist/config/og-image-names.d.ts.map +1 -0
- package/dist/config/og-image-names.js +9 -0
- package/dist/config/og-image-names.js.map +1 -0
- package/dist/config/schema.d.ts +106 -15
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +74 -7
- package/dist/config/schema.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/og/index.d.ts +3 -3
- package/dist/og/index.d.ts.map +1 -1
- package/dist/og/index.js +3 -2
- package/dist/og/index.js.map +1 -1
- package/dist/og/render.d.ts +13 -0
- package/dist/og/render.d.ts.map +1 -1
- package/dist/og/render.js +31 -6
- package/dist/og/render.js.map +1 -1
- package/dist/og/templates/big-number.d.ts +7 -0
- package/dist/og/templates/big-number.d.ts.map +1 -0
- package/dist/og/templates/big-number.js +41 -0
- package/dist/og/templates/big-number.js.map +1 -0
- package/dist/og/templates/carousel.d.ts +5 -0
- package/dist/og/templates/carousel.d.ts.map +1 -0
- package/dist/og/templates/carousel.js +26 -0
- package/dist/og/templates/carousel.js.map +1 -0
- package/dist/og/templates/context.d.ts +11 -3
- package/dist/og/templates/context.d.ts.map +1 -1
- package/dist/og/templates/context.js +6 -0
- package/dist/og/templates/context.js.map +1 -1
- package/dist/og/templates/frame.d.ts +2 -2
- package/dist/og/templates/frame.d.ts.map +1 -1
- package/dist/og/templates/frame.js +2 -2
- package/dist/og/templates/frame.js.map +1 -1
- package/dist/og/templates/index.d.ts +8 -3
- package/dist/og/templates/index.d.ts.map +1 -1
- package/dist/og/templates/index.js +18 -5
- package/dist/og/templates/index.js.map +1 -1
- package/dist/og/templates/portrait.d.ts +22 -0
- package/dist/og/templates/portrait.d.ts.map +1 -0
- package/dist/og/templates/portrait.js +75 -0
- package/dist/og/templates/portrait.js.map +1 -0
- package/dist/og/templates/schemas.d.ts +28 -0
- package/dist/og/templates/schemas.d.ts.map +1 -1
- package/dist/og/templates/schemas.js +26 -0
- package/dist/og/templates/schemas.js.map +1 -1
- package/dist/posts/posts.d.ts +2 -1
- package/dist/posts/posts.d.ts.map +1 -1
- package/dist/posts/posts.js +1 -1
- package/dist/posts/posts.js.map +1 -1
- package/dist/screenshot/gates.d.ts +6 -3
- package/dist/screenshot/gates.d.ts.map +1 -1
- package/dist/screenshot/gates.js +12 -3
- package/dist/screenshot/gates.js.map +1 -1
- package/dist/screenshot/screenshot.d.ts +17 -0
- package/dist/screenshot/screenshot.d.ts.map +1 -1
- package/dist/screenshot/screenshot.js +37 -6
- package/dist/screenshot/screenshot.js.map +1 -1
- package/dist/screenshot/storage-state.d.ts +9 -0
- package/dist/screenshot/storage-state.d.ts.map +1 -0
- package/dist/screenshot/storage-state.js +25 -0
- package/dist/screenshot/storage-state.js.map +1 -0
- package/dist/voice/batch.d.ts +28 -0
- package/dist/voice/batch.d.ts.map +1 -0
- package/dist/voice/batch.js +46 -0
- package/dist/voice/batch.js.map +1 -0
- package/dist/voice/elevenlabs.d.ts.map +1 -1
- package/dist/voice/elevenlabs.js +11 -1
- package/dist/voice/elevenlabs.js.map +1 -1
- package/dist/voice/pace.d.ts +22 -0
- package/dist/voice/pace.d.ts.map +1 -0
- package/dist/voice/pace.js +39 -0
- package/dist/voice/pace.js.map +1 -0
- package/dist/voice/placeholder.d.ts +35 -0
- package/dist/voice/placeholder.d.ts.map +1 -0
- package/dist/voice/placeholder.js +53 -0
- package/dist/voice/placeholder.js.map +1 -0
- package/dist/voice/produce.d.ts +6 -0
- package/dist/voice/produce.d.ts.map +1 -1
- package/dist/voice/produce.js +13 -2
- package/dist/voice/produce.js.map +1 -1
- package/dist/voice/provider.d.ts +2 -0
- package/dist/voice/provider.d.ts.map +1 -1
- package/dist/voice/provider.js.map +1 -1
- package/package.json +1 -1
- package/schema/marketing.schema.json +359 -37
- package/src/cli/main.ts +88 -31
- package/src/cli/og.ts +14 -6
- package/src/cli/options.ts +118 -13
- package/src/cli/voice.ts +44 -6
- package/src/config/config.ts +7 -2
- package/src/config/og-image-names.ts +7 -0
- package/src/config/schema.ts +82 -8
- package/src/index.ts +10 -2
- package/src/og/index.ts +16 -2
- package/src/og/render.ts +36 -6
- package/src/og/templates/big-number.ts +44 -0
- package/src/og/templates/carousel.ts +27 -0
- package/src/og/templates/context.ts +16 -3
- package/src/og/templates/frame.ts +2 -2
- package/src/og/templates/index.ts +31 -9
- package/src/og/templates/portrait.ts +126 -0
- package/src/og/templates/schemas.ts +35 -0
- package/src/posts/posts.ts +3 -2
- package/src/screenshot/gates.ts +13 -3
- package/src/screenshot/screenshot.ts +51 -11
- package/src/screenshot/storage-state.ts +24 -0
- package/src/voice/batch.ts +65 -0
- package/src/voice/elevenlabs.ts +11 -1
- package/src/voice/pace.ts +55 -0
- package/src/voice/placeholder.ts +83 -0
- package/src/voice/produce.ts +15 -3
- package/src/voice/provider.ts +2 -0
package/README.md
CHANGED
|
@@ -12,17 +12,31 @@ from one `marketing.json` (MK-2), the scene included as declarative actions (MK-
|
|
|
12
12
|
TTS providers (MK-7), screenshots (MK-4) and OG images (MK-5) build on it. Background:
|
|
13
13
|
[docs/03-marketing-kit.md](../../docs/03-marketing-kit.md).
|
|
14
14
|
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
An app runs the kit through `npx` with a pinned version, not as a dependency:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{ "scripts": { "marketing": "npx -y @softure-ai/marketing-kit@0.1.8" } }
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`npm run marketing -- all <video>` then runs the CLI. As a `devDependency` the kit would add more than 100 MB
|
|
24
|
+
(hyperframes, Playwright, sharp, resvg) to every `npm ci` and to the deps stage of the app's Docker image, which
|
|
25
|
+
never runs it. Bump the pin and the `$schema` URL of `marketing.json` together. A project that imports the library
|
|
26
|
+
API (`@softure-ai/marketing-kit`, `@softure-ai/marketing-kit/og`) installs it as usual.
|
|
27
|
+
|
|
15
28
|
## Commands
|
|
16
29
|
|
|
17
30
|
```bash
|
|
18
|
-
softure-marketing all <video>
|
|
19
|
-
softure-marketing voice <video
|
|
20
|
-
softure-marketing record <video> [--today=YYYY-MM-DD] [--url=...]
|
|
21
|
-
softure-marketing render <video> [--quality=draft|standard|high]
|
|
31
|
+
softure-marketing all <video> [--placeholder] # voiceover from the cache -> recording -> render -> post copy
|
|
32
|
+
softure-marketing voice <video>... [--commit] # voiceovers in order; without --commit only the cost estimate
|
|
33
|
+
softure-marketing record <video> [--today=YYYY-MM-DD] [--url=...] [--placeholder]
|
|
34
|
+
softure-marketing render <video> [--quality=draft|standard|high] [--placeholder]
|
|
22
35
|
softure-marketing preview <video> # the composition in the hyperframes preview
|
|
23
36
|
softure-marketing posts <video> # post copy only
|
|
24
37
|
softure-marketing og [image] # OG images (PNG) of every ogImages entry, or of one
|
|
25
38
|
softure-marketing shots [<id>] [--url=...] # the screenshots entries (or one), each behind its gates
|
|
39
|
+
softure-marketing shots --page=<url> --out=<file.png> --expect=<phrase> [...] # one page anywhere, same gates
|
|
26
40
|
```
|
|
27
41
|
|
|
28
42
|
Every command takes `--config=<path>` (default `./marketing.json`). Exit codes: `0` done, `1` failed, `2`
|
|
@@ -33,6 +47,17 @@ the screen guard refused the recording (the screen did not show what the voiceov
|
|
|
33
47
|
`<video>/<key>.mp3` + `<video>/<key>.json` into `voice.cacheDir`. Commit them: the next render of the same text costs
|
|
34
48
|
nothing. `all` never pays; on a cache miss it prints the estimate and stops. See
|
|
35
49
|
[Voiceover providers and cost](#voiceover-providers-and-cost).
|
|
50
|
+
- **`voice` takes several videos** and records them in order: each paid call waits until `voice.minIntervalSeconds`
|
|
51
|
+
have passed since the newest recording in the cache, and the first failure stops the batch (the summary names
|
|
52
|
+
what was recorded, where it stopped and which videos were never sent). Without `--commit` the summary prints
|
|
53
|
+
the batch's characters and estimate, so the cost is known before paying. Use it instead of a shell loop: a
|
|
54
|
+
loop runs on after a failed call, and the provider sees every call it makes.
|
|
55
|
+
- **`--placeholder`** rehearses a film before paying for its voiceover: `all`, `record` and `render` use a free
|
|
56
|
+
stand-in, a quiet tone with the script's words at `voice.placeholder.wordsPerSecond` (default 2.5) and
|
|
57
|
+
`voice.placeholder.sentencePauseSeconds` (default 0.5) between sentences. It is written into
|
|
58
|
+
`<output.buildDir>/<video>/placeholder/`, never into `voice.cacheDir` (where it would count as the paid recording),
|
|
59
|
+
and the film goes to `<video>.placeholder.mp4`. A recording made on it renders only with `--placeholder`, and a
|
|
60
|
+
recording made on the paid voiceover only without it. Match the pace to the voice to see the film's real length.
|
|
36
61
|
- **`--today`** records the app as of another day for one run; it overrides the video's `today`. Once a
|
|
37
62
|
voiceover is paid for, pin its day in the video's `today` instead, so a plain `all` reproduces the film in any
|
|
38
63
|
later month (the voiceover says numbers that depend on the day).
|
|
@@ -55,11 +80,19 @@ once per scheme, in its own browser, into `<id>-light.png` and `<id>-dark.png`;
|
|
|
55
80
|
in `app.colorScheme`. `shots <id>` takes the entry's id and writes all of its files. Since an entry may
|
|
56
81
|
write any of those three names, an id that is another entry's `<id>-light` or `<id>-dark` is refused.
|
|
57
82
|
`full: true` first scrolls the page one screen at a time to the bottom, so lazy images and sections
|
|
58
|
-
load, then captures the whole page.
|
|
83
|
+
load, then captures the whole page. `scrollTo: <px>` instead captures one viewport frame scrolled that far, e.g. to
|
|
84
|
+
check scroll-driven motion (set `motion: "no-preference"` for it, or the page shows its end state). `waitMs` waits
|
|
85
|
+
that long after loading and scrolling, before the gates read the page, for an animation to settle (default 0).
|
|
86
|
+
`storageState` captures a signed-in screen: a Playwright storage state (cookies and localStorage), relative to the
|
|
87
|
+
folder of `marketing.json`, written by the app's own login script (`await context.storageState({ path })`) or by
|
|
88
|
+
`npx playwright codegen --save-storage=<file> <url>`. It holds a live session, so keep it out of git and regenerate
|
|
89
|
+
it when the session expires; a missing or broken file stops `shots` before the browser starts. A screenshot is kept
|
|
90
|
+
only when it passes every gate:
|
|
59
91
|
|
|
60
92
|
| Gate | Refused when |
|
|
61
93
|
| --- | --- |
|
|
62
94
|
| `status` | the page answers with HTTP 400 or above, or not at all (`load`: it did not load within 30 s) |
|
|
95
|
+
| `scroll` | the page cannot scroll as far as `scrollTo` (the frame would show another place) |
|
|
63
96
|
| `phrase` | the page does not show `expect` within 5 s of loading (hidden elements do not count) |
|
|
64
97
|
| `size` | the file is smaller than `minBytes` (40 kB by default: a blank or broken page); the file is deleted |
|
|
65
98
|
|
|
@@ -73,6 +106,22 @@ exit code `1`. `--url` points at another address of the app; without it, `shots`
|
|
|
73
106
|
starts `app.startCommand` as `record` does. A plain page can be smaller than 40 kB: set `minBytes` for it
|
|
74
107
|
(the fixture's calculator, a dark page with one form, is about 16 kB and sets 5000).
|
|
75
108
|
|
|
109
|
+
#### One page anywhere: `shots --page`
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
softure-marketing shots --page=https://example.com/pricing --out=shots/pricing.png --expect="Pricing" \
|
|
113
|
+
[--width=1440 --height=900 --scale=1 --full --scroll=<px> --wait=<ms> --motion=reduce|no-preference \
|
|
114
|
+
--scheme=light|dark --auth=<storage-state.json> --minbytes=40000]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
A competitor's page, production, or any page that is not a `screenshots` entry: the same browser settings
|
|
118
|
+
(`brand.locale`, `brand.timezone`, `app.hideSelectors`, `app.colorScheme` unless `--scheme`) and the same gates, one
|
|
119
|
+
file at `--out` (relative to the current directory; an older file there is removed first). The flags are the entry's
|
|
120
|
+
fields: `--scroll` is `scrollTo`, `--wait` is `waitMs`, `--auth` is `storageState` (relative to the current
|
|
121
|
+
directory), `--minbytes` is `minBytes`; the viewport defaults to 1440×900. `--expect` is required, so an error page
|
|
122
|
+
is never kept. The app is not started and `--url` does not apply. Every flag needs `=<value>` except `--full`, and
|
|
123
|
+
an unknown flag stops the run: a typo must never switch a gate off.
|
|
124
|
+
|
|
76
125
|
## `marketing.json`
|
|
77
126
|
|
|
78
127
|
The contract is one zod schema (`src/config/schema.ts`), published as
|
|
@@ -145,7 +194,7 @@ folder of `marketing.json`. A complete example: [examples/fixture/marketing.json
|
|
|
145
194
|
| `app` | `baseUrl`, `port`, `startCommand` | the running app, or the one the CLI starts (`startCommand` as arguments, no shell, `{port}` replaced) |
|
|
146
195
|
| | `colorScheme` (`light`), `hideSelectors` (`[]`), `screenGuardSelector` (`body`) | what the recording browser prefers; elements hidden while recording; the element whose text the screen guard reads |
|
|
147
196
|
| | `device` | the recording device: `kind` (`phone`, or `desktop` for a browser window in a 16:9 film), `viewport` `[width, height]` in CSS px (a desktop's at least 1024 wide, not taller than wide), `scale` (device pixels per CSS pixel), `mobile` (a phone's, default `true`; not allowed on a desktop); a video can override it |
|
|
148
|
-
| `voice` | `provider` (`elevenlabs`), `voiceId`, `model` (`eleven_multilingual_v2`), `language`, `tempo` (`1`, 0.8-1.3), `cacheDir` (`marketing/voiceover`) | the voiceover; text, voice, model and language make the cache key, the tempo is applied at build time |
|
|
197
|
+
| `voice` | `provider` (`elevenlabs`), `voiceId`, `model` (`eleven_multilingual_v2`), `language`, `tempo` (`1`, 0.8-1.3), `cacheDir` (`marketing/voiceover`), `minIntervalSeconds` (`60`, 0-3600, `0` off) | the voiceover; text, voice, model and language make the cache key, the tempo is applied at build time; paid calls are spaced by `minIntervalSeconds`, counted from the newest recording in the cache, so separate runs are spaced too |
|
|
149
198
|
| `videos[]` | `id`, `title`, `path`, `format` (`9:16`, or `1:1`, `16:9`), `device`, `voice` (`voiceId`, `model`, `tempo`) | a film and its overrides |
|
|
150
199
|
| | `persona`, `beats`, `hook`, `screenGuard`, `endCard` | the script, see [A film](#a-film) |
|
|
151
200
|
| | `hook.transition` (`fade`, or `rewind`, `cut`) | how the opening frame hands over to the scene |
|
|
@@ -154,9 +203,10 @@ folder of `marketing.json`. A complete example: [examples/fixture/marketing.json
|
|
|
154
203
|
| | `sceneModule` | instead of actions: the TS module exporting `scene` |
|
|
155
204
|
| `social` | `linkTemplate` | the link every post carries, `{code}` replaced by the platform's channel code |
|
|
156
205
|
| | `platforms` | `instagram`, `facebook`, `tiktok`, `youtube`, `linkedin`, `x`: `code`, `linkInBio` (true for Instagram, TikTok, YouTube) |
|
|
157
|
-
| | `posts[]` | `video`, `caption`, `hashtags`, `codes` (this video's own codes); a video without one gets no `posts.md` |
|
|
206
|
+
| | `posts[]` | `video`, `caption`, `hashtags`, `codes` (this video's own codes), `disclosure` (`true`; `false` leaves the disclosure out); a video without one gets no `posts.md` |
|
|
207
|
+
| | `disclosure` | a paragraph after every post's caption, before the link: that the persona is an example, that it is not advice, that the voice is AI-generated; `{persona}` becomes the video's persona name |
|
|
158
208
|
| `screenshots[]` | `id`, `path`, `width`, `height`, `full` (`false`), `expect`, `motion` (`reduce`), `minBytes` (`40000`), `scale` (`1`), `colorSchemes` | for `softure-marketing shots`, see [Screenshots](#screenshots) |
|
|
159
|
-
| `ogImages[]` | `id`, `template` (`headline-cta`, `headline-chart`), `size` (`[
|
|
209
|
+
| `ogImages[]` | `id`, `template` (`headline-cta`, `headline-chart`, `big-number`, `carousel`), `size` (`"landscape"`, `"portrait"`, `"square"`, `"story"` or `[width, height]`; `landscape` for the headline cards, `portrait` for the others), `data` | for `softure-marketing og`, see [OG images](#og-images) |
|
|
160
210
|
| `layout` | per layout (`9:16`, `1:1`, `16:9` for phone films; `desktop` for desktop films): `caption` (`top`, `left`, `right`, `fontSize`), `persona` (`top`, `left`, `right`), `endCard` (`top`, `left`, `right`, `headlineSize`, `phone.scale`, `phone.center`) | overrides of the layout's geometry table for every film of that layout, in frame px (`endCard.phone` is the browser window's pose in `desktop`); a missing key keeps the table's value. Values must fit the frame and each box's margins must leave at least 200 px for its text. The frame, the screen box and the camera target are fixed |
|
|
161
211
|
| `sfx` | `tap`, `key`, `whoosh`, `sparkle`, `pop` | sound effects; a missing one is silent |
|
|
162
212
|
| `output` | `dir` (`marketing/out`), `buildDir` (`marketing/build`), `quality` (`standard`) | where films go; `--quality` wins |
|
|
@@ -184,6 +234,9 @@ default. Values must be hex literals (`#rgb`, `#rrggbb`, `#rrggbbaa`).
|
|
|
184
234
|
|
|
185
235
|
### From FIRE_TRACKER's constants
|
|
186
236
|
|
|
237
|
+
What MK-1 hard-coded and the key that holds it now. The table names the kind of value, not the value: a project's
|
|
238
|
+
look changes in its own `marketing.json`, without a change to the kit.
|
|
239
|
+
|
|
187
240
|
| What MK-1 still had in code | Where it is now |
|
|
188
241
|
| --- | --- |
|
|
189
242
|
| `marketing.config.json` (`locale`, `brand.name`, `app`, `siteCss`, `posts.site`, `paths`) | `marketing.json`: `brand`, `app`, `brand.tokensFrom.css`, `social.linkTemplate`, `voice.cacheDir`, `output`, `sfx`, `brand.fonts` |
|
|
@@ -193,8 +246,8 @@ default. Values must be hex literals (`#rgb`, `#rrggbb`, `#rrggbbaa`).
|
|
|
193
246
|
| hidden `nextjs-portal` and the mailing-list pill | `app.hideSelectors` |
|
|
194
247
|
| the screen guard reading `main` | `app.screenGuardSelector` |
|
|
195
248
|
| Geist and Newsreader files | `brand.fonts` |
|
|
196
|
-
| the
|
|
197
|
-
|
|
|
249
|
+
| the logo, the caption highlight colour and the light caption pill | `brand.logo`, `brand.colors.captionHighlight`, `captionBackground` |
|
|
250
|
+
| the token used for the link pill and the avatar | `brand.colors.cta` (or `tokensFrom.roles.cta: "<token>"`) |
|
|
198
251
|
| FIRE's narrator voice, Polish | `voice.voiceId`, `voice.language: "pl"` (the cache keys of FIRE's paid recordings stay the same) |
|
|
199
252
|
| `?z=` and three fixed platforms | `social.linkTemplate`, `social.platforms` |
|
|
200
253
|
| five fixed sound file names | `sfx` |
|
|
@@ -287,12 +340,14 @@ changing it costs nothing.
|
|
|
287
340
|
| --- | --- |
|
|
288
341
|
| the cache has `<video>/<key>.mp3` and `.json` (or, from 0.1.5 and earlier, `<key>.mp3` and `.json` in the cache root) | `voiceover: from the cache <key>, nothing spent.` |
|
|
289
342
|
| no cache, no `--commit` | `voiceover estimate (elevenlabs): 412 characters, at most 412 ElevenLabs credits.` and a dry-run line; no request is sent |
|
|
290
|
-
| no cache, `--commit` | the same estimate line **first**, then one paid request, then the files are written |
|
|
343
|
+
| no cache, `--commit` | the same estimate line **first**, a wait when the last paid recording is under `voice.minIntervalSeconds` old, then one paid request, the charge the provider reported (`voiceover: elevenlabs charged 175 ElevenLabs credits for 412 characters (the estimate was at most 412).`), then the files are written |
|
|
291
344
|
|
|
292
345
|
ElevenLabs bills per input character, at most one credit each; API plans may discount it, so the
|
|
293
|
-
estimate is an upper bound
|
|
346
|
+
estimate is an upper bound (FIRE_TRACKER paid about 0.42 credits per character). The real charge comes from the
|
|
347
|
+
`character-cost` response header; a provider that does not report one gets a line saying so. Providers available to `voice.provider`: `elevenlabs`. For tests, the
|
|
294
348
|
package exports `createFakeTtsProvider()` (deterministic audio, evenly spaced words, records its calls)
|
|
295
|
-
and `produceVoiceover({ cacheDir, input, provider, isCommit, log })
|
|
349
|
+
and `produceVoiceover({ cacheDir, input, provider, isCommit, pace, log })` (`produceVoiceovers` for a batch,
|
|
350
|
+
`waitForPace` for a project's own loop), so a project can test its films
|
|
296
351
|
without the network. A second real provider must add its id to the cache key, so that its recordings
|
|
297
352
|
never collide with ElevenLabs's under the same voice and model names.
|
|
298
353
|
|
|
@@ -320,10 +375,27 @@ format, so its paid recordings are reused as they are, with no re-keying and no
|
|
|
320
375
|
`from the cache`; an estimate line means the text, voice or model differs from FIRE's, and nothing
|
|
321
376
|
was spent.
|
|
322
377
|
|
|
378
|
+
### Upgrading to 0.1.8
|
|
379
|
+
|
|
380
|
+
- Portrait social posts get their own templates: move a `headline-cta` entry with `size: [1080, 1350]` to
|
|
381
|
+
`big-number` (one figure as the hero) or to a `carousel` slide. `headline-cta` and `headline-chart` render as
|
|
382
|
+
before.
|
|
383
|
+
- A 0.1.7 `marketing.json`, its screenshots and the voiceover cache work as they are. New: `scrollTo`, `waitMs` and
|
|
384
|
+
`storageState` on `screenshots[]` entries, `shots --page` for any page, `--placeholder` on `all`/`record`/`render`
|
|
385
|
+
with `voice.placeholder`. An app that kept its own screenshot script for these can drop it.
|
|
386
|
+
|
|
387
|
+
### Upgrading to 0.1.7
|
|
388
|
+
|
|
389
|
+
- A batch of voiceovers is one command: `voice a b c --commit` instead of a shell loop. Paid calls are spaced by
|
|
390
|
+
`voice.minIntervalSeconds` (default 60 s); set it to `0` to keep 0.1.6's back-to-back calls.
|
|
391
|
+
- A disclosure pasted into every caption moves to `social.disclosure` with `{persona}` for the name; delete it from
|
|
392
|
+
the captions, or the posts carry it twice.
|
|
393
|
+
|
|
323
394
|
## OG images
|
|
324
395
|
|
|
325
396
|
`softure-marketing og` renders each `ogImages` entry with [Satori](https://github.com/vercel/satori)
|
|
326
|
-
and resvg to `<output.dir>/og/<id>.png`, at `size` (1200×630
|
|
397
|
+
and resvg to `<output.dir>/og/<id>.png`, at `size` (1200×630 for the headline cards and 1080×1350 for the
|
|
398
|
+
portrait posts by default), outside Next. The brand
|
|
327
399
|
supplies everything around the copy: the background and text colours, the logo and name in the top
|
|
328
400
|
corner, and the fonts. `data` is the template's input, checked by its own schema (each template's
|
|
329
401
|
fields are in the JSON Schema):
|
|
@@ -332,6 +404,15 @@ fields are in the JSON Schema):
|
|
|
332
404
|
| --- | --- |
|
|
333
405
|
| `headline-cta` | `headline` (≤ 90 characters), `eyebrow` (≤ 40), `cta` (≤ 32, a pill in `cta`/`onCta` colours), `tiles` (≤ 4 of `label` ≤ 24, `value` ≤ 16) |
|
|
334
406
|
| `headline-chart` | `headline`, `eyebrow`, `tiles` (≤ 3), `chart`: `viewBox` `[width, height]` and `paths` (1-8) of `d` (SVG path data), `tone` (`accent`, `cta`, `foreground`, `muted`), `fill` (a tint instead of a line), `strokeWidth` (view box units) |
|
|
407
|
+
| `big-number` | `number` (≤ 12 characters, unit included, e.g. `898 PLN`; shorter numbers get bigger type), `caption` (≤ 90, the sentence under it), `eyebrow` (≤ 40), `tiles` (≤ 2), `cta` (≤ 32), `source` (≤ 80, small at the bottom) |
|
|
408
|
+
| `carousel` | `slides` (2-10) of `headline` (≤ 90), `eyebrow` (≤ 40), `body` (≤ 200), `tiles` (≤ 2), `cta` (≤ 32), `source` (≤ 80); `counter` (`true`: `n/N` in the top corner) |
|
|
409
|
+
|
|
410
|
+
**Social posts.** `big-number` and `carousel` are written for a 1080×1350 portrait post (their default `size`) and
|
|
411
|
+
scale by the limiting side, so `"square"` and `"story"` hold the same copy. The logo and name sit on top, the copy
|
|
412
|
+
fills the middle, the call to action and the source line are pinned to the bottom. A carousel entry writes one file
|
|
413
|
+
per slide, `<output.dir>/og/<id>-1.png`…`<id>-<n>.png`, with a shared look; an `ogImages` id that a slide's file
|
|
414
|
+
would also take is refused. The limits are what the post holds: copy at every limit stays inside the frame's margin
|
|
415
|
+
(a test renders it and checks the pixels), and a word too long for the line is broken rather than run past the edge.
|
|
335
416
|
|
|
336
417
|
Values the app computes, such as a chart or a projected date, are computed by the app and arrive in
|
|
337
418
|
`data` as numbers, text or SVG paths; the package only draws them.
|
|
@@ -380,14 +461,16 @@ export default async function Image(): Promise<Response> {
|
|
|
380
461
|
|
|
381
462
|
`@resvg/resvg-js` is a native module: if the bundler tries to bundle it, list it in
|
|
382
463
|
`serverExternalPackages` in `next.config.ts`. `renderOgImage({ template, data, size, brand, fonts })`
|
|
383
|
-
renders without a `marketing.json` at all.
|
|
464
|
+
renders without a `marketing.json` at all. For a carousel, pass `slide` (1-based) to either function;
|
|
465
|
+
`countOgSlides(template, data)` says how many there are.
|
|
384
466
|
|
|
385
467
|
## Requirements
|
|
386
468
|
|
|
387
469
|
- Node 22, **ffmpeg** in PATH.
|
|
388
470
|
- A Chromium for the recording and the screenshots: Playwright's own, or `PLAYWRIGHT_CHROMIUM_PATH=<path>`.
|
|
389
|
-
- A Chrome for hyperframes: downloaded on the first render (into `~/.cache/
|
|
390
|
-
`
|
|
471
|
+
- A Chrome for hyperframes: downloaded on the first render (into `~/.cache/hyperframes/chrome`; an older
|
|
472
|
+
`~/.cache/puppeteer/chrome-headless-shell` is still used when it is there), or `HYPERFRAMES_BROWSER_PATH=<path>`
|
|
473
|
+
(a Chromium headless shell works).
|
|
391
474
|
- The CLI runs hyperframes with `HYPERFRAMES_NO_TELEMETRY=1` unless you set it yourself.
|
|
392
475
|
|
|
393
476
|
## Licences
|
package/dist/cli/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { join } from "node:path";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
4
|
import { findMissingFiles, formatConfigIssues, loadMarketingConfig } from "../config/config.js";
|
|
5
5
|
import { getGeometry, getLayoutName } from "../compose/timeline.js";
|
|
6
6
|
import { sceneBeats } from "../film.js";
|
|
@@ -10,25 +10,28 @@ import { recordFilm, ScreenGuardError } from "../record/record.js";
|
|
|
10
10
|
import { findMachineProblem } from "../render/preflight.js";
|
|
11
11
|
import { runHyperframes } from "../render/hyperframes.js";
|
|
12
12
|
import { renderFilm } from "../render/render.js";
|
|
13
|
-
import { takeScreenshots } from "../screenshot/screenshot.js";
|
|
13
|
+
import { takePageScreenshot, takeScreenshots } from "../screenshot/screenshot.js";
|
|
14
|
+
import { findStorageStateProblem } from "../screenshot/storage-state.js";
|
|
15
|
+
import { isPlaceholderKey } from "../voice/placeholder.js";
|
|
14
16
|
import { splitIntoBeats } from "../voice/voiceover.js";
|
|
15
17
|
import { CliFailure, fail } from "./failure.js";
|
|
16
18
|
import { loadFilm } from "./films.js";
|
|
17
19
|
import { writeOgImages } from "./og.js";
|
|
18
20
|
import { getRecordingDay, readOptions } from "./options.js";
|
|
19
21
|
import { ensureServer } from "./server.js";
|
|
20
|
-
import {
|
|
22
|
+
import { getFilmVoiceover, produceVoiceover, produceVoiceovers, readJson } from "./voice.js";
|
|
21
23
|
/**
|
|
22
24
|
* `softure-marketing`: the only way into the films.
|
|
23
25
|
*
|
|
24
|
-
* all <film>
|
|
25
|
-
* voice <film
|
|
26
|
+
* all <film> [--placeholder] voiceover from the cache (or the free placeholder) -> recording -> render -> post copy
|
|
27
|
+
* voice <film>... [--commit] voiceovers in order (paid only with --commit), spaced and stopped at the first error
|
|
26
28
|
* record <film> [--today=YYYY-MM-DD] [--url=...] (--today overrides the video's today)
|
|
27
29
|
* render <film> [--quality=draft|standard|high]
|
|
28
30
|
* preview <film>
|
|
29
31
|
* posts <film>
|
|
30
32
|
* og [image]
|
|
31
33
|
* shots [<id>] [--url=...]
|
|
34
|
+
* shots --page=<url> --out=<file.png> --expect=<phrase> [...]
|
|
32
35
|
*/
|
|
33
36
|
const getBuildDir = (config, film) => join(config.output.buildDir, film.id);
|
|
34
37
|
const getOutDir = (config, film) => join(config.output.dir, film.id);
|
|
@@ -41,7 +44,9 @@ function preflight(config, film, needsRender) {
|
|
|
41
44
|
fail(formatConfigIssues(config, missing));
|
|
42
45
|
}
|
|
43
46
|
async function record(config, film, options) {
|
|
44
|
-
const voiceover =
|
|
47
|
+
const { voiceover, key, isPlaceholder } = getFilmVoiceover(config, film, { isPlaceholder: options.isPlaceholder, buildDir: getBuildDir(config, film) });
|
|
48
|
+
if (isPlaceholder)
|
|
49
|
+
console.log(`voiceover: the placeholder (a tone, ${config.voice.placeholder.wordsPerSecond} words a second); nothing paid, render it with --placeholder.`);
|
|
45
50
|
const voices = splitIntoBeats(voiceover.words, film.beats, film.voice.tempo);
|
|
46
51
|
const server = await ensureServer(config, film, options.url);
|
|
47
52
|
mkdirSync(getBuildDir(config, film), { recursive: true });
|
|
@@ -54,7 +59,7 @@ async function record(config, film, options) {
|
|
|
54
59
|
url: server.url,
|
|
55
60
|
outDir: getBuildDir(config, film),
|
|
56
61
|
voices,
|
|
57
|
-
voiceoverKey:
|
|
62
|
+
voiceoverKey: key,
|
|
58
63
|
today: recordingDay.day ?? undefined,
|
|
59
64
|
filmPath: film.scenePath,
|
|
60
65
|
executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH || undefined,
|
|
@@ -100,14 +105,22 @@ function render(config, film, options) {
|
|
|
100
105
|
fail(`no recording: run softure-marketing record ${film.id} first.`);
|
|
101
106
|
// Our own file, written by `recordFilm`; the two fields that tie it to the script are checked below.
|
|
102
107
|
const log = readJson(logPath);
|
|
103
|
-
|
|
108
|
+
// A recording follows the timings of the voiceover it was made on, so a placeholder recording never renders
|
|
109
|
+
// with the paid voiceover, nor the reverse.
|
|
110
|
+
if (isPlaceholderKey(log.voiceoverKey) !== options.isPlaceholder) {
|
|
111
|
+
if (options.isPlaceholder)
|
|
112
|
+
fail(`the recording was made on the paid voiceover: run softure-marketing record ${film.id} --placeholder, or render without --placeholder.`);
|
|
113
|
+
fail(`the recording was made on the placeholder voiceover: run softure-marketing record ${film.id} for the paid one, or render with --placeholder.`);
|
|
114
|
+
}
|
|
115
|
+
const { voiceover, key } = getFilmVoiceover(config, film, { isPlaceholder: options.isPlaceholder, buildDir: dir });
|
|
104
116
|
// The recording must match the script; otherwise the action times belong to another voiceover or
|
|
105
117
|
// other sentences, and the film would come out silently out of sync.
|
|
106
118
|
const beatIds = sceneBeats(film).map((beat) => beat.id);
|
|
107
|
-
if (log.voiceoverKey !==
|
|
108
|
-
fail(`the recording does not match the current script (the sentences or the voiceover changed): run softure-marketing record ${film.id}.`);
|
|
119
|
+
if (log.voiceoverKey !== key || log.beatIds?.join(",") !== beatIds.join(",")) {
|
|
120
|
+
fail(`the recording does not match the current script (the sentences or the voiceover changed): run softure-marketing record ${film.id}${options.isPlaceholder ? " --placeholder" : ""}.`);
|
|
109
121
|
}
|
|
110
|
-
|
|
122
|
+
// A rehearsal never takes the place of the real film.
|
|
123
|
+
const output = join(getOutDir(config, film), options.isPlaceholder ? `${film.id}.placeholder.mp4` : `${film.id}.mp4`);
|
|
111
124
|
const seconds = renderFilm({
|
|
112
125
|
film,
|
|
113
126
|
log,
|
|
@@ -144,8 +157,59 @@ function selectScreenshots(config, shotId) {
|
|
|
144
157
|
fail(`no screenshots in ${config.file}: add entries to "screenshots".`);
|
|
145
158
|
fail(`no screenshot "${shotId}" in ${config.file}; known: ${config.screenshots.map((entry) => entry.id).join(", ") || "none"}.`);
|
|
146
159
|
}
|
|
160
|
+
/** The entries with their storage state as an absolute path, each checked before the browser starts. */
|
|
161
|
+
function resolveStorageStates(config, entries) {
|
|
162
|
+
const [first, ...rest] = entries.map((entry) => {
|
|
163
|
+
if (entry.storageState === undefined)
|
|
164
|
+
return entry;
|
|
165
|
+
const path = resolve(config.root, entry.storageState);
|
|
166
|
+
const problem = findStorageStateProblem(path);
|
|
167
|
+
if (problem !== null)
|
|
168
|
+
fail(`screenshot "${entry.id}": ${problem}.`);
|
|
169
|
+
return { ...entry, storageState: path };
|
|
170
|
+
});
|
|
171
|
+
// The map keeps the length of a non-empty tuple.
|
|
172
|
+
return [first, ...rest];
|
|
173
|
+
}
|
|
174
|
+
function getScreenshotBrowser(config) {
|
|
175
|
+
return { colorScheme: config.app.colorScheme, locale: config.brand.locale, timezone: config.brand.timezone, hideSelectors: config.app.hideSelectors };
|
|
176
|
+
}
|
|
177
|
+
/** Prints each result and fails when any shot was refused. */
|
|
178
|
+
function reportScreenshots(results) {
|
|
179
|
+
for (const result of results) {
|
|
180
|
+
if (result.ok)
|
|
181
|
+
console.log(`✓ ${result.file} (${(result.bytes / 1000).toFixed(0)} kB)`);
|
|
182
|
+
else
|
|
183
|
+
console.error(`✗ ${result.name}: ${result.message}`);
|
|
184
|
+
}
|
|
185
|
+
const failed = results.filter((result) => !result.ok).length;
|
|
186
|
+
if (failed > 0)
|
|
187
|
+
fail(`${failed} of ${results.length} screenshots failed their gates; see above.`);
|
|
188
|
+
}
|
|
189
|
+
/** `shots --page`: one page anywhere; the app is not started, and the storage state resolves from the current directory. */
|
|
190
|
+
async function pageShot(config, options) {
|
|
191
|
+
let { entry } = options;
|
|
192
|
+
if (entry.storageState !== undefined) {
|
|
193
|
+
const path = resolve(entry.storageState);
|
|
194
|
+
const problem = findStorageStateProblem(path);
|
|
195
|
+
if (problem !== null)
|
|
196
|
+
fail(`--auth: ${problem}.`);
|
|
197
|
+
entry = { ...entry, storageState: path };
|
|
198
|
+
}
|
|
199
|
+
const file = resolve(options.out);
|
|
200
|
+
console.log(`screenshot: ${options.page}.`);
|
|
201
|
+
const result = await takePageScreenshot({
|
|
202
|
+
entry,
|
|
203
|
+
url: options.page,
|
|
204
|
+
file,
|
|
205
|
+
scheme: options.scheme,
|
|
206
|
+
browser: getScreenshotBrowser(config),
|
|
207
|
+
executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH || undefined,
|
|
208
|
+
});
|
|
209
|
+
reportScreenshots([result]);
|
|
210
|
+
}
|
|
147
211
|
async function shots(config, options) {
|
|
148
|
-
const entries = selectScreenshots(config, options.shotId);
|
|
212
|
+
const entries = resolveStorageStates(config, selectScreenshots(config, options.shotId));
|
|
149
213
|
const [first] = entries;
|
|
150
214
|
const target = { url: new URL(first.path, config.app.baseUrl).href, ownUrl: `http://localhost:${config.app.port}${first.path}` };
|
|
151
215
|
const server = await ensureServer(config, target, options.url === undefined ? undefined : new URL(first.path, options.url).href);
|
|
@@ -158,26 +222,13 @@ async function shots(config, options) {
|
|
|
158
222
|
baseUrl: server.url,
|
|
159
223
|
outDir,
|
|
160
224
|
executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH || undefined,
|
|
161
|
-
browser:
|
|
162
|
-
colorScheme: config.app.colorScheme,
|
|
163
|
-
locale: config.brand.locale,
|
|
164
|
-
timezone: config.brand.timezone,
|
|
165
|
-
hideSelectors: config.app.hideSelectors,
|
|
166
|
-
},
|
|
225
|
+
browser: getScreenshotBrowser(config),
|
|
167
226
|
});
|
|
168
227
|
}
|
|
169
228
|
finally {
|
|
170
229
|
server.stop();
|
|
171
230
|
}
|
|
172
|
-
|
|
173
|
-
if (result.ok)
|
|
174
|
-
console.log(`✓ ${result.file} (${(result.bytes / 1000).toFixed(0)} kB)`);
|
|
175
|
-
else
|
|
176
|
-
console.error(`✗ ${result.name}: ${result.message}`);
|
|
177
|
-
}
|
|
178
|
-
const failed = results.filter((result) => !result.ok).length;
|
|
179
|
-
if (failed > 0)
|
|
180
|
-
fail(`${failed} of ${results.length} screenshots failed their gates; see above.`);
|
|
231
|
+
reportScreenshots(results);
|
|
181
232
|
}
|
|
182
233
|
async function main(argv) {
|
|
183
234
|
const parsed = readOptions(argv);
|
|
@@ -193,14 +244,22 @@ async function main(argv) {
|
|
|
193
244
|
return;
|
|
194
245
|
}
|
|
195
246
|
if (options.command === "shots") {
|
|
196
|
-
|
|
247
|
+
if (options.mode === "page")
|
|
248
|
+
await pageShot(config, options);
|
|
249
|
+
else
|
|
250
|
+
await shots(config, options);
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (options.command === "voice") {
|
|
254
|
+
// Every film is loaded before the first paid call, so a typo in the fifth id costs nothing.
|
|
255
|
+
const films = [];
|
|
256
|
+
for (const id of options.filmIds)
|
|
257
|
+
films.push(await loadFilm(config, id));
|
|
258
|
+
await produceVoiceovers(config, films, options.isCommit);
|
|
197
259
|
return;
|
|
198
260
|
}
|
|
199
261
|
const film = await loadFilm(config, options.filmId);
|
|
200
262
|
switch (options.command) {
|
|
201
|
-
case "voice":
|
|
202
|
-
await produceVoiceover(config, film, options.isCommit);
|
|
203
|
-
return;
|
|
204
263
|
case "record":
|
|
205
264
|
preflight(config, film, false);
|
|
206
265
|
await record(config, film, options);
|
|
@@ -222,8 +281,9 @@ async function main(argv) {
|
|
|
222
281
|
}
|
|
223
282
|
case "all": {
|
|
224
283
|
preflight(config, film, true);
|
|
225
|
-
if ((await produceVoiceover(config, film, false)) === null)
|
|
226
|
-
fail(
|
|
284
|
+
if (!options.isPlaceholder && (await produceVoiceover(config, film, false)) === null) {
|
|
285
|
+
fail(`no voiceover; see the message above. To rehearse the film for free: softure-marketing all ${film.id} --placeholder.`);
|
|
286
|
+
}
|
|
227
287
|
await record(config, film, options);
|
|
228
288
|
render(config, film, options);
|
|
229
289
|
return;
|
package/dist/cli/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,mBAAmB,EAAwB,MAAM,qBAAqB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAqB,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM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@@
|
|
|
1
1
|
import type { MarketingConfig } from "../config/config.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* `og [image]`: writes `<output.dir>/og/<id>.png` for every `ogImages` entry, or for the one named; a carousel
|
|
4
|
+
* writes one file per slide, `<id>-1.png`…`<id>-<n>.png`.
|
|
5
|
+
*/
|
|
3
6
|
export declare function writeOgImages(config: MarketingConfig, imageId: string | null): Promise<void>;
|
|
4
7
|
//# sourceMappingURL=og.d.ts.map
|
package/dist/cli/og.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"og.d.ts","sourceRoot":"","sources":["../../src/cli/og.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"og.d.ts","sourceRoot":"","sources":["../../src/cli/og.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBlG"}
|
package/dist/cli/og.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { getOgImageNames } from "../config/og-image-names.js";
|
|
3
4
|
import { renderConfiguredOgImage } from "../og/render.js";
|
|
4
5
|
import { fail } from "./failure.js";
|
|
5
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* `og [image]`: writes `<output.dir>/og/<id>.png` for every `ogImages` entry, or for the one named; a carousel
|
|
8
|
+
* writes one file per slide, `<id>-1.png`…`<id>-<n>.png`.
|
|
9
|
+
*/
|
|
6
10
|
export async function writeOgImages(config, imageId) {
|
|
7
11
|
const entries = imageId === null ? config.ogImages : config.ogImages.filter((image) => image.id === imageId);
|
|
8
12
|
if (config.ogImages.length === 0)
|
|
@@ -13,12 +17,16 @@ export async function writeOgImages(config, imageId) {
|
|
|
13
17
|
const dir = join(config.output.dir, "og");
|
|
14
18
|
mkdirSync(dir, { recursive: true });
|
|
15
19
|
for (const entry of entries) {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const names = getOgImageNames(entry);
|
|
21
|
+
for (const [index, name] of names.entries()) {
|
|
22
|
+
const png = await renderConfiguredOgImage({ config, id: entry.id, slide: index + 1 });
|
|
23
|
+
if (!png.ok)
|
|
24
|
+
fail(png.error);
|
|
25
|
+
const path = join(dir, `${name}.png`);
|
|
26
|
+
writeFileSync(path, png.value);
|
|
27
|
+
const slide = names.length > 1 ? `, slide ${String(index + 1)}/${String(names.length)}` : "";
|
|
28
|
+
console.log(`✓ ${path} (${String(entry.size[0])}×${String(entry.size[1])}, ${entry.template}${slide})`);
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
}
|
|
24
32
|
//# sourceMappingURL=og.js.map
|
package/dist/cli/og.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"og.js","sourceRoot":"","sources":["../../src/cli/og.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"og.js","sourceRoot":"","sources":["../../src/cli/og.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,eAA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AAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;YACtF,IAAI,CAAC,GAAG,CAAC,EAAE;gBAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC;YACtC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7F,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QAC1G,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/cli/options.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ColorTheme } from "../config/colors.js";
|
|
2
|
+
import { type MarketingJson, type Quality } from "../config/schema.js";
|
|
2
3
|
/**
|
|
3
4
|
* `softure-marketing <command> <film> [flags]` (and `og [image]`, `shots [<id>]`): argument parsing, kept apart from
|
|
4
5
|
* the commands so it is testable. A typo in a flag never passes silently: `--todya` would record the film from today
|
|
@@ -6,11 +7,21 @@ import { type Quality } from "../config/schema.js";
|
|
|
6
7
|
*/
|
|
7
8
|
export declare const COMMANDS: readonly ["all", "voice", "record", "render", "preview", "posts", "og", "shots"];
|
|
8
9
|
export type Command = (typeof COMMANDS)[number];
|
|
10
|
+
/** The viewport of an ad-hoc shot without --width/--height: a common laptop screen (FIRE's screenshot script). */
|
|
11
|
+
export declare const PAGE_SHOT_VIEWPORT: {
|
|
12
|
+
readonly width: 1440;
|
|
13
|
+
readonly height: 900;
|
|
14
|
+
};
|
|
9
15
|
export interface FilmOptions {
|
|
10
16
|
command: Exclude<Command, "og" | "shots">;
|
|
17
|
+
/** The first film named; the only one for every command but `voice`. */
|
|
11
18
|
filmId: string;
|
|
19
|
+
/** Every film named, in order; `voice` takes several, the other commands one. */
|
|
20
|
+
filmIds: string[];
|
|
12
21
|
/** `voice` really pays for the voiceover only with `--commit`. */
|
|
13
22
|
isCommit: boolean;
|
|
23
|
+
/** `--placeholder`: record and render on the free placeholder voiceover instead of the paid one. */
|
|
24
|
+
isPlaceholder: boolean;
|
|
14
25
|
/** The day the app counts from; overrides the video's `today` for one run. */
|
|
15
26
|
today?: string;
|
|
16
27
|
/** Another address of the recorded page. */
|
|
@@ -27,14 +38,30 @@ export interface OgOptions {
|
|
|
27
38
|
configPath: string;
|
|
28
39
|
}
|
|
29
40
|
/** `shots [<id>]`: every `screenshots` entry, or the one named. */
|
|
30
|
-
export interface
|
|
41
|
+
export interface EntryShotsOptions {
|
|
31
42
|
command: "shots";
|
|
43
|
+
mode: "entries";
|
|
32
44
|
/** One `screenshots` entry; without it, every entry. */
|
|
33
45
|
shotId?: string;
|
|
34
46
|
/** Another address of the app; each entry's path resolves against it. */
|
|
35
47
|
url?: string;
|
|
36
48
|
configPath: string;
|
|
37
49
|
}
|
|
50
|
+
/** `shots --page=<url> --out=<file> --expect=<phrase>`: one page anywhere, behind the same gates. */
|
|
51
|
+
export interface PageShotsOptions {
|
|
52
|
+
command: "shots";
|
|
53
|
+
mode: "page";
|
|
54
|
+
/** The page itself, not a base address. */
|
|
55
|
+
page: string;
|
|
56
|
+
/** The PNG to write, relative to the current directory. */
|
|
57
|
+
out: string;
|
|
58
|
+
/** The shot's settings in the shape of a `screenshots` entry (`id` "page", `path` "/"; `storageState` as given). */
|
|
59
|
+
entry: MarketingJson["screenshots"][number];
|
|
60
|
+
/** `--scheme`; without it, `app.colorScheme`. */
|
|
61
|
+
scheme?: ColorTheme;
|
|
62
|
+
configPath: string;
|
|
63
|
+
}
|
|
64
|
+
export type ShotsOptions = EntryShotsOptions | PageShotsOptions;
|
|
38
65
|
export type CliOptions = FilmOptions | OgOptions | ShotsOptions;
|
|
39
66
|
export type ReadOptionsResult = {
|
|
40
67
|
ok: true;
|