@ferchy/n8n-nodes-aimc-toolkit 0.1.38 → 0.1.40

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.
Files changed (2) hide show
  1. package/README.md +56 -131
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -48,80 +48,6 @@ n8n is powerful, but real workflows often need basic utilities (validation, pars
48
48
  npm install @ferchy/n8n-nodes-aimc-toolkit
49
49
  ```
50
50
 
51
- ---
52
-
53
- ## Important: FFmpeg for Docker/Self-Hosted Users
54
-
55
- **If you're using AIMC Media node and see "FFmpeg not found" errors, read this!**
56
-
57
- ### Why Do I Need to Install FFmpeg Separately?
58
-
59
- When you install a community node in n8n, **only the JavaScript code is installed** - not system binaries like FFmpeg. Here's why:
60
-
61
- 1. **npm packages can only include JavaScript** - FFmpeg is a compiled binary program, not JavaScript code
62
- 2. **We include ffmpeg-static** which tries to download a pre-compiled FFmpeg, but it often fails in Docker because:
63
- - The binary is compiled for a different architecture (ARM vs x86)
64
- - Docker containers may block the download
65
- - The binary may not have execute permissions
66
- 3. **n8n runs inside a container** - even if FFmpeg is on your host machine, the container can't access it
67
-
68
- ### The Solution
69
-
70
- **Install FFmpeg directly in your n8n container.** This takes 30 seconds:
71
-
72
- ```bash
73
- # For Docker (run this command)
74
- docker exec -it your-n8n-container apk add --no-cache ffmpeg
75
-
76
- # Or add to your Dockerfile for permanent installation
77
- FROM n8nio/n8n:latest
78
- USER root
79
- RUN apk add --no-cache ffmpeg
80
- USER node
81
- ```
82
-
83
- Once installed, AIMC Media will **automatically detect** FFmpeg at /usr/bin/ffmpeg - no environment variables needed!
84
-
85
- ### Quick Test
86
-
87
- After installing FFmpeg, try this URL in AIMC Media:
88
- ```
89
- http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4
90
- ```
91
-
92
- ---
93
-
94
- ## FFmpeg Setup
95
-
96
- AIMC Media runs inside your n8n host/container, so FFmpeg must be available there.
97
- It will use the first available option:
98
-
99
- 1. FFMPEG_PATH / FFPROBE_PATH environment variables
100
- 2. System FFmpeg (e.g., /usr/bin/ffmpeg)
101
- 3. Bundled ffmpeg-static / ffprobe-static
102
-
103
- ### Docker (n8n official image)
104
- ```bash
105
- docker exec container apk add --no-cache ffmpeg
106
- ```
107
-
108
- ### Custom Dockerfile (any host)
109
- Works for Coolify, Docker Compose, Kubernetes, or any Docker host.
110
- ```dockerfile
111
- FROM n8nio/n8n:latest
112
- RUN apk add --no-cache ffmpeg
113
- ```
114
-
115
- ### Debian/Ubuntu
116
- ```bash
117
- apt-get update && apt-get install -y ffmpeg
118
- ```
119
-
120
- ### macOS
121
- ```bash
122
- brew install ffmpeg
123
- ```
124
-
125
51
  ## Nodes
126
52
 
127
53
  ### AIMC Code
@@ -197,6 +123,21 @@ Input URL: https://example.com/video.mp4
197
123
  Output Format: webm
198
124
  ```
199
125
 
126
+ ## FFmpeg Setup (AIMC Media)
127
+
128
+ FFmpeg must be installed on the same host/container where n8n runs. AIMC Media uses, in order:
129
+ 1. `FFMPEG_PATH` / `FFPROBE_PATH` environment variables
130
+ 2. System FFmpeg on `PATH`
131
+ 3. Bundled `ffmpeg-static` / `ffprobe-static` (if available)
132
+
133
+ **Install examples**
134
+ - Docker (inside container): `docker exec -it <container> apk add --no-cache ffmpeg`
135
+ - Dockerfile (any host): `FROM n8nio/n8n:latest` then `RUN apk add --no-cache ffmpeg`
136
+ - Debian/Ubuntu: `apt-get update && apt-get install -y ffmpeg`
137
+ - macOS (local dev): `brew install ffmpeg`
138
+
139
+ **Quick test**: use `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4` as Input URL.
140
+
200
141
  ### AIMC Social Scraper
201
142
 
202
143
  **Coming Soon!**
@@ -205,85 +146,69 @@ Social media scraping functionality is currently under development.
205
146
 
206
147
  ## Library Reference (AIMC Code)
207
148
 
208
- Libraries are available as globals or via `libs.<name>`. Examples are short and copy-paste friendly.
149
+ Libraries are available as globals or via `libs.<name>`. Each group lists what’s included and what it’s used for.
209
150
 
210
151
  ### HTTP and Networking
211
- - **`axios`** — HTTP client. Example: `const { data } = await axios.get(url);`
212
- - **`qs`** — querystring builder/parser. Example: `qs.stringify({ filter: { status: 'open' } })`
213
- - **`FormData`** — multipart uploads. Example: `const form = new FormData(); form.append('file', $binary.data);`
214
- - **`httpProxyAgent`** — HTTP(S) proxy routing. Example: `axios.get(url, { httpAgent: new httpProxyAgent('http://host:8080') })`
215
- - **`socksProxyAgent`** — SOCKS proxy support. Example: `axios.get(url, { httpAgent: new socksProxyAgent('socks5://host:1080') })`
152
+ - `axios` — HTTP client
153
+ - `qs` — querystring builder/parser
154
+ - `FormData` — multipart uploads
155
+ - `httpProxyAgent` — HTTP(S) proxy routing
156
+ - `socksProxyAgent` — SOCKS proxy support
216
157
 
217
158
  ### Parsing and Formats
218
- - **`YAML`** YAML parse/stringify. Example: `const obj = YAML.parse(text);`
219
- - **`toml`**TOML parsing. Example: `const obj = toml.parse(text);`
220
- - **`ini`** INI parsing. Example: `const cfg = ini.parse(text);`
221
- - **`xml2js`** XML to JS objects. Example: `const obj = await xml2js.parseStringPromise(xml);`
222
- - **`XMLParser`**fast XML parsing. Example: `const obj = new XMLParser().parse(xml);`
223
- - **`papaparse` / `Papa`** — CSV parsing. Example: `papaparse.parse(csv, { header: true }).data;`
224
- - **`csvParse`** — CSV parsing (callback/stream). Example: `csvParse(csv, { columns: true }, (err, rows) => {});`
225
- - **`protobufjs` / `protobuf`** — Protobuf support. Example: `const root = await protobuf.load('schema.proto');`
226
- - **`Handlebars`** — templating. Example: `Handlebars.compile('Hi {{name}}')({ name: 'AIMC' });`
159
+ - `YAML`, `toml`, `ini` config formats
160
+ - `xml2js`, `XMLParser` XML parsing
161
+ - `papaparse` / `Papa`, `csvParse` CSV parsing
162
+ - `protobufjs` / `protobuf` Protobuf
163
+ - `Handlebars`templates
227
164
 
228
165
  ### Validation and Schema
229
- - **`zod` / `z`** schema validation. Example: `z.object({ id: z.string() }).parse(input);`
230
- - **`joi` / `Joi`**expressive validation. Example: `Joi.object({ id: Joi.string().required() }).validate(input);`
231
- - **`yup`**object schema validation. Example: `await yup.object({ email: yup.string().email() }).validate(input);`
232
- - **`Ajv`** — JSON Schema validation. Example: `new Ajv().compile(schema)(input);`
233
- - **`validator`** — common validators. Example: `validator.isEmail(email);`
166
+ - `zod` / `z`, `joi` / `Joi`, `yup` schemas
167
+ - `Ajv` — JSON Schema validation
168
+ - `validator`common validators
234
169
 
235
170
  ### Dates, Time, and Scheduling
236
- - **`dayjs`** date formatting/math. Example: `dayjs().add(1, 'day').format('YYYY-MM-DD');`
237
- - **`dateFns`**functional date utils. Example: `dateFns.addDays(new Date(), 7);`
238
- - **`dateFnsTz`**timezone helpers. Example: `dateFnsTz.formatInTimeZone(new Date(), 'UTC', 'yyyy-MM-dd');`
239
- - **`moment`** — timezone-aware dates. Example: `moment().tz('America/New_York').format();`
240
- - **`cronParser`** — cron parsing. Example: `cronParser.parseExpression('0 * * * *').next().toString();`
241
- - **`ms`** — duration parsing. Example: `ms('2h');`
171
+ - `dayjs`, `dateFns`, `dateFnsTz`, `moment` date utilities
172
+ - `cronParser`cron parsing
173
+ - `ms`duration parsing
242
174
 
243
175
  ### Text, Search, and Similarity
244
- - **`cheerio`** — HTML parsing. Example: `const $ = cheerio.load(html); $('title').text();`
245
- - **`fuzzy`** — fuzzy search (Fuse.js). Example: `new fuzzy(list, { keys: ['title'] }).search('term');`
246
- - **`stringSimilarity`**string similarity score. Example: `stringSimilarity.compareTwoStrings(a, b);`
247
- - **`marked`** — Markdown to HTML. Example: `marked.parse('# Title');`
248
- - **`slug`** slugify strings. Example: `slug('My Title');`
249
- - **`pluralize`** — pluralization. Example: `pluralize('person', 2);`
250
- - **`htmlToText`** — HTML to text. Example: `htmlToText.convert('<b>hi</b>');`
176
+ - `cheerio` — HTML parsing
177
+ - `fuzzy` — fuzzy search
178
+ - `stringSimilarity` — similarity score
179
+ - `marked` — Markdown to HTML
180
+ - `slug`, `pluralize`, `htmlToText` text utilities
251
181
 
252
182
  ### Utilities and Math
253
- - **`_` / `lodash`** — data helpers. Example: `_.uniqBy(items, 'id');`
254
- - **`uuid`**UUID generation. Example: `uuid.v4();`
255
- - **`nanoid`**compact IDs. Example: `nanoid();`
256
- - **`bytes`**parse/format bytes. Example: `bytes('1MB');`
257
- - **`jsonDiff`**JSON diffing. Example: `jsonDiff.diff(a, b);`
258
- - **`pRetry`** — retry helper. Example: `await pRetry(() => axios.get(url), { retries: 3 });`
259
- - **`pLimit`** — concurrency limiter. Example: `const limit = pLimit(3); await Promise.all(tasks.map((t) => limit(t)));`
260
- - **`math`** — math utilities. Example: `math.evaluate('2 * (3 + 4)');`
261
- - **`currency`** — money math. Example: `currency(12.5).add(3).format();`
183
+ - `_` / `lodash` — data helpers
184
+ - `uuid`, `nanoid` IDs
185
+ - `bytes`byte parsing/formatting
186
+ - `jsonDiff`JSON diffing
187
+ - `pRetry`, `pLimit` retry & concurrency
188
+ - `math`, `currency` math and money
262
189
 
263
190
  ### Language and NLP
264
- - **`franc`** — language detection. Example: `franc('This is English');`
265
- - **`compromise`** — NLP helpers. Example: `compromise('Hello world').nouns().out('array');`
191
+ - `franc` — language detection
192
+ - `compromise` — NLP helpers
266
193
 
267
194
  ### Media and Files
268
- - **`QRCode` / `qrcode`** — QR generation. Example: `await QRCode.toDataURL('hello');`
269
- - **`ytdl`** — media downloads. Example: `const stream = ytdl(url, { quality: 'highest' });`
270
- - **`ffmpeg`** — FFmpeg pipelines. Example: `ffmpeg('in.mp4').size('1280x?').save('out.mp4');`
271
- - **`ffmpegStatic`**FFmpeg binary path. Example: `ffmpeg.setFfmpegPath(ffmpegStatic);`
272
- - **`ffprobeStatic`**ffprobe binary path. Example: `ffmpeg.setFfprobePath(ffprobeStatic);`
273
- - **`pdfLib`**PDF creation/editing. Example: `const pdf = await pdfLib.PDFDocument.create();`
274
- - **`archiver`** — zip archives. Example: `const archive = archiver('zip');`
275
- - **`Jimp`** — image processing. Example: `const img = await Jimp.read(buffer); img.resize(256, 256);`
195
+ - `QRCode` / `qrcode` — QR generation
196
+ - `ytdl` — media downloads
197
+ - `ffmpeg`, `ffmpegStatic`, `ffprobeStatic` — FFmpeg pipelines
198
+ - `pdfLib`PDF creation/editing
199
+ - `archiver`zip archives
200
+ - `Jimp`image processing
276
201
 
277
202
  ### Database
278
- - **`knex`** — SQL query builder. Example: `const db = knex({ client: 'pg', connection: process.env.DB_URL });`
203
+ - `knex` — SQL query builder
279
204
 
280
205
  ### Other Utilities
281
- - **`phoneNumber`** — phone parsing. Example: `phoneNumber.parsePhoneNumber('+14155552671').formatInternational();`
282
- - **`iban`** — IBAN validation. Example: `iban.isValid('GB82WEST12345698765432');`
206
+ - `phoneNumber` — phone parsing
207
+ - `iban` — IBAN validation
283
208
 
284
209
  ### Optional Native Helpers
285
- - **`bufferutil`** — optional native buffer helpers (if installed).
286
- - **`utf8Validate`** — optional UTF-8 validation (if installed).
210
+ - `bufferutil` — optional native buffer helpers (if installed)
211
+ - `utf8Validate` — optional UTF-8 validation (if installed)
287
212
 
288
213
  ## Configuration
289
214
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferchy/n8n-nodes-aimc-toolkit",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "AIMC Toolkit nodes for n8n: code execution and media operations.",
5
5
  "license": "MIT",
6
6
  "author": "Ferchy",