@harivilasp/mediautil 0.1.0 → 0.1.1

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 ADDED
@@ -0,0 +1,80 @@
1
+ # mediautil
2
+
3
+ `mediautil` is a local-first command-line utility for everyday media chores that should not require uploading private files to web tools. It gives developers and power users one consistent CLI for images, PDFs, OCR, QR codes, icons, data URIs, and base64 workflows.
4
+
5
+ This npm package installs the `mediautil` Rust binary from the matching GitHub Release.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @harivilasp/mediautil
11
+ ```
12
+
13
+ Other install options:
14
+
15
+ ```bash
16
+ cargo install mediautil
17
+ pip install mediautil-cli
18
+ brew install harivilasp/tap/mediautil
19
+ ```
20
+
21
+ ## What It Does
22
+
23
+ - Resize, crop, convert, and inspect images.
24
+ - Generate `.ico` files from source images.
25
+ - Convert images to `data:` URIs for CSS, HTML, and prototypes.
26
+ - Generate and read QR codes.
27
+ - Encode and decode files with base64, including PDFs.
28
+ - Extract text from images with local Tesseract OCR.
29
+ - Extract, split, merge, crop, and convert PDFs through local PDF tools.
30
+
31
+ ## External Tools
32
+
33
+ Core image, QR, data URI, and base64 commands work without extra tools.
34
+
35
+ PDF and OCR commands use local command-line tools when needed:
36
+
37
+ - `tesseract` for OCR
38
+ - `pdftotext` from Poppler for PDF text extraction
39
+ - `qpdf` for PDF split and merge
40
+ - `pdfcrop` for PDF crop
41
+ - `mutool` from MuPDF, or ImageMagick `magick`, for PDF conversion
42
+
43
+ Check your machine:
44
+
45
+ ```bash
46
+ mediautil doctor
47
+ ```
48
+
49
+ ## Examples
50
+
51
+ ```bash
52
+ mediautil image resize input.png output.webp --width 1200 --height 800
53
+ mediautil image crop input.png crop.png --x 20 --y 20 --width 400 --height 300
54
+ mediautil image icon logo.png favicon.ico --size 256
55
+ mediautil image data-uri logo.png
56
+ ```
57
+
58
+ ```bash
59
+ mediautil qr gen "https://example.com" qr.png
60
+ mediautil qr read qr.png
61
+ ```
62
+
63
+ ```bash
64
+ mediautil base64 encode report.pdf --output report.pdf.b64
65
+ mediautil base64 decode report.pdf.b64 --output report.pdf
66
+ ```
67
+
68
+ ```bash
69
+ mediautil ocr screenshot.png --lang eng
70
+ mediautil pdf text document.pdf
71
+ mediautil pdf split document.pdf page-1.pdf --pages 1
72
+ mediautil pdf merge chapter1.pdf chapter2.pdf --output book.pdf
73
+ mediautil pdf crop document.pdf cropped.pdf
74
+ mediautil pdf convert document.pdf page-%d.png
75
+ ```
76
+
77
+ ## Links
78
+
79
+ - GitHub: https://github.com/harivilasp/mediautil
80
+ - Releases: https://github.com/harivilasp/mediautil/releases
package/bin/mediautil.js CHANGED
@@ -5,7 +5,7 @@ const os = require("os");
5
5
  const path = require("path");
6
6
  const { spawnSync } = require("child_process");
7
7
 
8
- const version = "0.1.0";
8
+ const version = "0.1.1";
9
9
  const repo = process.env.MEDIAUTIL_REPO || "harivilasp/mediautil";
10
10
  const binDir = path.join(__dirname, "..", "vendor");
11
11
  const binPath = path.join(binDir, process.platform === "win32" ? "mediautil.exe" : "mediautil");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@harivilasp/mediautil",
3
- "version": "0.1.0",
4
- "description": "Local media utility shell for images, PDFs, OCR, QR codes, data URIs, and base64.",
3
+ "version": "0.1.1",
4
+ "description": "Local-first CLI for image/PDF utilities, OCR, QR codes, icons, data URIs, and base64 workflows.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -11,7 +11,8 @@
11
11
  "mediautil": "bin/mediautil.js"
12
12
  },
13
13
  "files": [
14
- "bin"
14
+ "bin",
15
+ "README.md"
15
16
  ],
16
17
  "scripts": {
17
18
  "postinstall": "node bin/mediautil.js --install-only"