magazines scripts
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
mkdir work
|
||||
cd origs
|
||||
for %%i in (*.tif) DO (
|
||||
convert %%i -level 19%%,58%% ..\work\%%i
|
||||
)
|
||||
for %%i in (*.png) DO (
|
||||
convert %%i -level 19%%,58%% ..\work\%%i
|
||||
)
|
@@ -0,0 +1,4 @@
|
||||
mkdir indexed
|
||||
for %%i in (*.tif) DO (
|
||||
convert %%i +dither -remap D:\Retro-Work\3col.png indexed\%%~ni.png
|
||||
)
|
4
ScanScripts/Windows/magazines/old/1 - grayscale.cmd
Normal file
4
ScanScripts/Windows/magazines/old/1 - grayscale.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
mkdir pages
|
||||
for %%i in (*.tif) DO (
|
||||
convert %%i -grayscale rec709luma pages\%%i
|
||||
)
|
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
cd work/out
|
||||
mkdir resample
|
||||
for %%i in (*.tif) DO (
|
||||
convert -units PixelsPerInch "%%i" -density 400 "resample\%%i"
|
||||
)
|
||||
for %%i in (*.png) DO (
|
||||
convert -units PixelsPerInch "%%i" -density 400 "resample\%%i"
|
||||
)
|
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
cd work/out
|
||||
mkdir resample
|
||||
for %%i in (*.tif) DO (
|
||||
convert -units PixelsPerInch "%%i" -density 600 "resample\%%i"
|
||||
)
|
||||
for %%i in (*.png) DO (
|
||||
convert -units PixelsPerInch "%%i" -density 600 "resample\%%i"
|
||||
)
|
4
ScanScripts/Windows/magazines/old/2 - G4_Compress.cmd
Normal file
4
ScanScripts/Windows/magazines/old/2 - G4_Compress.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
mkdir work\out\g4compressed
|
||||
cd work\out
|
||||
"c:\Program Files (x86)\IrfanView\i_view32.exe" .\*.tif /tifc=4 /convert=.\g4compressed\*.tif
|
73
ScanScripts/Windows/magazines/old/2 - Make pdf.cmd
Normal file
73
ScanScripts/Windows/magazines/old/2 - Make pdf.cmd
Normal file
@@ -0,0 +1,73 @@
|
||||
@echo off
|
||||
rem *****************************
|
||||
rem * 2015 Carsten Jensen / DDHF
|
||||
rem * Script til behandling af
|
||||
rem * indscannede sider
|
||||
rem *****************************
|
||||
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
set folder=%cd%
|
||||
cd work\out
|
||||
echo tryk CTRL-C hvis du vil afbryde processen.
|
||||
choice /m "Ret side orden "
|
||||
if %errorlevel%==1 (
|
||||
|
||||
REM Rediger nedenst<73>ende st<73> s<> den passer med dit setup.
|
||||
copy ..\correct_pages.php .\ /y
|
||||
php -f correct_pages.php
|
||||
cd newpages
|
||||
)
|
||||
|
||||
if NOT EXIST output mkdir output
|
||||
set thumb=1
|
||||
|
||||
|
||||
choice /C SF /m "S/H (S) eller Farver (jpg komprimering) (F)"
|
||||
echo.
|
||||
echo Arbejder vent venligst...
|
||||
echo.
|
||||
|
||||
if %errorlevel%==2 (
|
||||
REM Opret Farve Dokument (jpg komprimering)
|
||||
for %%i in (*.tif) DO (
|
||||
if !thumb!==1 (
|
||||
convert %%i -resize 240x310^^! -quality 75%% "!folder!\thumb.jpg"
|
||||
)
|
||||
set thumb=2
|
||||
convert %%i -quality 95%% output\%%~ni.jpg
|
||||
)
|
||||
|
||||
cd output
|
||||
for %%i in (*.jpg) DO (
|
||||
convert %%i %%~ni.pdf
|
||||
)
|
||||
del *.jpg /q
|
||||
) else if %errorlevel%==1 (
|
||||
REM Opret S/H Dokument (ingen jpg komprimering)
|
||||
for %%i in (*.tif) DO (
|
||||
if !thumb!==1 (
|
||||
convert %%i -resize 240x310^^! -quality 80%% "!folder!\thumb.jpg"
|
||||
)
|
||||
set thumb=2
|
||||
convert %%i output\%%~ni.pdf
|
||||
)
|
||||
cd output
|
||||
) else goto error
|
||||
|
||||
|
||||
pdftk *.pdf cat output %folder%\dokument.pdf
|
||||
del *.pdf /q
|
||||
|
||||
:success
|
||||
Echo PDF + Thumb oprettet
|
||||
goto end
|
||||
|
||||
:error
|
||||
Echo der opstod en fejl, evt i dit valg.
|
||||
goto end
|
||||
|
||||
|
||||
|
||||
:end
|
||||
pause
|
Reference in New Issue
Block a user