Class: SiSU_File_Map::FileMap
- Inherits:
-
SiSU_Info_Env::InfoEnv
- Object
- SiSU_Env_Call::EnvCall
- SiSU_Info_Env::InfoEnv
- SiSU_File_Map::FileMap
- Defined in:
- lib/sisu/se_filemap.rb
Overview
se_info_env.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#local_sisu_source ⇒ Object
Returns the value of attribute local_sisu_source.
Attributes inherited from SiSU_Info_Env::InfoEnv
#base_markup_dir_stub, #env, #etc, #filename, #flv, #fnb, #fnn, #fnt, #home, #hostname, #processing, #processing_git, #rc, #stub_pwd, #stub_src, #sys, #user, #webserv_host_cgi, #webserv_path, #webserv_port_cgi, #www, #yamlrc_dir
Attributes inherited from SiSU_Env_Call::EnvCall
#ad, #fnb, #fnn, #fnt, #fnv, #fnz, #rc
Instance Method Summary collapse
-
#initialize(opt = '') ⇒ FileMap
constructor
watch / REVIEW.
Methods inherited from SiSU_Info_Env::InfoEnv
#ao, #arch, #asciidoc_ocn?, #bin, #build, #cgi, #cgi_sample_search_form_name, #cjk, #cjk_ja, #cjk_ko, #cjk_zh, #composite_file, #concord_max, #console_web_browser, #console_www_browser, #current_document, #defaults, #digest, #digest_conf?, #dir_url, #docbook_viewer, #encoding, #epub, #epub_bld, #epub_cp_images, #epub_viewer, #feed, #feed_home, #fictionbook_viewer, #file_encoding, #font, #git, #host, #html, #html_minitoc?, #html_navigation?, #html_navigation_bar?, #html_quick_ref?, #html_right_pane?, #html_scroll_1, #html_scroll_2, #html_search_form?, #html_seg_1, #html_seg_2, #html_seg_title_banner?, #html_top_band?, #i18n, #image_external, #image_source, #image_source_include, #image_source_include_local, #image_source_include_remote, #image_source_sisu_includes, #images, #images_epub, #images_external, #images_local, #landscape, #lang_filename, #language, #language_default_set, #length, #links_to_manifest?, #listed?, #local, #locale, #localhost, #lout, #main, #make, #man, #manifest?, #manifest_minitoc?, #manpage, #manpage_generator, #manpage_viewer, #markdown_ocn?, #markup_emphasis, #metadata?, #minitoc?, #mono, #ocn?, #odf, #odf_pth, #odf_viewer, #odt, #odt_bld, #odt_ocn?, #omit_list, #orgmode_ocn?, #output, #output_tell, #papersize, #path, #path_rel_links, #paths, #pattern, #pdf, #pdf_viewer, #pdflatex, #php, #plaintext_ocn?, #plaintext_wrap, #po, #port, #portrait, #postgresql, #pot, #processing_base_tmp, #processing_path, #processing_sisupod, #program, #promo?, #pwd, #rbver, #read_source_file, #read_source_file_array, #read_source_file_string, #remote, #rexml, #rmagick, #root, #root_dir, #rst_ocn?, #sample_data, #sample_search_form_title, #sans, #scripts, #search?, #search_action, #search_fixed?, #search_form, #search_form?, #search_form_static, #segsubtoc?, #serif, #share, #sisupod_gen, #sisupod_gen_v2, #sisupod_gen_v3, #sisupod_v2, #sisupod_v3, #sisupod_v4, #sisurc_path, #sitearch, #size, #source_file_path, #source_file_processing_array, #source_file_with_path, #sql, #sqlite, #src_pod, #src_txt, #stub_dir, #stub_dir_orig, #stub_epub, #stub_md_harvest, #stub_pod, #style, #tex, #texi, #texinfo, #texpdf, #texpdf_hyperlinks, #text_editor, #textile_ocn?, #tidy, #tmp_root_dir, #toc?, #tune, #txt, #type, #url, #usr_dir?, #wc, #web_browser, #webrick, #webrick_port, #webserv, #webserv_base, #webserv_base_cgi, #webserv_cgi, #webserv_dir, #webserv_files_from_db, #webserv_host_base, #webserv_image, #webserv_map_pwd, #webserv_stub_ensure, #widget, #widget_static, #www_browser, #xml_docbook_ocn?, #xml_editor, #xml_fictionbook_ocn?, #xml_scaffold_ocn?, #xml_viewer, #yamlrc
Methods inherited from SiSU_Env_Call::EnvCall
#by?, #by_filename?, #by_filetype?, #by_language_code?, #default_language?, #document_language_versions_found, #dump?, #filename, #lang, #mono_multi_lingual?, #multilingual?, #output_dir_structure, #published_manifests?, #redirect?
Constructor Details
#initialize(opt = '') ⇒ FileMap
watch / REVIEW
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/sisu/se_filemap.rb', line 61 def initialize(opt='') #watch / REVIEW super() @opt=opt #,opt.fns,opt.selections.str @env=(@opt.fns && !(@opt.fns.empty?) \ ? (SiSU_Env::InfoEnv.new(@opt.fns)) : (SiSU_Env::InfoEnv.new('dummy.sst'))) ft=[] if @opt.act[:ao][:set]==:on @md=SiSU_Param::Parameters.new(@opt).get if @md \ and defined? @md.fn \ and @md.fn # used for by_language_code? if @md.opt.act[:html][:set]==:on #% --html, -h -H ft << @md.fn[:html] end if @md.opt.act[:concordance][:set]==:on #% --concordance, -w ft << @md.fn[:concordance] end if @md.opt.act[:manifest][:set]==:on #% --manifest, -y ft << @md.fn[:manifest] end if @md.opt.act[:txt][:set]==:on #% --txt, -t -a ft << @md.fn[:plain] end if @md.opt.act[:txt_textile][:set]==:on #% --textile ft << @md.fn[:txt_textile] end if @md.opt.act[:txt_asciidoc][:set]==:on #% --asciidoc ft << @md.fn[:txt_asciidoc] end if @md.opt.act[:txt_markdown][:set]==:on #% --markdown ft << @md.fn[:txt_markdown] end if @md.opt.act[:txt_rst][:set]==:on #% --rst, --rest ft << @md.fn[:txt_rst] end if @md.opt.act[:txt_orgmode][:set]==:on #% --orgmode ft << @md.fn[:txt_orgmode] end if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << @md.fn[:xhtml] end if @md.opt.act[:epub][:set]==:on #% --epub, -e ft << @md.fn[:epub] end if @md.opt.act[:manpage][:set]==:on #% --manpage, -i ft << @md.fn[:manpage] end if @md.opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree ft << @md.fn[:digest] end if @md.opt.act[:odt][:set]==:on #% --odt, -o opendocument ft << @md.fn[:odf] end if @md.opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf ft << @md.fn[:pdf_l] << @md.fn[:pdf_p] end if @md.opt.act[:share_source][:set]==:on ft << @md.fns end if @md.opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod ft << @md.fn[:sisupod] end if @md.opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type ft << @md.fn[:sax] end if @md.opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type ft << @md.fn[:dom] end if @md.opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book ft << @md.fn[:xml_docbook_book] end if @md.opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook ft << @md.fn[:xml_fictionbook] end if @md.opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu ft << @md.fn[:xml_scaffold_structure_sisu] end if @md.opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse ft << @md.fn[:xml_scaffold_structure_collapse] end @fnb=@md.fnb else # still needed where/when dp document param is not parsed if @opt.act[:html][:set]==:on #% --html, -h -H ft << '.html' << '.html.??' end if @opt.act[:concordance][:set]==:on #% --concordance, -w ft << 'concordance.html' << '??.concordance.html' << 'concordance.??.html' end if @opt.act[:manifest][:set]==:on #% --manifest, -y ft << 'sisu_manifest.html' << '??.sisu_manifest.html' << 'sisu_manifest.??.html' end if @opt.act[:txt][:set]==:on #% --txt, -t -a ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end if @opt.act[:txt_textile][:set]==:on #% --textile ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end if @opt.act[:txt_markdown][:set]==:on #% --markdown ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end if @opt.act[:txt_rst][:set]==:on #% --rst, --rest ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end if @opt.act[:txt_orgmode][:set]==:on #% --orgmode ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' end if @opt.act[:epub][:set]==:on #% --epub, -e ft << @fnb << '.epub' end if @opt.act[:manpage][:set]==:on #% --manpage, -i ft << '.1' << '??.man.1' << 'man.??.1' end if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree ft << 'digest.txt' << '??.digest.txt' << 'digest.??.txt' end if @opt.act[:odt][:set]==:on #% --odt, -o opendocument ft << 'opendocument.odt' << '??.opendocument.odt' << 'opendocument.??.odt' end if @opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf ft << 'landscape.pdf' << 'portrait.pdf' << '.pdf' end if @opt.act[:share_source][:set]==:on ft << '.sst' << '.ssi' << '.ssm' end if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod ft << '.zip' end if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type ft << 'sax.xml' << '??.sax.xml' << 'sax.??.xml' end if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type ft << 'dom.xml' << '??.dom.xml' << 'dom.??.xml' end if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book ft << 'docbook.xml' << '??.docbook.xml' << 'docbook.??.xml' end if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook ft << 'fictionbook.xml' << '??.fictionbook.xml' << 'fictionbook.??.xml' end if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml' end if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml' end end ft=ft.uniq filetypes=ft.join(',') @filetypes=if filetypes !~/..+/ then '' # -r called alone, copy all elsif @opt.selections.str =~/u/ then '' # -u added, copy all, (used to create remote directory tree see output path), not the usual function of -u elsif filetypes =~/\S+?,\S+/ then '*{' + filetypes + '}' # more than one relevant file type else '*' + filetypes # one relevant file type end @source_path=(@fnb && !(@fnb.empty?) \ ? "#{@env.path.output}/#{@fnb}" : @env.path.output) @source_path_epub=(@fnb && !(@fnb.empty?) \ ? "#{@env.path.output}/epub" : @env.path.output_epub) @source_path_src=(@fnb && !(@fnb.empty?) \ ? "#{@env.path.output}/src" : @env.path.output_src) @source_path_pod=(@fnb && !(@fnb.empty?) \ ? "#{@env.path.output}/pod" : @env.path.output_pod) @source_path_harvest=(@fnb && !(@fnb.empty?) \ ? "#{@env.path.output}/manifest" : @env.path.output_harvest) @local_sisu_source=(@filetypes =~/\S/) \ ? "#{@source_path}/#{@filetypes}" : @source_path end if @opt.act[:rsync][:set]==:on end end |
Instance Attribute Details
#local_sisu_source ⇒ Object
Returns the value of attribute local_sisu_source.
60 61 62 |
# File 'lib/sisu/se_filemap.rb', line 60 def local_sisu_source @local_sisu_source end |