echo off
chcp 932
CLS
setlocal enabledelayedexpansion
SET URL=%2
SET EARTH=%1
SET DATIME=%DATE%%TIME%
SET DATIMES=!%DATIME: =0!
CALL :set_week
SET LOCAL=!EARTH!'%DATIMES:~2,2%'%DATIMES:~5,2%%DATIMES:~8,2%%WEEK%%DATIMES:~10,2%%DATIMES:~13,2%
ECHO ^<!DOCTYPE html^> > !LOCAL!.html
ECHO ^<BASE HREF=!URL!^> >> !LOCAL!.html
ECHO ^<head^> >> !LOCAL!.html
ECHO ^<H1^>!LOCAL!^</H1^> >> !LOCAL!.html
chcp 932
INET_GET -r 5 -v -nr -t !URL! -L !LOCAL!!LOCAL!.TXT >NUL
FOR /F "delims=" %%A IN (!LOCAL!!LOCAL!.TXT) DO (
ECHO %%A
ECHO ^<H1^>%%A^<^/H1^> >> !LOCAL!.html
)
INET_GET -r 5 -v -nr -t !URL! >> !LOCAL!.html
CrenaHtml2jpg.exe -fjpeg -p -r -w1280 -o!LOCAL!.jpg -u!URL!
CrenaHtml2jpg.exe -fjpeg -p -r -w1280 -o!LOCAL!~.jpg -ufile:///S:/!local!.html
touchin -c -sw !LOCAL!*
touchin -a -sw !LOCAL!*
rem AFTER 60 YEARS
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+65535:0:0 -sw !LOCAL!*
touchin -w -t+1680:0:0 -sw !LOCAL!*
DEL !LOCAL!!LOCAL!.TXT
ATTRIB +R !LOCAL!*
REM CLS
DIR /a:-d !LOCAL!*
exit /b
:set_week
set TODAY=%datime%
REM t ?
set /a h=%TODAY:~0,2%
set /a y=%TODAY:~2,2%
set m1=%TODAY:~5,1%
set m2=%TODAY:~6,1%
if "%m2%" equ "/" (
set /a m=m1
set /a d=%TODAY:~7,2%
) else (
set /a m=m1*10+m2
set /a d=%TODAY:~8,2%
)
if %m%==1 ( set /a y-=1&set /a m+=12 )
if %m%==2 ( set /a y-=1&set /a m+=12 )
REM c F [ ?
set /a week_value=( y + (y/4) + (h/4) - 2*h + (13*(m+1)/5) + d ) %% 7
REM j ??
if %week_value%==0 set WEEK=Sat
if %week_value%==1 set WEEK=Sun
if %week_value%==2 set WEEK=Bon
if %week_value%==3 set WEEK=Cue
if %week_value%==4 set WEEK=Ded
if %week_value%==5 set WEEK=Ehu
if %week_value%==6 set WEEK=Fri