@easysociable/cli 0.1.21 → 0.1.23
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/package.json
CHANGED
|
@@ -21,6 +21,23 @@ Ask only for what only the user knows:
|
|
|
21
21
|
- their Brand (IP name, handle, avatar) — once, ever;
|
|
22
22
|
- their own material (screenshots, photos) when a page needs it.
|
|
23
23
|
|
|
24
|
+
## Command output (`--json`)
|
|
25
|
+
|
|
26
|
+
Read results from these paths; don't guess:
|
|
27
|
+
|
|
28
|
+
| Command | Result |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `auth status` | `authenticated`, `account.email` (no `data` wrapper) |
|
|
31
|
+
| `brands list` / `brands get` | `data[]` / `data` (`id`, `name`, `handle`, `colors`, `logoUrl`) |
|
|
32
|
+
| `hooks recommend` | `data.cards[]` (`id`, `hook_type`, `status`, `format`) |
|
|
33
|
+
| `formulas recommend` | `data.cards[]` (`id`, `status`, `recipe`, `swipe`), `data.stop` |
|
|
34
|
+
| `formulas get` | `data` (`beats[]`, `looks[].layouts`) |
|
|
35
|
+
| `templates references` | a top-level array (`familyId`, `name`, `roles`, `style`, `requiresImage`) |
|
|
36
|
+
| `templates source` | top level: `familyId`, `canvas`, `studioJson` |
|
|
37
|
+
| `icons search --query <word>` | icon list for the word |
|
|
38
|
+
| `images upload --path …` | `data[]` (`path`, `asset.url`, or `error`); exit 1 if any failed |
|
|
39
|
+
| `slideshows create` | top level: `id`, `studioUrl` |
|
|
40
|
+
|
|
24
41
|
## Workflow
|
|
25
42
|
|
|
26
43
|
### 0. Login (once per session)
|
|
@@ -43,7 +60,7 @@ Ask only for what only the user knows:
|
|
|
43
60
|
Create it with `easysociable brands create --file brand.json`
|
|
44
61
|
(`{ "name", "handle", "colors", "logoAssetId" }`) using the default palette
|
|
45
62
|
that matches the deck's style (`references/REFERENCES.md`). An avatar: upload
|
|
46
|
-
it first (
|
|
63
|
+
it first (`images upload --path <file> --json`) and pass `data[0].asset.id` as
|
|
47
64
|
`logoAssetId`; `brands get` then returns its `logoUrl`.
|
|
48
65
|
Skipped → no Brand: header shows the topic, the CTA has no handle, and that
|
|
49
66
|
palette goes in `theme.json` (without a Brand or theme Studio falls back to
|
|
@@ -69,6 +86,12 @@ neither.
|
|
|
69
86
|
- Take image URLs from pages you already opened (`og:image`, images in the
|
|
70
87
|
body) and download them: `curl -sL -o assets/<name>.png <url>`. PNG, JPEG or
|
|
71
88
|
WebP only (convert anything else to PNG), ≤ 20 MB.
|
|
89
|
+
- Launch posts often show the product only in demo videos: pull frames of the
|
|
90
|
+
real UI straight from the video URL, without downloading the whole file
|
|
91
|
+
(`ffmpeg -ss <seconds> -i <video url> -frames:v 1 frame.png`; a contact sheet
|
|
92
|
+
to find the moment: `ffmpeg -i <video url> -vf "fps=1/3,scale=240:-1,tile=6x2"
|
|
93
|
+
-frames:v 1 sheet.jpg`), then crop to the phone or window. A frame where the key moment is
|
|
94
|
+
on screen (an approval prompt, a result) beats a generic screen.
|
|
72
95
|
- **Look at every file** before keeping it. Drop it when it is off-topic,
|
|
73
96
|
unreadable at phone size, would need more than 1.25× upscaling to fill its
|
|
74
97
|
area, carries a watermark, or shows a recognisable person who is not the
|
|
@@ -168,10 +191,8 @@ Say 'same as this'. Want another look? Say 'different look'."
|
|
|
168
191
|
- Fill each image area in this order:
|
|
169
192
|
1. The user's own image, when they gave one.
|
|
170
193
|
2. An evidence image from step 2. Upload it
|
|
171
|
-
(`easysociable images upload --
|
|
172
|
-
|
|
173
|
-
`node -e "const f=process.argv[1],t=f.match(/\.(jpe?g|webp)$/i)?(/webp/i.test(f)?'webp':'jpeg'):'png';console.log(JSON.stringify({file:'data:image/'+t+';base64,'+require('fs').readFileSync(f,'base64'),filename:require('path').basename(f)}))" assets/x.png > body.json`)
|
|
174
|
-
and use the returned `asset.url` as `src`.
|
|
194
|
+
(all at once: `easysociable images upload --path assets/a.png assets/b.jpg --json`)
|
|
195
|
+
and use each returned `data[i].asset.url` as `src`.
|
|
175
196
|
Crop and scale it (`objectFit: 'cover'`, `objectPosition`), never alter
|
|
176
197
|
what it shows. To point at something in it, add a separate element on top
|
|
177
198
|
(a red ellipse border, an underline bar) so the user can move or delete it.
|
|
@@ -33,7 +33,7 @@ Roles overlap in the catalog, so pass related ones together: `hook,cover` ·
|
|
|
33
33
|
not need a real one: keep the area's box and fill it from the content with a
|
|
34
34
|
large number or keyword, a short quote with an oversized quote mark, an
|
|
35
35
|
accent-colour block carrying one word, or one icon from
|
|
36
|
-
`easysociable icons search
|
|
36
|
+
`easysociable icons search --query <word>` on a tinted block. Never a grey placeholder or an
|
|
37
37
|
empty box on the cover. If nothing fits, delete the area and give the
|
|
38
38
|
headline its space.
|
|
39
39
|
5. Brand chrome: the header label is the Brand name (or the topic when there is
|