Commit 6ebddd72 authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

Add new file

parents
@echo off
setlocal enableExtensions enableDelayedExpansion
set PROGNAME="D:\Program Files\Inkscape\inkscape.exe"
if "%1" == "-h" goto USER_INFO
if "%1" == "--help" goto USER_INFO
if not "%2" == "" goto USER_INFO
if "%1" == "" goto DO_ALL
set SFILE=%1
set BNAME=!SFILE:~0,-4!
@echo !SFILE! to !BNAME!.png
call !PROGNAME! -z -e "!BNAME!.png" -w 600 -d 300 -b white "!SFILE!"
if not %errorlevel%==0 (
@echo Error
exit /b 1
)
goto END
:DO_ALL
for /r %%P in (*.svg) do (
set SFILE=%%P
set BNAME=!SFILE:~0,-4!
@echo !SFILE! to !BNAME!.png
call !PROGNAME! -z -e "!BNAME!.png" -w 600 -d 300 -b white "!SFILE!"
if not !errorlevel!==0 (
@echo Error
exit /b 1
)
)
goto END
:USER_INFO
@echo.
@echo svg2png
@echo.
@echo Convert SVG file(s) to PNG format using Inkscape.
@echo Inkscape must be installed, and the correct path for executable file must be
@echo defined in the start of this batch file. Note that you cannot install
@echo Inkscape from Microsoft Store.
@echo.
@echo With no command-ine argument all SVG files are recursively converted to SVG files.
@echo Alternatively, the name of single SVG file can be entered.
@echo.
goto END
:END
exit /b 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment