From d569a879cdff11407f9bf7098ed14120b4296902 Mon Sep 17 00:00:00 2001 From: Dym Sohin Date: Sun, 6 Aug 2023 22:47:24 +0200 Subject: [PATCH] works on nixos --- install.sh | 2 +- meta.kdl | 4 ++-- readme.md | 3 ++- rename-ext.sh | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index d331987..cbca969 100755 --- a/install.sh +++ b/install.sh @@ -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 \ diff --git a/meta.kdl b/meta.kdl index 60e8fc7..2a25b29 100644 --- a/meta.kdl +++ b/meta.kdl @@ -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/" diff --git a/readme.md b/readme.md index 9d3f21c..88a91b4 100644 --- a/readme.md +++ b/readme.md @@ -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 -- [`jpegoptim`](https://github.com/tjko/jpegoptim) – to compress JPEGs ## todo diff --git a/rename-ext.sh b/rename-ext.sh index 8d32014..cfe04da 100755 --- a/rename-ext.sh +++ b/rename-ext.sh @@ -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