add bludir goodie

This commit is contained in:
Christian Quest
2023-06-18 15:06:43 +02:00
parent aab55c456e
commit 43b56d55ae
3 changed files with 19 additions and 1 deletions

10
scripts/README.md Normal file
View File

@@ -0,0 +1,10 @@
# sgblur goodie scripts
## blurdir
Tool to blur all JPEG pictures found in a directory.
Usage: ./blurdir directory-path
Will create a "blur" directory in the original directory to store the blurred version of the pictures with the same name as original pictures.

8
scripts/blurdir Executable file
View File

@@ -0,0 +1,8 @@
#! /bin/bash
API=https://blur.panoramax.openstreetmap.fr/blur/
cd "$1"
mkdir -p blur
rm -f blur/*
ls -1 *.jpg *.JPG | /usr/bin/time -v parallel --progress --bar curl -s -X 'POST' $API -F "picture=@{}" --output "blur/{}"