20200812
檔名:HtmlGenerator.bat
內容:
@echo off
REM ----------------以下為設定檔-可修改--------------------------
REM -以下為讀取檔案
set FileInName=config.txt
REM -以下為產出檔案
set FileOutName=index.html
REM -以下為網頁標題
set HtmlTitle=課程連結頁面
REM ----------------以下為程式碼-不可修改---------------------------
echo "<html>" > "%FileOutName%"
echo "<head>" >> "%FileOutName%"
echo "<title>%HtmlTitle%</title>" >> "%FileOutName%"
echo "<style type=text/css>" >> "%FileOutName%"
echo "<!--" >> "%FileOutName%"
echo ".style {font-size: 36px}" >> "%FileOutName%"
echo "-->" >> "%FileOutName%"
echo "</style>" >> "%FileOutName%"
echo "<body>" >> "%FileOutName%"
echo "<center>" >> "%FileOutName%"
for /f "tokens=1,2 delims= " %%a in (%FileInName%) do (
echo "<br><span class='style'><a href='%%b' class='style2' target='_blank'>%%a</a></span><br>" >> "%FileOutName%"
)
echo "</center>" >> "%FileOutName%"
echo "</body>" >> "%FileOutName%"
echo "</html>" >> "%FileOutName%"
沒有留言:
張貼留言