Class: SiSU_Urls::OutputUrls
- Inherits:
-
Object
- Object
- SiSU_Urls::OutputUrls
- Defined in:
- lib/sisu/urls.rb
Instance Attribute Summary collapse
-
#act ⇒ Object
readonly
Returns the value of attribute act.
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#fnb ⇒ Object
readonly
Returns the value of attribute fnb.
-
#fns ⇒ Object
readonly
Returns the value of attribute fns.
-
#m_regular ⇒ Object
readonly
Returns the value of attribute m_regular.
-
#u ⇒ Object
readonly
Returns the value of attribute u.
Instance Method Summary collapse
- #asciidoc ⇒ Object
- #concordance ⇒ Object
- #dal ⇒ Object
- #db ⇒ Object
- #docbook ⇒ Object
- #dom ⇒ Object
- #epub ⇒ Object
- #fictionbook ⇒ Object
- #hash_digests ⇒ Object
- #html ⇒ Object
-
#initialize(opt) ⇒ OutputUrls
constructor
A new instance of OutputUrls.
- #json ⇒ Object
- #landscape ⇒ Object
- #maintenance(x) ⇒ Object
- #manifest ⇒ Object
- #manpage ⇒ Object
- #markdown ⇒ Object
- #odt ⇒ Object
- #orgmode ⇒ Object
- #pdf ⇒ Object
- #po ⇒ Object
- #po4a ⇒ Object
- #portrait ⇒ Object
- #pot ⇒ Object
- #psql ⇒ Object
- #qrcode ⇒ Object
- #report(x) ⇒ Object
- #report_info ⇒ Object
- #rst ⇒ Object
- #ruby_profile ⇒ Object
- #sax ⇒ Object
- #scaffold_collapse ⇒ Object
- #scaffold_sisu ⇒ Object
- #scroll ⇒ Object
- #seg ⇒ Object
- #show ⇒ Object
- #sisupod ⇒ Object
- #sitemap ⇒ Object
- #songsheet ⇒ Object
- #source ⇒ Object
- #sqlite ⇒ Object
- #sqlite_discrete ⇒ Object
- #texinfo ⇒ Object
- #text ⇒ Object
- #textile ⇒ Object
- #txt ⇒ Object
- #urls_all ⇒ Object
- #urls_select ⇒ Object
- #xhtml ⇒ Object
- #xml ⇒ Object
Constructor Details
#initialize(opt) ⇒ OutputUrls
Returns a new instance of OutputUrls.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/sisu/urls.rb', line 78 def initialize(opt) @opt=opt @particulars=SiSU_Particulars::CombinedSingleton.instance.get_env_md(opt) if @particulars.is_a?(NilClass) if @opt.act[:verbose_plus][:set]==:on \ or @opt.act[:maintenance][:set]==:on SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia). mark("@particulars is NilClass, acceptable e.g. for --harvest") end exit end @selections=@opt.selections.str @act=@opt.act @md=@particulars.md @env=@particulars.env @fnb=@env.fnb fn_set_lang=SiSU_Env::StandardiseLanguage.new(@opt.lng).language @fnl=@env.i18n.lang_filename(fn_set_lang[:c]) @fn=SiSU_Env::EnvCall.new(@opt.fns).lang(fn_set_lang[:c]) @m_regular=/(.+?)\.(?:(?:-|ssm\.)?sst|ssm)$/ @prog=@env.program end |
Instance Attribute Details
#act ⇒ Object (readonly)
Returns the value of attribute act.
77 78 79 |
# File 'lib/sisu/urls.rb', line 77 def act @act end |
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
77 78 79 |
# File 'lib/sisu/urls.rb', line 77 def dir @dir end |
#fnb ⇒ Object (readonly)
Returns the value of attribute fnb.
77 78 79 |
# File 'lib/sisu/urls.rb', line 77 def fnb @fnb end |
#fns ⇒ Object (readonly)
Returns the value of attribute fns.
77 78 79 |
# File 'lib/sisu/urls.rb', line 77 def fns @fns end |
#m_regular ⇒ Object (readonly)
Returns the value of attribute m_regular.
77 78 79 |
# File 'lib/sisu/urls.rb', line 77 def m_regular @m_regular end |
#u ⇒ Object (readonly)
Returns the value of attribute u.
77 78 79 |
# File 'lib/sisu/urls.rb', line 77 def u @u end |
Instance Method Details
#asciidoc ⇒ Object
162 163 164 165 166 167 168 169 170 |
# File 'lib/sisu/urls.rb', line 162 def asciidoc { cmd: '--asciidoc', viewer: @prog.web_browser, f_pth: @md.file.output_path.asciidoc.dir + '/' \ + @md.file.base_filename.asciidoc, fn: @fn[:txt_asciidoc], } end |
#concordance ⇒ Object
232 233 234 235 236 237 238 239 240 |
# File 'lib/sisu/urls.rb', line 232 def concordance { cmd: '--concordance', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_concordance.dir + '/' \ + @md.file.base_filename.html_concordance, fn: @fn[:concordance], } end |
#dal ⇒ Object
135 136 137 138 139 140 141 142 |
# File 'lib/sisu/urls.rb', line 135 def dal { cmd: '--ao', p_pth: @env.processing_path.ao + '/' \ + @opt.fns + '.meta', fn: 'ao', } end |
#db ⇒ Object
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/sisu/urls.rb', line 399 def db def psql { cmd: '--psql --update/--import', viewer: '', f_pth: @pwd_stub + '::' \ + @opt.fns \ + 'dbi psql', p_pth: @env.processing_path.postgresql + '/' \ + @md.fns \ + '.sql', fn: 'dbi psql', } end def sqlite { cmd: '--sqlite --update/--import', viewer: 'sqlite3 ', f_pth: @env.path.webserv + '/' \ + @md.opt.f_pth[:pth_stub] + '/' \ + 'sisu_sqlite.db', p_pth: @env.processing_path.sqlite + '/' \ + @md.fns \ + '.sql', fn: 'dbi sqlite3', } end def sqlite_discrete { cmd: '--sqlite', viewer: 'sqlite3 ', f_pth: @md.file.output_path.sqlite_discrete.dir + '/' \ + @md.file.base_filename.sqlite_discrete, p_pth: @env.processing_path.sqlite + '/' \ + @md.fns \ + '.sql', fn: 'dbi sqlite3', } end self end |
#docbook ⇒ Object
282 283 284 285 286 287 288 289 290 |
# File 'lib/sisu/urls.rb', line 282 def docbook { cmd: '--docbook', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_docbook_book.dir + '/' \ + @md.file.base_filename.xml_docbook_book, fn: @fn[:xml_docbook_book], } end |
#dom ⇒ Object
309 310 311 312 313 314 315 316 317 |
# File 'lib/sisu/urls.rb', line 309 def dom { cmd: '--xml-dom', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_dom.dir + '/' \ + @md.file.base_filename.xml_dom, fn: @fn[:dom], } end |
#epub ⇒ Object
255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/sisu/urls.rb', line 255 def epub { cmd: '--epub', viewer: @prog.epub_viewer, f_pth: @md.file.output_path.epub.dir + '/' \ + @md.file.base_filename.epub, p_pth: @env.processing_path.epub + '/' \ + Ep[:d_oebps] + '/' \ + 'index.xhtml', fn: @fn[:epub], } end |
#fictionbook ⇒ Object
291 292 293 294 295 296 297 298 299 |
# File 'lib/sisu/urls.rb', line 291 def fictionbook { cmd: '--fictionbook', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_fictionbook.dir + '/' \ + @md.file.base_filename.xml_fictionbook, fn: @fn[:xml_fictionbook], } end |
#hash_digests ⇒ Object
143 144 145 146 147 148 149 150 151 |
# File 'lib/sisu/urls.rb', line 143 def hash_digests { cmd: '--hash-digests (sha512/sha256/md5)', viewer: @prog.web_browser, f_pth: @md.file.output_path.hash_digest.dir + '/' \ + @md.file.base_filename.hash_digest, fn: @fn[:digest], } end |
#html ⇒ Object
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/urls.rb', line 209 def html def seg { cmd: '--html-seg', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_seg.dir + '/' \ + @md.file.base_filename.html_segtoc, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:toc], } end def scroll { cmd: '--html-scroll', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_scroll.dir + '/' \ + @md.file.base_filename.html_scroll, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:doc], } end def concordance { cmd: '--concordance', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_concordance.dir + '/' \ + @md.file.base_filename.html_concordance, fn: @fn[:concordance], } end self end |
#json ⇒ Object
338 339 340 341 342 343 344 345 346 |
# File 'lib/sisu/urls.rb', line 338 def json { cmd: '--js (json)', viewer: @prog.web_browser, f_pth: @md.file.output_path.json.dir + '/' \ + @md.file.base_filename.json, fn: @fn[:json], } end |
#landscape ⇒ Object
348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/sisu/urls.rb', line 348 def landscape { cmd: '--pdf (landscape)', viewer: @prog.pdf_viewer, f_pth: @md.file.output_path.pdf.dir + '/' \ + @md.file.base_filename.pdf_l \ + @md.papersize_array[0] + '.pdf', p_pth: @env.processing_path.tex + '/' \ + @opt.fns.gsub(/~/,'-') + '.' \ + @md.papersize_array[0] \ + '.landscape.tex', fn: @fn[:pdf_l], } end |
#maintenance(x) ⇒ Object
122 123 124 125 126 127 128 129 130 131 |
# File 'lib/sisu/urls.rb', line 122 def maintenance(x) if @opt.act[:maintenance][:set]==:on SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], "[#{@opt.f_pth[:lng_is]}]", x[:cmd], x[:p_pth] ).maintenance end end |
#manifest ⇒ Object
502 503 504 505 506 507 508 509 510 |
# File 'lib/sisu/urls.rb', line 502 def manifest { cmd: '--manifest', viewer: @prog.web_browser, f_pth: @md.file.output_path.manifest.dir + '/' \ + @md.file.base_filename.manifest, fn: @fn[:manifest], } end |
#manpage ⇒ Object
378 379 380 381 382 383 384 385 386 |
# File 'lib/sisu/urls.rb', line 378 def manpage { cmd: '--manpage', viewer: @prog.manpage_viewer, f_pth: @md.file.output_path.manpage.dir + '/' \ + @md.file.base_filename.manpage, fn: 'manpage', } end |
#markdown ⇒ Object
171 172 173 174 175 176 177 178 179 |
# File 'lib/sisu/urls.rb', line 171 def markdown { cmd: '--markdown', viewer: @prog.web_browser, f_pth: @md.file.output_path.markdown.dir + '/' \ + @md.file.base_filename.markdown, fn: @fn[:txt_markdown], } end |
#odt ⇒ Object
270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/sisu/urls.rb', line 270 def odt { cmd: '--odt (ODF:ODT)', viewer: @prog.odf_viewer, f_pth: @md.file.output_path.odt.dir + '/' \ + @md.file.base_filename.odt, p_pth: @env.processing_path.odf + '/' \ + @opt.fns + '/' \ + 'odt/content.xml', fn: @fn[:odf], } end |
#orgmode ⇒ Object
198 199 200 201 202 203 204 205 206 |
# File 'lib/sisu/urls.rb', line 198 def orgmode { cmd: '--orgmode', viewer: @prog.web_browser, f_pth: @md.file.output_path.orgmode.dir + '/' \ + @md.file.base_filename.orgmode, fn: @fn[:txt_orgmode], } end |
#pdf ⇒ Object
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/sisu/urls.rb', line 347 def pdf def landscape { cmd: '--pdf (landscape)', viewer: @prog.pdf_viewer, f_pth: @md.file.output_path.pdf.dir + '/' \ + @md.file.base_filename.pdf_l \ + @md.papersize_array[0] + '.pdf', p_pth: @env.processing_path.tex + '/' \ + @opt.fns.gsub(/~/,'-') + '.' \ + @md.papersize_array[0] \ + '.landscape.tex', fn: @fn[:pdf_l], } end def portrait { cmd: '--pdf (portrait)', viewer: @prog.pdf_viewer, f_pth: @md.file.output_path.pdf.dir + '/' \ + @md.file.base_filename.pdf_p \ + @md.papersize_array[0] + '.pdf', p_pth: @env.processing_path.tex + '/' \ + @opt.fns.gsub(/~/,'-') + '.' \ + @md.papersize_array[0] \ + '.tex', fn: @fn[:pdf_p], } end self end |
#po ⇒ Object
441 442 443 444 445 446 447 448 449 450 |
# File 'lib/sisu/urls.rb', line 441 def po { cmd: '--po4a/--pot', viewer: @prog.web_browser, f_pth: @prog.text_editor + ' ' \ + @md.file.output_path.po.dir \ + '/' + y, fn: @fn[:pot], } end |
#po4a ⇒ Object
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/sisu/urls.rb', line 440 def po4a def po { cmd: '--po4a/--pot', viewer: @prog.web_browser, f_pth: @prog.text_editor + ' ' \ + @md.file.output_path.po.dir \ + '/' + y, fn: @fn[:pot], } end def pot { cmd: '--po4a/--pot', viewer: @prog.web_browser, f_pth: @prog.text_editor + ' ' \ + @md.file.output_path.pot.dir \ + '/' + y, fn: @fn[:pot], } end self end |
#portrait ⇒ Object
362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/sisu/urls.rb', line 362 def portrait { cmd: '--pdf (portrait)', viewer: @prog.pdf_viewer, f_pth: @md.file.output_path.pdf.dir + '/' \ + @md.file.base_filename.pdf_p \ + @md.papersize_array[0] + '.pdf', p_pth: @env.processing_path.tex + '/' \ + @opt.fns.gsub(/~/,'-') + '.' \ + @md.papersize_array[0] \ + '.tex', fn: @fn[:pdf_p], } end |
#pot ⇒ Object
451 452 453 454 455 456 457 458 459 460 |
# File 'lib/sisu/urls.rb', line 451 def pot { cmd: '--po4a/--pot', viewer: @prog.web_browser, f_pth: @prog.text_editor + ' ' \ + @md.file.output_path.pot.dir \ + '/' + y, fn: @fn[:pot], } end |
#psql ⇒ Object
400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/sisu/urls.rb', line 400 def psql { cmd: '--psql --update/--import', viewer: '', f_pth: @pwd_stub + '::' \ + @opt.fns \ + 'dbi psql', p_pth: @env.processing_path.postgresql + '/' \ + @md.fns \ + '.sql', fn: 'dbi psql', } end |
#qrcode ⇒ Object
493 494 495 496 497 498 499 500 501 |
# File 'lib/sisu/urls.rb', line 493 def qrcode { cmd: '--qrcode', viewer: @prog.web_browser, f_pth: @md.file.output_path.manifest.dir + '/' \ + @md.file.base_filename.manifest, fn: @fn[:qrcode], } end |
#report(x) ⇒ Object
113 114 115 116 117 118 119 120 121 |
# File 'lib/sisu/urls.rb', line 113 def report(x) SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], "[#{@opt.f_pth[:lng_is]}]", x[:cmd], x[:viewer] + ' ' \ + x[:f_pth] ).result end |
#report_info ⇒ Object
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 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/sisu/urls.rb', line 134 def report_info def dal { cmd: '--ao', p_pth: @env.processing_path.ao + '/' \ + @opt.fns + '.meta', fn: 'ao', } end def hash_digests { cmd: '--hash-digests (sha512/sha256/md5)', viewer: @prog.web_browser, f_pth: @md.file.output_path.hash_digest.dir + '/' \ + @md.file.base_filename.hash_digest, fn: @fn[:digest], } end def text def txt { cmd: '--txt', viewer: @prog.web_browser, f_pth: @md.file.output_path.txt.dir + '/' \ + @md.file.base_filename.txt, fn: @fn[:plain], } end def asciidoc { cmd: '--asciidoc', viewer: @prog.web_browser, f_pth: @md.file.output_path.asciidoc.dir + '/' \ + @md.file.base_filename.asciidoc, fn: @fn[:txt_asciidoc], } end def markdown { cmd: '--markdown', viewer: @prog.web_browser, f_pth: @md.file.output_path.markdown.dir + '/' \ + @md.file.base_filename.markdown, fn: @fn[:txt_markdown], } end def rst { cmd: '--rst', viewer: @prog.web_browser, f_pth: @md.file.output_path.rst.dir + '/' \ + @md.file.base_filename.rst, fn: @fn[:txt_rst], } end def textile { cmd: '--textile', viewer: @prog.web_browser, f_pth: @md.file.output_path.textile.dir + '/' \ + @md.file.base_filename.textile, fn: @fn[:txt_textile], } end def orgmode { cmd: '--orgmode', viewer: @prog.web_browser, f_pth: @md.file.output_path.orgmode.dir + '/' \ + @md.file.base_filename.orgmode, fn: @fn[:txt_orgmode], } end self end def html def seg { cmd: '--html-seg', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_seg.dir + '/' \ + @md.file.base_filename.html_segtoc, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:toc], } end def scroll { cmd: '--html-scroll', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_scroll.dir + '/' \ + @md.file.base_filename.html_scroll, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:doc], } end def concordance { cmd: '--concordance', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_concordance.dir + '/' \ + @md.file.base_filename.html_concordance, fn: @fn[:concordance], } end self end def xhtml def xhtml { cmd: '--xhtml', viewer: @prog.web_browser, f_pth: @md.file.output_path.xhtml.dir + '/' \ + @md.file.base_filename.xhtml, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:xhtml], } end def epub { cmd: '--epub', viewer: @prog.epub_viewer, f_pth: @md.file.output_path.epub.dir + '/' \ + @md.file.base_filename.epub, p_pth: @env.processing_path.epub + '/' \ + Ep[:d_oebps] + '/' \ + 'index.xhtml', fn: @fn[:epub], } end self end def xml def odt { cmd: '--odt (ODF:ODT)', viewer: @prog.odf_viewer, f_pth: @md.file.output_path.odt.dir + '/' \ + @md.file.base_filename.odt, p_pth: @env.processing_path.odf + '/' \ + @opt.fns + '/' \ + 'odt/content.xml', fn: @fn[:odf], } end def docbook { cmd: '--docbook', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_docbook_book.dir + '/' \ + @md.file.base_filename.xml_docbook_book, fn: @fn[:xml_docbook_book], } end def fictionbook { cmd: '--fictionbook', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_fictionbook.dir + '/' \ + @md.file.base_filename.xml_fictionbook, fn: @fn[:xml_fictionbook], } end def sax { cmd: '--xml-sax', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_sax.dir + '/' \ + @md.file.base_filename.xml_sax, fn: @fn[:sax], } end def dom { cmd: '--xml-dom', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_dom.dir + '/' \ + @md.file.base_filename.xml_dom, fn: @fn[:dom], } end def scaffold_sisu { cmd: '--xml-scaffold-sisu', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_scaffold_structure_sisu.dir + '/' \ + @md.file.base_filename.xml_scaffold_structure_sisu, fn: @fn[:xml_scaffold_structure_sisu], } end def scaffold_collapse { cmd: '--xml-scaffold-collapse', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_scaffold_structure_collapse.dir + '/' \ + @md.file.base_filename.xml_scaffold_structure_collapse, fn: @fn[:xml_scaffold_structure_collapse], } end self end def json { cmd: '--js (json)', viewer: @prog.web_browser, f_pth: @md.file.output_path.json.dir + '/' \ + @md.file.base_filename.json, fn: @fn[:json], } end def pdf def landscape { cmd: '--pdf (landscape)', viewer: @prog.pdf_viewer, f_pth: @md.file.output_path.pdf.dir + '/' \ + @md.file.base_filename.pdf_l \ + @md.papersize_array[0] + '.pdf', p_pth: @env.processing_path.tex + '/' \ + @opt.fns.gsub(/~/,'-') + '.' \ + @md.papersize_array[0] \ + '.landscape.tex', fn: @fn[:pdf_l], } end def portrait { cmd: '--pdf (portrait)', viewer: @prog.pdf_viewer, f_pth: @md.file.output_path.pdf.dir + '/' \ + @md.file.base_filename.pdf_p \ + @md.papersize_array[0] + '.pdf', p_pth: @env.processing_path.tex + '/' \ + @opt.fns.gsub(/~/,'-') + '.' \ + @md.papersize_array[0] \ + '.tex', fn: @fn[:pdf_p], } end self end def manpage { cmd: '--manpage', viewer: @prog.manpage_viewer, f_pth: @md.file.output_path.manpage.dir + '/' \ + @md.file.base_filename.manpage, fn: 'manpage', } end def texinfo { cmd: '--texinfo', viewer: '', f_pth: 'cd ' \ + @md.file.output_path.texinfo.dir + ' && ' \ + @env.program.texinfo + ' ' \ + @md.file.base_filename.info \ + '; cd -', fn: 'info', } end def db def psql { cmd: '--psql --update/--import', viewer: '', f_pth: @pwd_stub + '::' \ + @opt.fns \ + 'dbi psql', p_pth: @env.processing_path.postgresql + '/' \ + @md.fns \ + '.sql', fn: 'dbi psql', } end def sqlite { cmd: '--sqlite --update/--import', viewer: 'sqlite3 ', f_pth: @env.path.webserv + '/' \ + @md.opt.f_pth[:pth_stub] + '/' \ + 'sisu_sqlite.db', p_pth: @env.processing_path.sqlite + '/' \ + @md.fns \ + '.sql', fn: 'dbi sqlite3', } end def sqlite_discrete { cmd: '--sqlite', viewer: 'sqlite3 ', f_pth: @md.file.output_path.sqlite_discrete.dir + '/' \ + @md.file.base_filename.sqlite_discrete, p_pth: @env.processing_path.sqlite + '/' \ + @md.fns \ + '.sql', fn: 'dbi sqlite3', } end self end def po4a def po { cmd: '--po4a/--pot', viewer: @prog.web_browser, f_pth: @prog.text_editor + ' ' \ + @md.file.output_path.po.dir \ + '/' + y, fn: @fn[:pot], } end def pot { cmd: '--po4a/--pot', viewer: @prog.web_browser, f_pth: @prog.text_editor + ' ' \ + @md.file.output_path.pot.dir \ + '/' + y, fn: @fn[:pot], } end self end def source { cmd: '--source (sisu markup)', viewer: @prog.text_editor, f_pth: @md.file.output_path.src.dir + '/' \ + @opt.fno, p_pth: @md.file.output_path.src.dir + '/' \ + @opt.fno, fn: @opt.fno, } end def sisupod { cmd: '--sisupod', viewer: '', f_pth: @md.file.output_path.sisupod.dir + '/' \ + @opt.fno \ + '.txz', p_pth: @md.file.output_path.sisupod.dir + '/' \ + @opt.fno + '/' \ + 'sisupod/', fn: @fn[:sisupod], } end def ruby_profile { cmd: '--profile (ruby profiler)', fn: 'profile', } end def qrcode { cmd: '--qrcode', viewer: @prog.web_browser, f_pth: @md.file.output_path.manifest.dir + '/' \ + @md.file.base_filename.manifest, fn: @fn[:qrcode], } end def manifest { cmd: '--manifest', viewer: @prog.web_browser, f_pth: @md.file.output_path.manifest.dir + '/' \ + @md.file.base_filename.manifest, fn: @fn[:manifest], } end def sitemap { cmd: '--sitemap', viewer: @prog.web_browser, f_pth: @md.file.output_path.sitemaps.dir + '/' \ + @md.file.base_filename.sitemap, fn: @fn[:sitemap], } end self end |
#rst ⇒ Object
180 181 182 183 184 185 186 187 188 |
# File 'lib/sisu/urls.rb', line 180 def rst { cmd: '--rst', viewer: @prog.web_browser, f_pth: @md.file.output_path.rst.dir + '/' \ + @md.file.base_filename.rst, fn: @fn[:txt_rst], } end |
#ruby_profile ⇒ Object
487 488 489 490 491 492 |
# File 'lib/sisu/urls.rb', line 487 def ruby_profile { cmd: '--profile (ruby profiler)', fn: 'profile', } end |
#sax ⇒ Object
300 301 302 303 304 305 306 307 308 |
# File 'lib/sisu/urls.rb', line 300 def sax { cmd: '--xml-sax', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_sax.dir + '/' \ + @md.file.base_filename.xml_sax, fn: @fn[:sax], } end |
#scaffold_collapse ⇒ Object
327 328 329 330 331 332 333 334 335 |
# File 'lib/sisu/urls.rb', line 327 def scaffold_collapse { cmd: '--xml-scaffold-collapse', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_scaffold_structure_collapse.dir + '/' \ + @md.file.base_filename.xml_scaffold_structure_collapse, fn: @fn[:xml_scaffold_structure_collapse], } end |
#scaffold_sisu ⇒ Object
318 319 320 321 322 323 324 325 326 |
# File 'lib/sisu/urls.rb', line 318 def scaffold_sisu { cmd: '--xml-scaffold-sisu', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_scaffold_structure_sisu.dir + '/' \ + @md.file.base_filename.xml_scaffold_structure_sisu, fn: @fn[:xml_scaffold_structure_sisu], } end |
#scroll ⇒ Object
221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/sisu/urls.rb', line 221 def scroll { cmd: '--html-scroll', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_scroll.dir + '/' \ + @md.file.base_filename.html_scroll, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:doc], } end |
#seg ⇒ Object
210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/sisu/urls.rb', line 210 def seg { cmd: '--html-seg', viewer: @prog.web_browser, f_pth: @md.file.output_path.html_seg.dir + '/' \ + @md.file.base_filename.html_segtoc, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:toc], } end |
#show ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/sisu/urls.rb', line 112 def show def report(x) SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], "[#{@opt.f_pth[:lng_is]}]", x[:cmd], x[:viewer] + ' ' \ + x[:f_pth] ).result end def maintenance(x) if @opt.act[:maintenance][:set]==:on SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], "[#{@opt.f_pth[:lng_is]}]", x[:cmd], x[:p_pth] ).maintenance end end self end |
#sisupod ⇒ Object
474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/sisu/urls.rb', line 474 def sisupod { cmd: '--sisupod', viewer: '', f_pth: @md.file.output_path.sisupod.dir + '/' \ + @opt.fno \ + '.txz', p_pth: @md.file.output_path.sisupod.dir + '/' \ + @opt.fno + '/' \ + 'sisupod/', fn: @fn[:sisupod], } end |
#sitemap ⇒ Object
511 512 513 514 515 516 517 518 519 |
# File 'lib/sisu/urls.rb', line 511 def sitemap { cmd: '--sitemap', viewer: @prog.web_browser, f_pth: @md.file.output_path.sitemaps.dir + '/' \ + @md.file.base_filename.sitemap, fn: @fn[:sitemap], } end |
#songsheet ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/sisu/urls.rb', line 100 def songsheet begin (@opt.act[:urls_all][:set]==:on) \ ? urls_all \ : (urls_select unless @opt.act[:quiet][:set]==:on) rescue SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure end end |
#source ⇒ Object
463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/sisu/urls.rb', line 463 def source { cmd: '--source (sisu markup)', viewer: @prog.text_editor, f_pth: @md.file.output_path.src.dir + '/' \ + @opt.fno, p_pth: @md.file.output_path.src.dir + '/' \ + @opt.fno, fn: @opt.fno, } end |
#sqlite ⇒ Object
413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/sisu/urls.rb', line 413 def sqlite { cmd: '--sqlite --update/--import', viewer: 'sqlite3 ', f_pth: @env.path.webserv + '/' \ + @md.opt.f_pth[:pth_stub] + '/' \ + 'sisu_sqlite.db', p_pth: @env.processing_path.sqlite + '/' \ + @md.fns \ + '.sql', fn: 'dbi sqlite3', } end |
#sqlite_discrete ⇒ Object
426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/sisu/urls.rb', line 426 def sqlite_discrete { cmd: '--sqlite', viewer: 'sqlite3 ', f_pth: @md.file.output_path.sqlite_discrete.dir + '/' \ + @md.file.base_filename.sqlite_discrete, p_pth: @env.processing_path.sqlite + '/' \ + @md.fns \ + '.sql', fn: 'dbi sqlite3', } end |
#texinfo ⇒ Object
387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/sisu/urls.rb', line 387 def texinfo { cmd: '--texinfo', viewer: '', f_pth: 'cd ' \ + @md.file.output_path.texinfo.dir + ' && ' \ + @env.program.texinfo + ' ' \ + @md.file.base_filename.info \ + '; cd -', fn: 'info', } end |
#text ⇒ Object
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 |
# File 'lib/sisu/urls.rb', line 152 def text def txt { cmd: '--txt', viewer: @prog.web_browser, f_pth: @md.file.output_path.txt.dir + '/' \ + @md.file.base_filename.txt, fn: @fn[:plain], } end def asciidoc { cmd: '--asciidoc', viewer: @prog.web_browser, f_pth: @md.file.output_path.asciidoc.dir + '/' \ + @md.file.base_filename.asciidoc, fn: @fn[:txt_asciidoc], } end def markdown { cmd: '--markdown', viewer: @prog.web_browser, f_pth: @md.file.output_path.markdown.dir + '/' \ + @md.file.base_filename.markdown, fn: @fn[:txt_markdown], } end def rst { cmd: '--rst', viewer: @prog.web_browser, f_pth: @md.file.output_path.rst.dir + '/' \ + @md.file.base_filename.rst, fn: @fn[:txt_rst], } end def textile { cmd: '--textile', viewer: @prog.web_browser, f_pth: @md.file.output_path.textile.dir + '/' \ + @md.file.base_filename.textile, fn: @fn[:txt_textile], } end def orgmode { cmd: '--orgmode', viewer: @prog.web_browser, f_pth: @md.file.output_path.orgmode.dir + '/' \ + @md.file.base_filename.orgmode, fn: @fn[:txt_orgmode], } end self end |
#textile ⇒ Object
189 190 191 192 193 194 195 196 197 |
# File 'lib/sisu/urls.rb', line 189 def textile { cmd: '--textile', viewer: @prog.web_browser, f_pth: @md.file.output_path.textile.dir + '/' \ + @md.file.base_filename.textile, fn: @fn[:txt_textile], } end |
#txt ⇒ Object
153 154 155 156 157 158 159 160 161 |
# File 'lib/sisu/urls.rb', line 153 def txt { cmd: '--txt', viewer: @prog.web_browser, f_pth: @md.file.output_path.txt.dir + '/' \ + @md.file.base_filename.txt, fn: @fn[:plain], } end |
#urls_all ⇒ Object
697 698 699 700 701 702 703 704 |
# File 'lib/sisu/urls.rb', line 697 def urls_all i="(output manifest) [#{@opt.f_pth[:lng_is]}] #{@env.url.output_tell}/#{@fnb}/sisu_manifest.html" SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], 'URLs', i ).grey_title_hi end |
#urls_select ⇒ Object
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 |
# File 'lib/sisu/urls.rb', line 522 def urls_select unless @opt.act[:quiet][:set]==:on i1='[' + @opt.f_pth[:lng_is] + ']' i2='file://' \ + @md.file.output_path.manifest.dir + '/' \ + @md.file.base_filename.manifest (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) \ ? SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], 'URLs' ).green_title_hi : SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], 'URL (output manifest)', i1, i2 ).grey_title_grey_blue if (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], i1, i2, ).flow end end m=/.+\/(?:src\/)?(\S+)/im @pwd_stub="#{@env.url.output_tell}"[m,1] unless @opt.act[:quiet][:set]==:on if @opt.fns =~ @m_regular if (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) if @opt.act[:txt][:set]==:on show.report(report_info.text.txt) #show.maintenance(report_info.text.txt) end if @opt.act[:txt_textile][:set]==:on show.report(report_info.text.textile) #show.maintenance(report_info.text.textile) end if @opt.act[:txt_asciidoc][:set]==:on show.report(report_info.text.asciidoc) #show.maintenance(report_info.text.asciidoc) end if @opt.act[:txt_markdown][:set]==:on show.report(report_info.text.markdown) #show.maintenance(report_info.text.markdown) end if @opt.act[:txt_rst][:set]==:on show.report(report_info.text.rst) #show.maintenance(report_info.text.rst) end if @opt.act[:txt_orgmode][:set]==:on show.report(report_info.text.orgmode) #show.maintenance(report_info.text.orgmode) end if (@opt.act[:html][:set]==:on \ or @opt.act[:html_scroll][:set]==:on \ or @opt.act[:html_seg][:set]==:on) if @opt.act[:html_scroll][:set]==:on show.report(report_info.html.scroll) show.maintenance(report_info.html.scroll) end if @opt.act[:html_seg][:set]==:on show.report(report_info.html.seg) show.maintenance(report_info.html.seg) end end if @opt.act[:concordance][:set]==:on show.report(report_info.html.concordance) #show.maintenance(report_info.html.concordance) end if @opt.act[:xhtml][:set]==:on show.report(report_info.xhtml.xhtml) show.maintenance(report_info.xhtml.xhtml) end if @opt.act[:epub][:set]==:on show.report(report_info.xhtml.epub) show.maintenance(report_info.xhtml.epub) end if @opt.act[:odt][:set]==:on show.report(report_info.xml.odt) show.maintenance(report_info.xml.odt) end if @opt.act[:xml_dom][:set]==:on show.report(report_info.xml.dom) #show.maintenance(report_info.xml.dom) end if @opt.act[:xml_sax][:set]==:on show.report(report_info.xml.sax) #show.maintenance(report_info.xml.sax) end if @opt.act[:xml_docbook_book][:set]==:on show.report(report_info.xml.docbook) #show.maintenance(report_info.xml.docbook) end if @opt.act[:xml_fictionbook][:set]==:on show.report(report_info.xml.fictionbook) #show.maintenance(report_info.xml.fictionbook) end if @opt.act[:xml_scaffold_structure_sisu][:set]==:on show.report(report_info.xml.scaffold_structure_sisu) #show.maintenance(report_info.xml.scaffold_structure_sisu) end if @opt.act[:xml_scaffold_structure_collapse][:set]==:on show.report(report_info.xml.scaffold_collapse) #show.maintenance(report_info.xml.scaffold_collapse) end if @opt.act[:json][:set]==:on show.report(report_info.json) #show.maintenance(report_info.json) end if (@opt.act[:pdf][:set]==:on \ or @opt.act[:pdf_p][:set]==:on \ or @opt.act[:pdf_l][:set]==:on) if @opt.act[:pdf_p][:set]==:on show.report(report_info.pdf.portrait) show.maintenance(report_info.pdf.portrait) end if @opt.act[:pdf_l][:set]==:on show.report(report_info.pdf.landscape) show.maintenance(report_info.pdf.landscape) end end if @opt.act[:psql][:set]==:on show.report(report_info.db.psql) show.maintenance(report_info.db.psql) end if @opt.act[:sqlite_discrete][:set]==:on show.report(report_info.db.sqlite_discrete) show.maintenance(report_info.db.sqlite_discrete) end if @opt.act[:sqlite][:set]==:on show.report(report_info.db.sqlite) show.maintenance(report_info.db.sqlite) end if @opt.act[:texinfo][:set]==:on show.report(report_info.texinfo) #show.maintenance(report_info.texinfo) end if @opt.act[:manpage][:set]==:on show.report(report_info.manpage) #show.maintenance(report_info.manpage) end if @opt.act[:hash_digests][:set]==:on show.report(report_info.hash_digests) #show.maintenance(report_info.hash_digests) end if @opt.act[:po4a_shelf][:set]==:on #if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/ #else #end end if @opt.act[:share_source][:set]==:on show.report(report_info.source) show.maintenance(report_info.source) end if @opt.act[:sisupod][:set]==:on show.report(report_info.sisupod) show.maintenance(report_info.sisupod) end if @opt.act[:qrcode][:set]==:on show.report(report_info.qrcode) #show.maintenance(report_info.qrcode) end if @opt.act[:manifest][:set]==:on show.report(report_info.manifest) show.maintenance(report_info.manifest) end end end end end |
#xhtml ⇒ Object
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/sisu/urls.rb', line 243 def xhtml def xhtml { cmd: '--xhtml', viewer: @prog.web_browser, f_pth: @md.file.output_path.xhtml.dir + '/' \ + @md.file.base_filename.xhtml, p_pth: @env.processing_path.tune + '/' \ + @md.fns + '.tune', fn: @fn[:xhtml], } end def epub { cmd: '--epub', viewer: @prog.epub_viewer, f_pth: @md.file.output_path.epub.dir + '/' \ + @md.file.base_filename.epub, p_pth: @env.processing_path.epub + '/' \ + Ep[:d_oebps] + '/' \ + 'index.xhtml', fn: @fn[:epub], } end self end |
#xml ⇒ Object
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/sisu/urls.rb', line 269 def xml def odt { cmd: '--odt (ODF:ODT)', viewer: @prog.odf_viewer, f_pth: @md.file.output_path.odt.dir + '/' \ + @md.file.base_filename.odt, p_pth: @env.processing_path.odf + '/' \ + @opt.fns + '/' \ + 'odt/content.xml', fn: @fn[:odf], } end def docbook { cmd: '--docbook', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_docbook_book.dir + '/' \ + @md.file.base_filename.xml_docbook_book, fn: @fn[:xml_docbook_book], } end def fictionbook { cmd: '--fictionbook', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_fictionbook.dir + '/' \ + @md.file.base_filename.xml_fictionbook, fn: @fn[:xml_fictionbook], } end def sax { cmd: '--xml-sax', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_sax.dir + '/' \ + @md.file.base_filename.xml_sax, fn: @fn[:sax], } end def dom { cmd: '--xml-dom', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_dom.dir + '/' \ + @md.file.base_filename.xml_dom, fn: @fn[:dom], } end def scaffold_sisu { cmd: '--xml-scaffold-sisu', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_scaffold_structure_sisu.dir + '/' \ + @md.file.base_filename.xml_scaffold_structure_sisu, fn: @fn[:xml_scaffold_structure_sisu], } end def scaffold_collapse { cmd: '--xml-scaffold-collapse', viewer: @prog.web_browser, f_pth: @md.file.output_path.xml_scaffold_structure_collapse.dir + '/' \ + @md.file.base_filename.xml_scaffold_structure_collapse, fn: @fn[:xml_scaffold_structure_collapse], } end self end |