works on nixos

This commit is contained in:
Dym Sohin 2023-08-06 22:47:24 +02:00
parent 3796f0c9f6
commit d569a879cd
4 changed files with 8 additions and 7 deletions

View File

@ -5,7 +5,7 @@
PREFIX=~/.local
git clone --depth 1 \
'https://source.garden/dym/rename-ext.git' \
'https://source.garden/scripts/rename-ext.git' \
$PREFIX/src/rename-ext/
ln -s $PREFIX/src/rename-ext/rename-ext.sh \

View File

@ -3,5 +3,5 @@ description "changes file-extension based on mime-type"
type "code"
tags "script" "bash" "file-management"
license "AGPL"
homepage "https://dym.sh/rename-ext"
source "https://source.garden/dym/rename-ext"
homepage "https://dym.sh/rename-ext/"
source "https://source.garden/scripts/rename-ext/"

View File

@ -33,10 +33,11 @@ to only print a report:
## requires
- [`file`](https://darwinsys.com/file/) - to determine file type
- [`sd`](https://github.com/chmln/sd) better sed
- [`jpegoptim`](https://github.com/tjko/jpegoptim) to compress JPEGs
- [`pngcrush`](https://github.com/Kjuly/pngcrush) to compress PNGs
<!-- - [`pngquant`](https://github.com/kornelski/pngquant) to compress PNGs -->
- [`jpegoptim`](https://github.com/tjko/jpegoptim) to compress JPEGs
## todo

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
## rename-ext
# > changes file-extension based on mime-type
@ -14,11 +14,11 @@
# rename-ext /Data/Pictures/_unsorted/**/*
## requires
# - file - to determine file type
# - `cargo install sd` better sed
# - jpegoptim to compress JPEGs
# - pngcrush to compress PNGs (losless)
# // - pngquant to compress PNGs (lossy)
# - jpegoptim to compress JPEGs
ALL_EXTS=`echo \
'gif|jpe?g|jp2|jfif|a?png|web(p|m)|svg