Crates.io | machin |
lib.rs | machin |
version | 0.6.0 |
source | src |
created_at | 2022-07-02 19:44:18.037082 |
updated_at | 2022-11-27 12:02:15.843309 |
description | Machin is a cli program that simplifies file conversions and batch processing. It's inspired from filter/map/reduce |
homepage | https://github.com/mothsart/machin |
repository | https://github.com/mothsart/machin |
max_upload_size | |
id | 617970 |
size | 355,217 |
Machin is a cli program that simplifies file conversions and batch processing. It's inspired from filter/map/reduce
cargo install machin
clone the project and install it with :
cargo install --path .
Give the list of supported conversion for an entry format :
machmap -s svg
Convert svg files to png, jpg :
ls *.svg | machmap -e png
ls *.svg | machmap -e jpg
Convert webp files to png, jpg :
ls *.webp | machmap -e png
ls *.webp | machmap -e jpg
Convert png files to jpg, pdf :
ls *.png | machmap -e jpg
ls *.png | machmap -e pdf
Convert jpg files to png, pdf :
ls *.jpg | machmap -e png
ls *.jpg | machmap -e pdf
Convert markdown files to html :
ls *.md | machmap -e html
Convert json files to yaml :
ls *.json | machmap -e yaml
Convert yaml files to json :
ls *.yaml | machmap -e json
Apply a grayscale, a vertical flip and at last a 90 degree rotation of photo.jpg to prefix_photo.jpg
Order is important :
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 :
ls *.png | machreduce -o result.png
Create pdf with images :
ls *.jpg | machreduce -o result.pdf
Create archive (zip) with files :
ls *.png | machreduce -o archive.zip
Create one pdf with multiple pdf :
ls *.pdf | machreduce -o merge.pdf
On zsh :
Add this on your ~/.zshrc :
fpath=("dir_of/_pouf" "${fpath[@]}")
before :
autoload -Uz compinit && compinit
Makefile inspired by https://git.sr.ht/~julienxx/castor/tree/master/item/Makefile
make cargo-publish