mirror of
https://github.com/medialab-prado/datamad2017.git
synced 2025-06-07 22:11:29 +02:00
Initial commit
This commit is contained in:
parent
8e3b6da84f
commit
95607eea61
241 changed files with 14242 additions and 3 deletions
43
automation/images/all_image_optimization.bat
Normal file
43
automation/images/all_image_optimization.bat
Normal file
|
@ -0,0 +1,43 @@
|
|||
@echo off
|
||||
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
set SOURCE=%~1
|
||||
|
||||
:LOOP
|
||||
if "%~1"=="" GOTO END
|
||||
if /I "%~1"=="-d" set "SOURCE=..\..\img"
|
||||
if /I "%~1"=="-jtran" GOTO JPEGTRAN
|
||||
if /I "%~1"=="-pout" GOTO PNGOUT
|
||||
if /I "%~1"=="-optip" GOTO OPTIPNG
|
||||
if /I "%~1"=="-pquant" GOTO PNGQUANT
|
||||
if /I "%~1"=="-gsicle" GOTO GIFSICLE
|
||||
if /I "%~1"=="-svgo" GOTO SVGO
|
||||
SHIFT & GOTO LOOP
|
||||
|
||||
:JPEGTRAN
|
||||
call %LOCAL_DIR%\jpegtran.bat "%SOURCE%"
|
||||
SHIFT & GOTO LOOP
|
||||
|
||||
:PNGOUT
|
||||
call %LOCAL_DIR%\pngout.bat "%SOURCE%"
|
||||
SHIFT & GOTO LOOP
|
||||
|
||||
:OPTIPNG
|
||||
call %LOCAL_DIR%\optipng.bat "%SOURCE%"
|
||||
SHIFT & GOTO LOOP
|
||||
|
||||
:PNGQUANT
|
||||
call %LOCAL_DIR%\pngquant.bat "%SOURCE%"
|
||||
SHIFT & GOTO LOOP
|
||||
|
||||
:GIFSICLE
|
||||
call %LOCAL_DIR%\gifsicle.bat "%SOURCE%"
|
||||
SHIFT & GOTO LOOP
|
||||
|
||||
:SVGO
|
||||
call %LOCAL_DIR%\svgo.bat "%SOURCE%"
|
||||
SHIFT & GOTO LOOP
|
||||
|
||||
:END
|
||||
pause
|
9
automation/images/gifsicle.bat
Normal file
9
automation/images/gifsicle.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@echo on
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
|
||||
|
||||
echo Optimizing GIF with gifsicle
|
||||
forfiles /p %SOURCE% /s /m "*.gif" /c "cmd /c echo processing @path && %LOCAL_DIR%\gifsicle.exe -b -O3 @path"
|
||||
|
||||
pause
|
BIN
automation/images/gifsicle.exe
Normal file
BIN
automation/images/gifsicle.exe
Normal file
Binary file not shown.
9
automation/images/jpegtran.bat
Normal file
9
automation/images/jpegtran.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@echo on
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
|
||||
|
||||
echo Optimizing JPEG with jpegtran
|
||||
forfiles /p %SOURCE% /s /m "*.jpg" /c "cmd /c echo processing @path && %LOCAL_DIR%\jpegtran.exe -optimize -progressive -copy none -outfile @path @path"
|
||||
|
||||
pause
|
BIN
automation/images/jpegtran.exe
Normal file
BIN
automation/images/jpegtran.exe
Normal file
Binary file not shown.
9
automation/images/optipng.bat
Normal file
9
automation/images/optipng.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@echo on
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
|
||||
|
||||
echo Optimizing PNG with optipng
|
||||
forfiles /p %SOURCE% /s /m "*.png" /c "cmd /c echo processing @path && %LOCAL_DIR%\optipng.exe -force -o7 @path"
|
||||
|
||||
pause
|
BIN
automation/images/optipng.exe
Normal file
BIN
automation/images/optipng.exe
Normal file
Binary file not shown.
9
automation/images/pngout.bat
Normal file
9
automation/images/pngout.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@echo on
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
|
||||
|
||||
echo Optimizing PNG with pngout
|
||||
forfiles /p %SOURCE% /s /m "*.png" /c "cmd /c echo processing @path && %LOCAL_DIR%\pngout.exe @path"
|
||||
|
||||
pause
|
BIN
automation/images/pngout.exe
Normal file
BIN
automation/images/pngout.exe
Normal file
Binary file not shown.
9
automation/images/pngquant.bat
Normal file
9
automation/images/pngquant.bat
Normal file
|
@ -0,0 +1,9 @@
|
|||
@echo on
|
||||
set LOCAL_DIR=%~dp0
|
||||
set LOCAL_DIR=%LOCAL_DIR:~0,-1%
|
||||
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
|
||||
|
||||
echo Optimizing PNG with pngquant
|
||||
forfiles /p %SOURCE% /s /m "*.png" /c "cmd /c echo processing @path && %LOCAL_DIR%\pngquant.exe --skip-if-larger --force --ext .png @path"
|
||||
|
||||
pause
|
BIN
automation/images/pngquant.exe
Normal file
BIN
automation/images/pngquant.exe
Normal file
Binary file not shown.
7
automation/images/svgo.bat
Normal file
7
automation/images/svgo.bat
Normal file
|
@ -0,0 +1,7 @@
|
|||
@echo on
|
||||
if "%~1"=="" (set "SOURCE=..\..\img") else (set "SOURCE=%~1")
|
||||
|
||||
echo Optimizing SVG with svgo
|
||||
forfiles /p %SOURCE% /s /m "*.svg" /c "cmd /c echo processing @path && svgo @path"
|
||||
|
||||
pause
|
Loading…
Add table
Add a link
Reference in a new issue