mediasnacks 0.2.0 → 0.4.0
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/.zsh/completions/_mediasnacks +6 -2
- package/README.md +7 -1
- package/package.json +1 -1
- package/src/cli.js +6 -0
- package/src/dlaudio.sh +4 -0
- package/src/dlvideo.sh +4 -0
- package/src/rmcover.sh +8 -0
- package/src/unemoji.sh +26 -0
|
@@ -10,7 +10,11 @@ _mediasnacks_commands=(
|
|
|
10
10
|
'hev1tohvc1:Fixes video thumbnails not rendering in macOS Finder'
|
|
11
11
|
'framediff:ffplay with a filter for diffing adjacent frames'
|
|
12
12
|
'videodiff:Plays a video with the difference of two videos'
|
|
13
|
-
'vconcat:Concatenates videos'
|
|
13
|
+
'vconcat:Concatenates videos',
|
|
14
|
+
'dlaudio: yt-dlp best audio',
|
|
15
|
+
'dlvideo: yt-dlp best video',
|
|
16
|
+
'unemoji:Removes emojis from filenames'
|
|
17
|
+
'rmcover:Removes cover art'
|
|
14
18
|
)
|
|
15
19
|
|
|
16
20
|
_mediasnacks() {
|
|
@@ -21,7 +25,7 @@ _mediasnacks() {
|
|
|
21
25
|
|
|
22
26
|
local cmd="$words[2]"
|
|
23
27
|
case "$cmd" in
|
|
24
|
-
avif|resize|moov2front|dropdups|seqcheck|hev1tohvc1|framediff|videodiff|vconcat)
|
|
28
|
+
avif|resize|moov2front|dropdups|seqcheck|hev1tohvc1|framediff|videodiff|vconcat|dlaudio|dlvideo|unemoji|rmcover)
|
|
25
29
|
_files
|
|
26
30
|
;;
|
|
27
31
|
qdir)
|
package/README.md
CHANGED
|
@@ -21,8 +21,14 @@ Commands:
|
|
|
21
21
|
|
|
22
22
|
- `framediff`: Plays a video of adjacent frames diff
|
|
23
23
|
- `videodiff`: Plays a video with the difference of two videos
|
|
24
|
-
-
|
|
25
24
|
- `vconcat`: Concatenates videos
|
|
25
|
+
|
|
26
|
+
- `dlaudio`: yt-dlp best audio
|
|
27
|
+
- `dlvideo`: yt-dlp best video
|
|
28
|
+
|
|
29
|
+
- `unemoji`: Removes emojis from filenames
|
|
30
|
+
- `rmcover`: Removes cover art
|
|
31
|
+
|
|
26
32
|
<br/>
|
|
27
33
|
|
|
28
34
|
### Converting Images to AVIF
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -19,6 +19,12 @@ const COMMANDS = {
|
|
|
19
19
|
videodiff: ['videodiff.sh', 'Plays a video with the difference of two videos'],
|
|
20
20
|
|
|
21
21
|
vconcat: ['vconcat.sh', 'Concatenates videos'],
|
|
22
|
+
|
|
23
|
+
dlaudio: ['dlaudio.sh', 'yt-dlp best audio'],
|
|
24
|
+
dlvideo: ['dlvideo.sh', 'yt-dlp best video'],
|
|
25
|
+
|
|
26
|
+
unemoji: ['unemoji.sh', 'Removes emojis from filenames'],
|
|
27
|
+
rmcover: ['rmcover.sh', 'Removes cover art'],
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
const USAGE = `
|
package/src/dlaudio.sh
ADDED
package/src/dlvideo.sh
ADDED
package/src/rmcover.sh
ADDED
package/src/unemoji.sh
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Removes emoji's from filenames
|
|
4
|
+
|
|
5
|
+
find . -depth | while IFS= read -r file; do
|
|
6
|
+
dir=$(dirname "$file")
|
|
7
|
+
base=$(basename "$file")
|
|
8
|
+
|
|
9
|
+
# Remove emojis using Perl's Unicode-aware regex
|
|
10
|
+
newbase=$(printf '%s' "$base" | perl -CSD -pe '
|
|
11
|
+
s/[\x{1F600}-\x{1F64F}]//g; # Emoticons
|
|
12
|
+
s/[\x{1F300}-\x{1F5FF}]//g; # Misc Symbols and Pictographs
|
|
13
|
+
s/[\x{1F680}-\x{1F6FF}]//g; # Transport and Map
|
|
14
|
+
s/[\x{2600}-\x{26FF}]//g; # Misc symbols
|
|
15
|
+
s/[\x{2700}-\x{27BF}]//g; # Dingbats
|
|
16
|
+
s/[\x{1F900}-\x{1F9FF}]//g; # Supplemental Symbols and Pictographs
|
|
17
|
+
s/[\x{1FA70}-\x{1FAFF}]//g; # Symbols and Pictographs Extended-A
|
|
18
|
+
s/[\x{1F1E6}-\x{1F1FF}]//g; # Regional Indicator Symbols
|
|
19
|
+
')
|
|
20
|
+
|
|
21
|
+
if [ "$base" != "$newbase" ]; then
|
|
22
|
+
newpath="$dir/$newbase"
|
|
23
|
+
echo "Renaming: $file -> $newpath"
|
|
24
|
+
mv -n "$file" "$newpath"
|
|
25
|
+
fi
|
|
26
|
+
done
|