Machin is a cli program that simplifies file conversions and batch processing. It's inspired from filter/map/reduce
clone the projet and install it with :
zsh
cargo install --path .
Give the list of supported conversion for an entry format :
zsh
machmap -s svg
Convert svg files to png, jpg :
zsh
ls *.svg | machmap -e png
ls *.svg | machmap -e jpg
Convert png files to jpg, avif, pdf :
zsh
ls *.png | machmap -e jpg
ls *.png | machmap -e avif
ls *.png | machmap -e pdf
Convert jpg file to png, avif, pdf :
zsh
ls *.jpg | machmap -e png
ls *.jpg | machmap -e avif
ls *.jpg | machmap -e pdf
Convert markdown to
zsh
ls *.md | machmap -e png
Apply a grayscale, a vertical flip and at last a 90 degree rotation of photo.jpg to prefix_photo.jpg
Order is important : 1. On first, color option 2. flip option (vertical or horizontal) 3. rotation
zsh
ls *.png | machconvert -c grayscale -f vertical -r 90 -p prefix_
ls *.jpg | machconvert -c grayscale -f vertical -r 90 -p prefix_
Concatenate images on same file :
zsh
ls *.png | machreduce -o result.png
Create pdf with images:
zsh
ls *.jpg | machreduce -o result.pdf
Create archiv (zip) with files:
zsh
ls *.png | machreduce -o archive.zip
Create one pdf with several pdfr
zsh
ls *.pdf | machreduce -o merge.pdf
Makefile inspire by https://git.sr.ht/~julienxx/castor/tree/master/item/Makefile
zsh
make cargo-publish