mediasnacks 0.18.0 → 0.18.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.
@@ -45,9 +45,3 @@ case "$cmd" in
45
45
  _files -/
46
46
  ;;
47
47
  esac
48
-
49
-
50
- # INSTALL in: ~/.zshrc
51
- #fpath=(~/.zsh/completions $fpath)
52
- #zmodload zsh/complist
53
- #autoload -U compinit && compinit
package/README.md CHANGED
@@ -1,15 +1,22 @@
1
1
  # mediasnacks
2
2
 
3
- Utilities optimizing and preparing video and images for the web.
3
+ Utilities video and images.
4
4
 
5
5
 
6
- ## Overview
6
+ ### Install
7
7
  **FFmpeg and Node.js must be installed.**
8
8
 
9
9
  ```shell
10
- npx mediasnacks <command> <args>
10
+ npm install -g mediasnacks --ignore-scripts=true
11
11
  ```
12
12
 
13
+
14
+ ## Overview
15
+ ```shell
16
+ mediasnacks <command> <args>
17
+ ```
18
+
19
+
13
20
  ### Commands
14
21
  - `avif` Converts images to AVIF
15
22
  - `sqcrop` Square crops images
@@ -0,0 +1,26 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ # Exit on systems without ZSH
5
+ zsh=$(command -v zsh) || exit 0
6
+
7
+ # Exit on non-global (npm -g) installations
8
+ [ "${npm_config_global:-}" = "true" ] || exit 0
9
+
10
+ src="$(cd "$(dirname "$0")" && pwd)/.zsh/completions/_mediasnacks"
11
+ [ -f "$src" ] || exit 0
12
+
13
+ exec "$zsh" -s "$src" << 'ZSH_EOF'
14
+ src="$1"
15
+ for dir in "${fpath[@]}"; do
16
+ if [ -w "$dir" ]; then
17
+ dst="$dir/_mediasnacks"
18
+ ln -sf "$src" "$dst"
19
+ echo "linked zsh completions: $dst -> $src"
20
+ exit 0
21
+ fi
22
+ done
23
+ echo "zsh completions: no writable fpath directory found, skipping." >&2
24
+ exit 0
25
+ ZSH_EOF
26
+
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mediasnacks",
3
- "version": "0.18.0",
4
- "description": "Utilities for optimizing and preparing videos and images for the web",
3
+ "version": "0.18.1",
4
+ "description": "Utilities for optimizing and preparing videos and images",
5
5
  "license": "MIT",
6
6
  "author": "Eric Fortis",
7
7
  "type": "module",
@@ -9,6 +9,12 @@
9
9
  "mediasnacks": "src/cli.js"
10
10
  },
11
11
  "scripts": {
12
- "test": "docker run --rm $(docker build -q .)"
13
- }
12
+ "test": "docker run --rm $(docker build -q .)",
13
+ "postinstall": "sh install-zsh-completions.sh"
14
+ },
15
+ "files": [
16
+ "src",
17
+ ".zsh",
18
+ "install-zsh-completions.sh"
19
+ ]
14
20
  }
package/src/prores.js CHANGED
@@ -23,8 +23,8 @@ Arguments:
23
23
  <video> Video file to convert
24
24
 
25
25
  Options:
26
- --profile <n> ProRes profile (default: 3 (HQ))
27
- -h, --help Show this help message
26
+ -p, --profile <n> ProRes profile (default: 3 (422 HQ))
27
+ -h, --help Show this help message
28
28
 
29
29
  Example:
30
30
  npx mediasnacks prores video.mov
package/.editorconfig DELETED
@@ -1,11 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- charset = utf-8
5
- end_of_line = lf
6
- indent_size = 2
7
- indent_style = tab
8
- insert_final_newline = true
9
-
10
- [*.md]
11
- indent_style = space
@@ -1,25 +0,0 @@
1
- name: Test
2
-
3
- on: [ push, pull_request, workflow_dispatch ]
4
-
5
- permissions:
6
- contents: read
7
- pull-requests: write
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v6
15
- - uses: docker/setup-buildx-action@v4
16
- - uses: docker/build-push-action@v7
17
- with:
18
- context: .
19
- load: true
20
- tags: app-test
21
- cache-from: type=gha
22
- cache-to: type=gha,mode=max
23
-
24
- - name: Tests
25
- run: docker run --rm app-test
package/Dockerfile DELETED
@@ -1,13 +0,0 @@
1
- FROM mwader/static-ffmpeg:8.0.1 AS ffmpeg
2
- FROM node:24-bookworm-slim
3
-
4
- COPY --from=ffmpeg /ffmpeg /usr/local/bin/ffmpeg
5
- COPY --from=ffmpeg /ffprobe /usr/local/bin/ffprobe
6
-
7
- ENV FORCE_COLOR=1
8
- WORKDIR /workspace
9
-
10
- COPY src/ src/
11
- COPY package.json .
12
-
13
- CMD ["node", "--test"]
package/TODO.md DELETED
@@ -1,7 +0,0 @@
1
- # TODO
2
-
3
- - Test on Windows
4
- - Test on Linux
5
-
6
-
7
- Handle when shell expands, but files have special chars
Binary file
@@ -1,11 +0,0 @@
1
- #!/bin/sh
2
-
3
- docker run --rm \
4
- -v "$(pwd)/src/fixtures:/workspace/src/fixtures" \
5
- $(docker build -q .) \
6
- /bin/bash -c "
7
- node --test
8
- cp /tmp/avif*/lenna.avif /workspace/src/fixtures/
9
- cp /tmp/edgespic*/edgespic/*.png /workspace/src/fixtures/edgespic/
10
- "
11
-