本帖最后由 CrLf 于 2015-5-12 02:22 编辑
powershell- $list = @{}
- get-content txt.txt | %{
- $split = $_ -split "\s+"
- $list += @{$split[0]=$split[1]}
- }
-
- foreach($file in dir *.html){
- (type $file) -replace "☆☆",$list[$file.BaseName] | out-file -encoding utf8 $file
- }
复制代码 hta- <script src=http://www.bathome.net/lib/diy/Libs.js></script>
-
- <script>
- var liblist = ['hide','prototype','function','iconv']
- for(var i in liblist)Libs.get(liblist[i])
- </script>
-
- <script>
- try{md('处理后')}catch(E){}
-
- type('txt.txt').split(/\r?\n/)._each(
- function(line){
- try{
- var match = line.match(/(\S+)\s+(\S+)/)
- var text = type(match[1]+'.html').replace(/☆☆/g,match[2])
- iconv.saveText(text,'处理后/'+match[1]+'.html','utf-8')
- }
- catch(E){}
- }
- )
-
- alert('Bingo!')
- </script>
复制代码
|