Differences between revisions 3 and 7 (spanning 4 versions)
Revision 3 as of 2007-08-25 05:58:11
Size: 813
Editor: XiaoQi
Comment:
Revision 7 as of 2007-08-25 06:04:00
Size: 945
Editor: XiaoQi
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
HTML attachment:html.7z [[BR]]
HTML(单文件) attachment:htmlflat.7z [[BR]]
纯文本 attachment:txt.7z [[BR]]
(!) 以上文件均不包含样例程序,程序请单独下载:[[BR]]
attachment:examples.7z
'''HTML''' attachment:html.7z [[BR]]
'''HTML(单文件)''' attachment:htmlflat.7z [[BR]]
'''纯文本''' attachment:txt.7z [[BR]]
(!) 以上文件均不包含样例程序,样例程序请单独下载:[[BR]]
'''样例程序''' attachment:examples.7z
-------
Line 9: Line 9:
 1. 把脚本 attachment:html.py 放到同一个目录运行 (这个脚本的作用是把例子中的编号都做上记号,以待转 txt 时用)。  1. 把 attachment:html.py, attachment:txt.py, attachment:const.py 放到和 raw.html 相目录中。
 1.
运行 html.py (这个脚本的作用是把例子中的编号都做上记号,以待转 txt 时用)。
Line 11: Line 12:
 1. 把脚本 attachment:txt.py 放到同一个目录下运行,生成的 restructed.txt 即是重后的纯文本文件。  1. 运行 txt.py,生成的 restructed.txt 即是重排后的纯文本文件 (大大减少了多余的空格和空行;每章每节带分隔符)

HTML attachment:html.7z BR HTML(单文件) attachment:htmlflat.7z BR 纯文本 attachment:txt.7z BR (!) 以上文件均不包含样例程序,样例程序请单独下载:BR 样例程序 attachment:examples.7z


以下是 XiaQ 构建 txt 版的流程:

  1. 生成 htmlflat(html 单文件),改名为 raw.html。
  2. 把 attachment:html.py, attachment:txt.py, attachment:const.py 放到和 raw.html 相同的目录中。
  3. 运行 html.py (这个脚本的作用是把例子中的编号都做上记号,以待转 txt 时用)。
  4. 用 FF3 打开 (FF2 应该也可,我没有试验了) restructed.html,Copy & Paste 为纯文本(不要直接导出,FF 的导出功能对 unicode 的兼容性不怎么样),存为 raw.txt。

  5. 运行 txt.py,生成的 restructed.txt 即是重排后的纯文本文件 (大大减少了多余的空格和空行;每章每节带分隔符)。

DiveIntoPythonZh/nightlybuild (last edited 2009-12-25 07:16:09 by localhost)