Class: SiSU_Urls::OutputUrls

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/urls.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opt) ⇒ OutputUrls

Returns a new instance of OutputUrls.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/sisu/urls.rb', line 80

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

#actObject (readonly)

Returns the value of attribute act.



79
80
81
# File 'lib/sisu/urls.rb', line 79

def act
  @act
end

#dirObject (readonly)

Returns the value of attribute dir.



79
80
81
# File 'lib/sisu/urls.rb', line 79

def dir
  @dir
end

#fnbObject (readonly)

Returns the value of attribute fnb.



79
80
81
# File 'lib/sisu/urls.rb', line 79

def fnb
  @fnb
end

#fnsObject (readonly)

Returns the value of attribute fns.



79
80
81
# File 'lib/sisu/urls.rb', line 79

def fns
  @fns
end

#m_regularObject (readonly)

Returns the value of attribute m_regular.



79
80
81
# File 'lib/sisu/urls.rb', line 79

def m_regular
  @m_regular
end

#uObject (readonly)

Returns the value of attribute u.



79
80
81
# File 'lib/sisu/urls.rb', line 79

def u
  @u
end

Instance Method Details

#asciidocObject



164
165
166
167
168
169
170
171
172
# File 'lib/sisu/urls.rb', line 164

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

#concordanceObject



234
235
236
237
238
239
240
241
242
# File 'lib/sisu/urls.rb', line 234

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

#dalObject



137
138
139
140
141
142
143
144
# File 'lib/sisu/urls.rb', line 137

def dal
  {
    cmd: '--ao',
    p_pth: @env.processing_path.ao + '/' \
    + @opt.fns + '.meta',
    fn: 'ao',
   }
end

#dbObject



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
# File 'lib/sisu/urls.rb', line 392

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

#docbookObject



284
285
286
287
288
289
290
291
292
# File 'lib/sisu/urls.rb', line 284

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

#domObject



311
312
313
314
315
316
317
318
319
# File 'lib/sisu/urls.rb', line 311

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

#epubObject



257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/sisu/urls.rb', line 257

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

#fictionbookObject



293
294
295
296
297
298
299
300
301
# File 'lib/sisu/urls.rb', line 293

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_digestsObject



145
146
147
148
149
150
151
152
153
# File 'lib/sisu/urls.rb', line 145

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

#htmlObject



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
# File 'lib/sisu/urls.rb', line 211

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

#landscapeObject



341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/sisu/urls.rb', line 341

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



124
125
126
127
128
129
130
131
132
133
# File 'lib/sisu/urls.rb', line 124

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

#manifestObject



495
496
497
498
499
500
501
502
503
# File 'lib/sisu/urls.rb', line 495

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

#manpageObject



371
372
373
374
375
376
377
378
379
# File 'lib/sisu/urls.rb', line 371

def manpage
  {
    cmd: '--manpage',
    viewer: @prog.manpage_viewer,
    f_pth: @md.file.output_path.manpage.dir + '/' \
    + @md.file.base_filename.manpage,
    fn: 'manpage',
   }
end

#markdownObject



173
174
175
176
177
178
179
180
181
# File 'lib/sisu/urls.rb', line 173

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

#odtObject



272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/sisu/urls.rb', line 272

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

#orgmodeObject



200
201
202
203
204
205
206
207
208
# File 'lib/sisu/urls.rb', line 200

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

#pdfObject



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
# File 'lib/sisu/urls.rb', line 340

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

#poObject



434
435
436
437
438
439
440
441
442
443
# File 'lib/sisu/urls.rb', line 434

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

#po4aObject



433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/sisu/urls.rb', line 433

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

#portraitObject



355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/sisu/urls.rb', line 355

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

#potObject



444
445
446
447
448
449
450
451
452
453
# File 'lib/sisu/urls.rb', line 444

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

#psqlObject



393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/sisu/urls.rb', line 393

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

#qrcodeObject



486
487
488
489
490
491
492
493
494
# File 'lib/sisu/urls.rb', line 486

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



115
116
117
118
119
120
121
122
123
# File 'lib/sisu/urls.rb', line 115

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_infoObject



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
# File 'lib/sisu/urls.rb', line 136

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 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

#rstObject



182
183
184
185
186
187
188
189
190
# File 'lib/sisu/urls.rb', line 182

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_profileObject



480
481
482
483
484
485
# File 'lib/sisu/urls.rb', line 480

def ruby_profile
  {
    cmd: '--profile (ruby profiler)',
    fn: 'profile',
   }
end

#saxObject



302
303
304
305
306
307
308
309
310
# File 'lib/sisu/urls.rb', line 302

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_collapseObject



329
330
331
332
333
334
335
336
337
# File 'lib/sisu/urls.rb', line 329

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_sisuObject



320
321
322
323
324
325
326
327
328
# File 'lib/sisu/urls.rb', line 320

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

#scrollObject



223
224
225
226
227
228
229
230
231
232
233
# File 'lib/sisu/urls.rb', line 223

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

#segObject



212
213
214
215
216
217
218
219
220
221
222
# File 'lib/sisu/urls.rb', line 212

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

#showObject



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/sisu/urls.rb', line 114

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

#sisupodObject



467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/sisu/urls.rb', line 467

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

#sitemapObject



504
505
506
507
508
509
510
511
512
# File 'lib/sisu/urls.rb', line 504

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

#songsheetObject



102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/sisu/urls.rb', line 102

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

#sourceObject



456
457
458
459
460
461
462
463
464
465
466
# File 'lib/sisu/urls.rb', line 456

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

#sqliteObject



406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/sisu/urls.rb', line 406

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_discreteObject



419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/sisu/urls.rb', line 419

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

#texinfoObject



380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/sisu/urls.rb', line 380

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

#textObject



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
# File 'lib/sisu/urls.rb', line 154

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

#textileObject



191
192
193
194
195
196
197
198
199
# File 'lib/sisu/urls.rb', line 191

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

#txtObject



155
156
157
158
159
160
161
162
163
# File 'lib/sisu/urls.rb', line 155

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_allObject



686
687
688
689
690
691
692
693
# File 'lib/sisu/urls.rb', line 686

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_selectObject



515
516
517
518
519
520
521
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
# File 'lib/sisu/urls.rb', line 515

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[: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

#xhtmlObject



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
# File 'lib/sisu/urls.rb', line 245

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

#xmlObject



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
# File 'lib/sisu/urls.rb', line 271

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