extraktr 1.0.1 → 1.0.3

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/index.js +7 -2
  2. package/package.json +11 -4
package/index.js CHANGED
@@ -44,6 +44,7 @@ Global options:
44
44
  --version, -v Show package version
45
45
 
46
46
  Run: extraktr extract --help (flags, env vars, input rules)
47
+ ⭐ Star on GitHub: https://github.com/Extraktr/get-extraktr
47
48
  `);
48
49
  }
49
50
 
@@ -70,13 +71,14 @@ Options:
70
71
  --help, -h Show this help
71
72
 
72
73
  Notes:
73
- Do not combine --file and --stdin. On success, stdout is only the formatted result (text, markdown, or JSON). Errors go to stderr.
74
+ Do not combine --file and --stdin. JSON stdout is only JSON; text and markdown append a short footer. Errors go to stderr.
74
75
 
75
76
  Examples:
76
77
  extraktr extract --file sample.txt
77
78
  Get-Content sample.txt | extraktr extract --stdin
78
79
  extraktr extract --file sample.txt --format json
79
80
  extraktr extract --file sample.txt --format json --output out.json
81
+ ⭐ Star on GitHub: https://github.com/Extraktr/get-extraktr
80
82
  `);
81
83
  }
82
84
  const VALID_FORMATS = new Set(["text", "json", "markdown"]);
@@ -322,7 +324,10 @@ async function run() {
322
324
  process.exit(1);
323
325
  }
324
326
 
325
- const outStr = renderOutput(data, opts.format);
327
+ let outStr = renderOutput(data, opts.format);
328
+ if (opts.format === "text" || opts.format === "markdown") {
329
+ outStr = outStr.trimEnd() + "\n\n---\nPowered by Extraktr CLI → https://extraktr.com\n";
330
+ }
326
331
 
327
332
  if (opts.output) {
328
333
  try {
package/package.json CHANGED
@@ -1,17 +1,24 @@
1
1
  {
2
2
  "name": "extraktr",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "description": "Terminal client for Extraktr — calls the same POST /api/extract contract as the web app.",
6
6
  "main": "index.js",
7
7
  "type": "commonjs",
8
8
  "license": "MIT",
9
- "keywords": ["extraktr", "cli", "extraction"],
9
+ "keywords": [
10
+ "extraktr",
11
+ "cli",
12
+ "extraction"
13
+ ],
10
14
  "engines": {
11
15
  "node": ">=18.0.0"
12
16
  },
13
- "files": ["index.js", "README.md"],
17
+ "files": [
18
+ "index.js",
19
+ "README.md"
20
+ ],
14
21
  "bin": {
15
22
  "extraktr": "./index.js"
16
23
  }
17
- }
24
+ }