class Main
Attributes
is_folder[RW]
target_in[RW]
target_out[RW]
Public Instance Methods
doc()
click to toggle source
# File bin/ppz, line 19 def doc # 输出文件路径 output_html_path = @target_out + 'index.html' # 解析文档 parser = PPZ::FileDocParser.new @target_in # 拼接上 css 文件链接 output_html = %~<link rel="stylesheet" href=".ppz/asset/style/index.css"/>#{ parser.get_model.to_html }<script type="module" src=".ppz/asset/js/index.js"></script>~ # 输出 PPZ::Func::write_to_file output_html_path.to_s, output_html end
folder()
click to toggle source
# File bin/ppz, line 32 def folder puts '输入文件夹: ' + @target_in.to_s puts '输出文件夹: ' + @target_out.to_s model = PPZ::Folder::FolderModel.new @target_in, 0 model.compile @target_out end
main()
click to toggle source
# File bin/ppz, line 9 def main Preparation.new self if @is_folder folder else doc end end