我创建了一个批处理脚本,它将为我的站点创建 html 文件。但这似乎不起作用。我试图得到错误,但我不能
这是: http: //pastebin.com/r9n31UCS
我使用了 pastebin,因为你不能在这里放置 html 标签。
[从 pastebin 修补 - OP 没有明显原因“无法放置 HTML 标记”评论]
@echo off
set n=1
:start
set /a p=n-1
set /a x=n+1
set A=^<html^>
set B=^<head^>
set C=^<title^>
set D=One Piece Episode %n%
set E=^<^/title^>
set F=^<script type^=^"text^/javascript^" src^=^"^/scripts^/jwplayer.js^" ^>^<^/script^>
set G=^<script type^=^"text^/javascript^"^>jwplayer.key^=^"atgAhLbG+xtxBl7CY0CgP8QhQhg2Rb67mVRQ8A^=^=^";^<^/script^>
set H=^<^/head^>
set I=^<body^>
set J=^<center^>
set K=^<b^>Episode %n%^<^/b^>
set L=^<br ^/^>
set M=^<div id^=^"myElement^"^>Loading the player...^<^/div^>
set N=^<script type^=^"text^/javascript^"^>
set O=jwplayer^(^"myElement^"^).setup^(^{
set P=file: ^"episodes^/op^(%n%^).mp4^",
set Q=image: ^"Nexusserver0019.cloudapp.net/op/back.jpg^"
set R=height: 360,
set s=width: 640
set T=^}^)^;
set U=^<^/script^>
set V=^<a href^=^"ep(%p%).html^"^> Episode %p% ^<^/a^>^ ^ ^ ^ ^ ^<a href^=^"ep(%x%).html^"^> Episode %x% ^<^/a^>
set W=^<^/center^>
set X=^<^/body^>
set Y=^<^/html^>
echo %A% >> ep(%n%).html
echo %B% >> ep(%n%).html
echo %C% >> ep(%n%).html
echo %D% >> ep(%n%).html
echo %E% >> ep(%n%).html
echo %F% >> ep(%n%).html
echo %G% >> ep(%n%).html
echo %H% >> ep(%n%).html
echo %I% >> ep(%n%).html
echo %J% >> ep(%n%).html
echo %K% >> ep(%n%).html
echo %L% >> ep(%n%).html
echo %M% >> ep(%n%).html
echo %N% >> ep(%n%).html
echo %O% >> ep(%n%).html
echo %P% >> ep(%n%).html
echo %Q% >> ep(%n%).html
echo %R% >> ep(%n%).html
echo %S% >> ep(%n%).html
echo %T% >> ep(%n%).html
echo %U% >> ep(%n%).html
echo %V% >> ep(%n%).html
echo %W% >> ep(%n%).html
echo %X% >> ep(%n%).html
echo %Y% >> ep(%n%).html
echo Generating Episode %n% ...
set /a n=n+1
pause
goto start
pause