| @set @n=0;/* & echo off | | | | dir /a/s/b/on *.html|cscript -nologo -e:jscript "%~0" "" | | exit/b & rem */ | | arg = WScript.Arguments(0); | | fso = new ActiveXObject("Scripting.FileSystemObject"); | | while (!WSH.StdIn.AtEndOfStream) { | | f = WSH.StdIn.ReadLine(); | | txt = fso.OpenTextFile(f,1).ReadAll(); | | txt = txt.replace(/<p>/g,"") | | .replace(/([ ]{4})[\r\n\t ]*([\u4E00-\u9FA5])/mg,"<br />\r\n $2") | | .replace(/([\u4E00-\u9FA5])[\r\n\t ]*([\u4E00-\u9FA5])/mg,"$1$2") | | .replace(/<\/p>/g,"<br />") | | .replace(/<h1>/,"<h1>TTT") | | .replace(/(作者:)?<span>(作者:)?/,"<span>作者:"); | | fso.OpenTextFile(f,2).Write(txt); | | }COPY |
记得备份,请忽视我的存在 |