Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM Title: "Generate index.html of JPG files in a Visual How To Format" Simple Utility 1.0
- REM Format: Windows BAT file, no dependencies.
- REM Summary: This is a simple Windows BAT file that will generate an index.html
- REM of all the .jpg files in alphabetical order. The user can input
- REM steps corrilating to each file.
- REM Demo: http://virasawmi.com/gordon/html/how_to/open_irfanview/
- REM Download: http://virasawmi.com/gordon/html/how_to/open_irfanview/Generate.bat
- REM Why?: I needed a quick way to make how to documents at work. I use SnagIt to make screen caps.
- @echo off
- del index.html
- dir /b /ON *.jpg > input.txt
- cls
- set input=
- set instruction=
- set /P input=Input the title of the document: %=%
- echo ^<html^>^<body^>^<font face^="helvetica, geneva, sans serif"^>^<title^>%input%^</title^>^<h1^>%input%^</h1^>^<hr^> >> index.html
- echo. >> index.html
- set /a c=0
- for /f "tokens=*" %%a in (input.txt) do call :processline %%a
- echo ^</font^>^</body^>^</html^> >> index.html
- echo.
- echo.
- echo Output: index.html
- del input.txt
- goto :eof
- :processline
- set /a c=c+1
- echo ^<p^>^<font color=^"#158291^"^>^<b^>Step %c%^:^</b^>^</font^>^<br^> >> index.html
- set /P instruction=Step %c%: %=%
- echo %instruction% >> index.html
- echo ^<br^>^<br^>^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^<img src^="%*"^>^</p^> >> index.html
- echo. >> index.html
- goto :eof
- :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement