class SiSU_File_Op::FileOp

Public Class Methods

new(md,fno='') click to toggle source

todo unify with CreateFile

# File lib/sisu/se_file_op.rb, line 182
def initialize(md,fno='')
  begin
    @md,@fno=md,fno
    @env=SiSU_Env::InfoEnv.new(@md.fns)
  rescue
    SiSU_Screen::Ansi.new(md.opt.selections.str,$!,$@).rescue do
      __LINE__.to_s + ':' + __FILE__
    end
  ensure
  end
end

Public Instance Methods

ab() click to toggle source
# File lib/sisu/se_file_op.rb, line 1533
def ab
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  elsif output_dir_structure.by_language_code?
    output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
  else
    output_path.base.dir + '/' + @ft
  end
end
ab_pod() click to toggle source
# File lib/sisu/se_file_op.rb, line 1558
def ab_pod
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  else
    output_path.base.dir + '/' + @ft
  end
end
ab_src() click to toggle source
# File lib/sisu/se_file_op.rb, line 1544
def ab_src
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  else
    output_path.base.dir + '/' \
      + @ft + '/' \
      + @md.opt.fng + '/' \
      + Gt[:sisupod] + '/' \
      + Gt[:doc] + '/' \
      + @md.opt.lng
  end
end
abc() click to toggle source
# File lib/sisu/se_file_op.rb, line 1520
def abc
  if output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
  elsif output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  elsif output_dir_structure.by_language_code?
    output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
  elsif output_dir_structure.by_filetype?
    output_path.base.dir + '/' + @ft
  else
    output_path.base.dir + '/' + @md.fnb
  end
end
asciidoc() click to toggle source
# File lib/sisu/se_file_op.rb, line 330
def asciidoc
  path=output_path.asciidoc.dir
  make_path(path)
  fn=base_filename.asciidoc
  make_file(path,fn)
end
base() click to toggle source
# File lib/sisu/se_file_op.rb, line 290
def base
  FileUtils::mkdir_p(output_path.base.dir) \
    unless FileTest.directory?(output_path.base.dir)
end
base_filename() click to toggle source
# File lib/sisu/se_file_op.rb, line 887
def base_filename
  def i18n(f)
    f=default_hash.merge(f)
    f[:lng] ||=@md.lang_code_insert
    f[:fn] + f[:lng] + f[:ft]
  end
  def default_hash
    {
      fn: @md.fnb,
      lng: @md.lang_code_insert,
    }
  end
  def default_hash_build(fh,sfx)
    if fh.is_a?(Hash)
      fh[:fn] ||=@md.fnb
      fh[:lng] ||= @md.lang_code_insert
      fh[:ft]=sfx
      fh
    else
      {
        fn: @md.fnb,
        lng: @md.lang_code_insert,
        ft: sfx,
      }
    end
  end
  def lang_code?(lng)
    (output_dir_structure.by_language_code?) \
    ? ''
    : (lng ||=@md.lang_code_insert)
  end
  def txt(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def textile(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_textile])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def asciidoc(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_asciidoc])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def markdown(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_markdown])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def rst(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_rst])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def orgmode(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt_orgmode])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'plain',
        ft: fh[:ft],
        lng: fh[:lng],
       }
     else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def html_scroll(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def html_seg_index(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: 'index',
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def html_segtoc(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fnh=if output_dir_structure.dump_or_redirect?
      {
        fn: fh[:fn] + '.toc',
        ft: fh[:ft],
      }
    else
      {
        fn: 'toc',
        ft: fh[:ft],
        lng: lang_code?(fh[:lng]),
      }
    end
    i18n(fnh)
  end
  def html_seg(fh)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def html_book_index(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: 'book_index',
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def html_concordance(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.dump_or_redirect?
      {
        fn: 'concordance',
        ft: fh[:ft],
      }
    else
      {
        fn: 'concordance',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xhtml(fh=nil)
    fh=default_hash_build(fh,Sfx[:xhtml])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def epub(fh=nil)
    fh=default_hash_build(fh,Sfx[:epub])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def odt(fh=nil)
    fh=default_hash_build(fh,Sfx[:odt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'opendocument',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_sax(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_sax])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_dom(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_dom])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_docbook_book(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_docbook_book])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_fictionbook(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_fictionbook])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_scaffold_structure_sisu(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_scaffold_structure_sisu])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def xml_scaffold_structure_collapse(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml_scaffold_structure_collapse])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def json(fh=nil)
    fh=default_hash_build(fh,Sfx[:json])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'scroll',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def pdf_p(fh=nil)
    fh=default_hash_build(fh,Sfx[:pdf])
    fh[:lng]=lang_code?(fh[:lng])
    if output_dir_structure.by_filename?
      'portrait' + fh[:lng] + '.'
    else
      fh[:fn] + '.portrait' + fh[:lng] + '.'
    end
  end
  def pdf_l(fh=nil)
    fh=default_hash_build(fh,Sfx[:pdf])
    fh[:lng]=lang_code?(fh[:lng])
    if output_dir_structure.by_filename?
      'landscape' + fh[:lng] + '.'
    else
      fh[:fn] + '.landscape' + fh[:lng] + '.'
    end
  end
  def pdf_p_a4(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_a4]
  end
  def pdf_p_a5(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_a5]
  end
  def pdf_p_b5(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_b5]
  end
  def pdf_p_letter(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_letter]
  end
  def pdf_p_legal(fh=nil)
    pdf_p(fh) + @md.fn[:pdf_p_legal]
  end
  def pdf_l_a4(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_a4]
  end
  def pdf_l_a5(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_a5]
  end
  def pdf_l_b5(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_b5]
  end
  def pdf_l_letter(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_letter]
  end
  def pdf_l_legal(fh=nil)
    pdf_l(fh) + @md.fn[:pdf_l_legal]
  end
  def manpage(fh=nil)
    fh=default_hash_build(fh,Sfx[:manpage])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def info(fh=nil)
    fh=default_hash_build(fh,Sfx[:info])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def texinfo(fh=nil)
    fh=default_hash_build(fh,Sfx[:texinfo])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def sqlite_discrete(fh=nil)
    fh=default_hash_build(fh,Sfx[:sql])
    fh[:lng]=lang_code?(fh[:lng])
    fnh={
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
    i18n(fnh)
  end
  def hash_digest(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_language_code?
      {
        fn: fh[:fn] + '.hash_digest',
        ft: fh[:ft],
      }
    elsif output_dir_structure.by_filetype?
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: 'digest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def sitemap(fh=nil)
    fh=default_hash_build(fh,Sfx[:xml])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_language_code?
      {
        fn: fh[:fn] + '.sitemap',
        ft: fh[:ft],
      }
    elsif output_dir_structure.by_filetype?
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: 'sitemap',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def qrcode_title(fh=nil)
    fh=default_hash_build(fh,'.title.png')
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def qrcode_md #check name below
    fh=default_hash_build(fh,'.md.png')
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def manifest_txt(fh=nil)
    fh=default_hash_build(fh,Sfx[:txt])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def manifest(fh=nil)
    fh=default_hash_build(fh,Sfx[:html])
    fh[:lng]=lang_code?(fh[:lng])
    fnh=if output_dir_structure.dump_or_redirect?
      {
        fn: fh[:fn] + '.manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    elsif output_dir_structure.by_filename?
      {
        fn: 'sisu_manifest',
        ft: fh[:ft],
        lng: fh[:lng],
      }
    else
      {
        fn: fh[:fn],
        ft: fh[:ft],
        lng: fh[:lng],
      }
    end
    i18n(fnh)
  end
  def src
    @md.fno
  end
  def po4a_cfg
    'po4a.cfg'
  end
  def po #check
    (@fno.empty?) \
    ? (@md.fn[:po])
    : (@fno + '.po')
  end
  def pot
    (@fno.empty?) \
    ? (@md.fn[:pot])
    : (@fno + '.pot')
  end
  def po4a_sst #check
    @fno
  end
  def sisupod
    (@md.fns =~/\.ssm\.sst$/) \
    ? @md.fns.gsub(/(?:\~\S{2,3})?\.ssm\.sst$/,'.ssm.txz')
    : @md.fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1.txz')
  end
  self
end
css() click to toggle source
# File lib/sisu/se_file_op.rb, line 294
def css
  FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
    unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
end
default_hash() click to toggle source
# File lib/sisu/se_file_op.rb, line 893
def default_hash
  {
    fn: @md.fnb,
    lng: @md.lang_code_insert,
  }
end
default_hash_build(fh,sfx) click to toggle source
# File lib/sisu/se_file_op.rb, line 899
def default_hash_build(fh,sfx)
  if fh.is_a?(Hash)
    fh[:fn] ||=@md.fnb
    fh[:lng] ||= @md.lang_code_insert
    fh[:ft]=sfx
    fh
  else
    {
      fn: @md.fnb,
      lng: @md.lang_code_insert,
      ft: sfx,
    }
  end
end
default_output_css() click to toggle source
# File lib/sisu/se_file_op.rb, line 245
def default_output_css
  if (@md.opt.opt_act[:dump][:bool] \
  &&  @md.opt.opt_act[:dump][:inst]) \
  || (@md.opt.opt_act[:redirect][:bool] \
  &&  @md.opt.opt_act[:redirect][:inst])
    './'
  elsif output_dir_structure.by_language_code?
    '../../'
  elsif output_dir_structure.by_filetype?
    '../'
  else
    '../'
  end
end
dir() click to toggle source
# File lib/sisu/se_file_op.rb, line 497
def dir
  output_path.txt.dir + '/' \
  + base_filename.txt
end
epub() click to toggle source
# File lib/sisu/se_file_op.rb, line 298
def epub
  path=output_path.epub.dir
  make_path(path)
end
ft() click to toggle source
# File lib/sisu/se_file_op.rb, line 1760
def ft
  Gt[:src]
end
harvest() click to toggle source
# File lib/sisu/se_file_op.rb, line 2505
def harvest
  def ft
    'site_metadata'
  end
  def dir
    set_path(ft).dir.ab
  end
  def url
    set_path(ft).url.ab
  end
  def rel
    set_path(ft).rel.ab
  end
  def rcp
    set_path(ft).rcp.ab
  end
  def rel_sm
    if output_dir_structure.by_language_code?
      ''
    elsif output_dir_structure.by_filetype?
      ''
    else
      ''
    end
  end
  self
end
hash_digest() click to toggle source
# File lib/sisu/se_file_op.rb, line 445
def hash_digest
  path=output_path.hash_digest.dir
  make_path(path)
  fn=base_filename.hash_digest
  make_file(path,fn)
end
html() click to toggle source
# File lib/sisu/se_file_op.rb, line 2089
def html
  def ft
    'html'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).url.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    if output_dir_structure.by_language_code?
      '../../_sisu/image'
    elsif output_dir_structure.by_filetype?
      '../_sisu/image'
    else
      '../_sisu/image'
    end
  end
  self
end
html_book_index() click to toggle source
# File lib/sisu/se_file_op.rb, line 595
def html_book_index
  def dir
    output_path.html_seg.dir + '/' \
    + base_filename.html_book_index
  end
  def rel
    output_path.html_seg.rel + '/' \
    + base_filename.html_book_index
  end
  self
end
html_concordance() click to toggle source
# File lib/sisu/se_file_op.rb, line 606
def html_concordance
  def dir
    output_path.html_seg.dir + '/' \
    + base_filename.html_concordance
  end
  def rel
    output_path.html_seg.rel + '/' \
    + base_filename.html_concordance
  end
  self
end
html_scroll() click to toggle source
# File lib/sisu/se_file_op.rb, line 354
def html_scroll
  pth=output_path.html.dir
  make_path(pth)
  p_fn=place_file.html_scroll.dir
  File.new(p_fn,'w+')
end
html_scroll_1() click to toggle source
# File lib/sisu/se_file_op.rb, line 227
def html_scroll_1
  if output_dir_structure.by_language_code?
    '../'
  elsif output_dir_structure.by_filetype?
    '../'
  else
    './'
  end
end
html_scroll_2() click to toggle source
# File lib/sisu/se_file_op.rb, line 209
def html_scroll_2
  if output_dir_structure.by_language_code?
    '../../'
  elsif output_dir_structure.by_filetype?
    '../'
  else
    '../'
  end
end
html_scroll_css() click to toggle source
# File lib/sisu/se_file_op.rb, line 259
def html_scroll_css
  default_output_css
end
html_seg(fh) click to toggle source
# File lib/sisu/se_file_op.rb, line 1070
def html_seg(fh)
  fh=default_hash_build(fh,Sfx[:html])
  fh[:lng]=lang_code?(fh[:lng])
  fnh={
    fn: fh[:fn],
    ft: fh[:ft],
    lng: fh[:lng],
  }
  i18n(fnh)
end
html_seg_1() click to toggle source
# File lib/sisu/se_file_op.rb, line 236
def html_seg_1
  if output_dir_structure.by_language_code?
    '../../'
  elsif output_dir_structure.by_filetype?
    '../../'
  else
    './'
  end
end
html_seg_2() click to toggle source
# File lib/sisu/se_file_op.rb, line 218
def html_seg_2
  if output_dir_structure.by_language_code?
    '../../../'
  elsif output_dir_structure.by_filetype?
    '../../'
  else
    '../'
  end
end
html_seg_css() click to toggle source
# File lib/sisu/se_file_op.rb, line 268
def html_seg_css
  if output_dir_structure.by_language_code?
    '../../../'
  elsif output_dir_structure.by_filetype?
    '../../'
  else
    '../'
  end
end
html_seg_index() click to toggle source
# File lib/sisu/se_file_op.rb, line 360
def html_seg_index
  pth=((output_dir_structure.by_filename?) \
  || (output_dir_structure.dump?)) \
  ? "#{output_path.html.dir}"
  : "#{output_path.html.dir}/#{@md.fnb}"
  make_path(pth)
  p_fn=place_file.html_seg_index.dir
  File.new(p_fn,'w+')
end
html_segtoc() click to toggle source
# File lib/sisu/se_file_op.rb, line 369
def html_segtoc
  pth=((output_dir_structure.by_filename?) \
  || (output_dir_structure.dump?) \
  || (output_dir_structure.redirect?)) \
  ? "#{output_path.html.dir}"
  : "#{output_path.html.dir}/#{@md.fnb}"
  make_path(pth)
  p_fn=place_file.html_segtoc.dir
  File.new(p_fn,'w+')
end
i18n(f) click to toggle source
# File lib/sisu/se_file_op.rb, line 888
def i18n(f)
  f=default_hash.merge(f)
  f[:lng] ||=@md.lang_code_insert
  f[:fn] + f[:lng] + f[:ft]
end
images() click to toggle source
# File lib/sisu/se_file_op.rb, line 2626
def images
  @d='_sisu/image'
  def dir
    output_path.base.dir + '/' + @d
  end
  def url
    output_path.base.url + '/' + @d
  end
  def rel
    @d
    #output_path.base.rel + '/' + @d
  end
  def rcp
    output_path.stub.rcp + '/' + @d
  end
  self
end
images_external() click to toggle source
# File lib/sisu/se_file_op.rb, line 2643
def images_external
  @d='_sisu/image_external'
  def dir
    output_path.base.dir + '/' + @d
  end
  def url
    output_path.base.url + '/' + @d
  end
  def rel
    output_path.base.rel + '/' + @d
  end
  def rcp
    output_path.base.rcp + '/' + @d
  end
  self
end
info() click to toggle source
# File lib/sisu/se_file_op.rb, line 439
def info
  path=output_path.texinfo.dir
  make_path(path)
  fn=base_filename.info
  make_file(path,fn)
end
json() click to toggle source
# File lib/sisu/se_file_op.rb, line 421
def json
  path=output_path.json.dir
  make_path(path)
  fn=base_filename.json
  make_file(path,fn)
end
lang_code?(lng) click to toggle source
# File lib/sisu/se_file_op.rb, line 913
def lang_code?(lng)
  (output_dir_structure.by_language_code?) \
  ? ''
  : (lng ||=@md.lang_code_insert)
end
manifest() click to toggle source
# File lib/sisu/se_file_op.rb, line 457
def manifest
  path=output_path.manifest.dir
  make_path(path)
  fn=base_filename.manifest
  make_file(path,fn)
end
manifest_css() click to toggle source
# File lib/sisu/se_file_op.rb, line 277
def manifest_css
  if output_dir_structure.by_language_code?
    '../../_sisu/css'
  elsif output_dir_structure.by_filetype?
    ''
  else
    '../'
  end
end
manifest_txt() click to toggle source
# File lib/sisu/se_file_op.rb, line 463
def manifest_txt
  path=output_path.manifest.dir
  make_path(path)
  fn=base_filename.manifest_txt
  make_file(path,fn)
end
manpage() click to toggle source
# File lib/sisu/se_file_op.rb, line 427
def manpage
  path=output_path.manpage.dir
  make_path(path)
  fn=base_filename.manpage
  make_file(path,fn)
end
markdown() click to toggle source
# File lib/sisu/se_file_op.rb, line 336
def markdown
  path=output_path.markdown.dir
  make_path(path)
  fn=base_filename.markdown
  make_file(path,fn)
end
md_harvest() click to toggle source
# File lib/sisu/se_file_op.rb, line 1886
def md_harvest
  manifest
  self
end
mkdir() click to toggle source
# File lib/sisu/se_file_op.rb, line 288
def mkdir
  def output
    def base
      FileUtils::mkdir_p(output_path.base.dir) \
        unless FileTest.directory?(output_path.base.dir)
    end
    def css
      FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
        unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
    end
    def epub
      path=output_path.epub.dir
      make_path(path)
    end
    self
  end
  self
end
mkdir_initialize() click to toggle source
# File lib/sisu/se_file_op.rb, line 196
def mkdir_initialize                # not used but consider using
  FileUtils::mkdir_p(output_path.base.dir) \
    unless FileTest.directory?(output_path.base.dir)
  FileUtils::mkdir_p("#{output_path.base.dir}/#{@md.fnb}") \
    unless FileTest.directory?("#{output_path.base.dir}/#{@md.fnb}")
  FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
    unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
  FileUtils::mkdir_p(@env.processing_path.ao) \
    unless FileTest.directory?(@env.processing_path.ao)
  FileUtils::mkdir_p(@env.processing_path.tune) \
    unless FileTest.directory?(@env.processing_path.tune)
end
mkfile() click to toggle source
# File lib/sisu/se_file_op.rb, line 306
def mkfile #consider using more
  path="#{output_path.base.dir}/#{@md.fnb}"
  make_path(path)
  filename=@fno
  make_file(path,filename)
end
mkfile_pwd() click to toggle source
# File lib/sisu/se_file_op.rb, line 312
def mkfile_pwd
  path=Dir.pwd
  filename=@fno
  make_file(path,filename)
end
odt() click to toggle source
# File lib/sisu/se_file_op.rb, line 617
def odt
  def dir
    output_path.odt.dir + '/' \
    + base_filename.odt
  end
  def rel
    output_path.odt.rel + '/' \
    + base_filename.odt
  end
  self
end
orgmode() click to toggle source
# File lib/sisu/se_file_op.rb, line 348
def orgmode
  path=output_path.orgmode.dir
  make_path(path)
  fn=base_filename.orgmode
  make_file(path,fn)
end
output() click to toggle source
# File lib/sisu/se_file_op.rb, line 289
def output
  def base
    FileUtils::mkdir_p(output_path.base.dir) \
      unless FileTest.directory?(output_path.base.dir)
  end
  def css
    FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") \
      unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
  end
  def epub
    path=output_path.epub.dir
    make_path(path)
  end
  self
end
output_dir_structure() click to toggle source
# File lib/sisu/se_file_op.rb, line 193
def output_dir_structure
  SiSU_Env::ProcessingSettings.new(@md).output_dir_structure
end
output_path() click to toggle source
# File lib/sisu/se_file_op.rb, line 1685
def output_path
  def web_base
    def dir
      @env.path.webserv
    end
    def url
      #"#{@env.url.root}"
    end
    def rel
      '.'
    end
    def rcp
      '.'
    end
    self
  end
  def stub
    def dir
      @md.opt.f_pth[:pth_stub]
    end
    #def url
    #  "#{@env.url.root}"
    #end
    def rel
      './' + @md.opt.f_pth[:pth_stub]
    end
    def rcp
      @md.opt.f_pth[:pth_stub]
    end
    self
  end
  def webserver_path
    if output_dir_structure.dump?
      @md.opt.opt_act[:dump][:inst]
    elsif output_dir_structure.redirect?
      @md.opt.opt_act[:redirect][:inst]
    else
      @env.path.webserv
    end
  end
  def base
    def dir
      webserver_path + '/' + @md.opt.f_pth[:pth_stub]
    end
    def url
      @env.url.webserv + '/' + @md.opt.f_pth[:pth_stub]
    end
    def rel
      './' + @md.opt.f_pth[:pth_stub]
    end
    def rcp
      './' + @md.opt.f_pth[:pth_stub]
    end
    self
  end
  def sisugit
    def dir
      output_path.base.dir + '/git'
    end
    def url
      output_path.base.url + '/git'
    end
    def rel
      output_path.base.rel + '/git'
    end
    def rcp
      output_path.base.rcp + '/git'
    end
    self
  end
  #def pod
  #  ft='pod'
  #  path=set_path(ft).dir.ab
  #end
  def src
    def ft
      Gt[:src]
    end
    def dir
      set_path(ft).dir.ab_src
    end
    def url
      set_path(ft).url.ab_src
    end
    def rel
      set_path(ft).rel.ab_src
    end
    def rcp
      set_path(ft).rcp.ab_src
    end
    def rel_sm
      set_path(ft).rel_sm.ab_src
    end
    self
  end
  def sisupod
    def ft
      Gt[:src]
    end
    def dir
      set_path(ft).dir.ab_pod
    end
    def url
      set_path(ft).url.ab_pod
    end
    def rel
      set_path(ft).rel.ab_pod
    end
    def rcp
      set_path(ft).rcp.ab_pod
    end
    def rel_sm
      set_path(ft).rel_sm.ab_pod
    end
    self
  end
  def po4a
    def dir
     output_path.base.dir + '/' \
       + Gt[:src] + '/' \
       + @md.opt.fng + '/po4a'
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb
    end
    def rcp
      #p "#{output_path.base.dir}/po4a/#{@md.fnb}"
    end
    self
  end
  def po(lng=@md.opt.lng)
    @lng=lng
    def dir
      output_path.base.dir + '/' \
        + Gt[:src] + '/' \
        + @md.opt.fng + '/po4a/po/' \
        + @lng
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb + '/po/' \
        + @lng
    end
    self
  end
  def pot
    def dir
     output_path.base.dir + '/' \
       + Gt[:src] + '/' \
       + @md.opt.fng + '/po4a/pot'
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb + '/pot'
    end
    def rcp
      #p "#{output_path.base.dir}/po4a/#{@md.fnb}/pot"
    end
    self
  end
  def po_git # consider !!!
    def ft
      Gt[:po]
    end
    def dir
      pth=@env.processing_path.git + '/' \
        + @md.fnb + '/' \
        + ft + '/' \
        + @md.opt.lng
      FileUtils::mkdir_p(pth) unless FileTest.directory?(pth)
      pth
    end
    self
  end
  def pot_git # consider !!!
    def ft
      Gt[:pot]
    end
    def dir
      @env.processing_path.git + '/' \
        + @md.fnb + '/' \
        + ft
    end
    self
  end
  def po4a_sst(lng=@md.opt.lng)
    @lng=lng
    def dir
      output_path.base.dir + '/' \
        + Gt[:src] + '/' \
        + @md.opt.fng + '/po4a/' \
        + @lng
    end
    def url
      output_path.base.url + '/po4a/' \
        + @md.fnb \
        + @lng
    end
    self
  end
  def md_harvest
    manifest
    self
  end
  def txt
    def ft
      'txt'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def textile
    def ft
      'textile' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def asciidoc
    def ft
      'asciidoc' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def markdown
    def ft
      'markdown' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def rst
    def ft
      'rst' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def orgmode
    def ft
      'orgmode' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def html_scroll
    def ft
      'html'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      if output_dir_structure.dump_or_redirect?
        './image'
      elsif output_dir_structure.by_language_code?
        '../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    self
  end
  def html_seg
    def ft
      'html/' + @md.fnb
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      if output_dir_structure.dump_or_redirect?
        './image'
      elsif output_dir_structure.by_language_code?
        '../../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    self
  end
  def html_concordance
    html_seg
    self
  end
  def html
    def ft
      'html'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).url.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      if output_dir_structure.by_language_code?
        '../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    self
  end
  def xhtml
    def ft
      'xhtml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def epub
    def ft
      'epub'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      './image'
    end
    self
  end
  def odt
    def ft
      'odt'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def xml
    def ft
      'xml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_sax
    xml
    self
  end
  def xml_dom
    xml
    self
  end
  def xml_docbook
    def ft
      'docbook'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_docbook_article
    def ft
      'docbook' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_docbook_book
    def ft
      'docbook'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_fictionbook
    def ft
      'fictionbook' \
        + DEVELOPER[:under_construction]
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_scaffold_structure_sisu
    def ft
      'sisu.scaffold.xml'
      #'xml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def xml_scaffold_structure_collapse
    def ft
      'collapsed.scaffold.xml'
      #'xml'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def json
    def ft
      'json'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    def rel_image
      '../../_sisu/image'
    end
    self
  end
  def pdf
    def ft
      'pdf'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def sqlite_discrete
    def ft
      'sql'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def hash_digest
    def ft
      'hashes'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def manifest
    def ft
      'manifest'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rel_image
      if output_dir_structure.dump_or_redirect?
        './image'
      elsif output_dir_structure.by_language_code?
        '../../_sisu/image'
      elsif output_dir_structure.by_filetype?
        '../_sisu/image'
      else
        '../_sisu/image'
      end
    end
    def rcp
      set_path(ft).rcp.abc
    end
    self
  end
  def qrcode
    def ft
      'manifest/qrcode'
    end
    def dir
      set_path(ft).dir.abc
    end
    def url
      set_path(ft).url.abc
    end
    def rel
      set_path(ft).rel.abc
    end
    def rcp
      set_path(ft).rcp.abc
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def harvest
    def ft
      'site_metadata'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      if output_dir_structure.by_language_code?
        ''
      elsif output_dir_structure.by_filetype?
        ''
      else
        ''
      end
    end
    self
  end
  def manpage
    def ft
      'man'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def texinfo
    def ft
      'texinfo'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    def rel_sm
      set_path(ft).rel_sm.ab
    end
    self
  end
  def sitemaps
    def ft
      'sitemaps'
    end
    def dir
      set_path(ft).dir.ab
    end
    def url
      set_path(ft).url.ab
    end
    def rel
      set_path(ft).rel.ab
    end
    def rcp
      set_path(ft).rcp.ab
    end
    self
  end
  def sqlite #check url
    def dir
      output_path.base.dir
    end
    def url
      output_path.base.url
    end
    def rel
      output_path.base.rel
    end
    def rcp
      output_path.base.rcp
    end
    self
  end
  #def cgi
  #end
  def css
    @d='_sisu/css'
    def dir
      output_path.base.dir + '/' + @d
    end
    def url
      output_path.base.url + '/' + @d
    end
    def rel
      @d
      #output_path.base.rel + '/' + @d
    end
    def rcp
      output_path.stub.rcp + '/' + @d
    end
    self
  end
  def images
    @d='_sisu/image'
    def dir
      output_path.base.dir + '/' + @d
    end
    def url
      output_path.base.url + '/' + @d
    end
    def rel
      @d
      #output_path.base.rel + '/' + @d
    end
    def rcp
      output_path.stub.rcp + '/' + @d
    end
    self
  end
  def images_external
    @d='_sisu/image_external'
    def dir
      output_path.base.dir + '/' + @d
    end
    def url
      output_path.base.url + '/' + @d
    end
    def rel
      output_path.base.rel + '/' + @d
    end
    def rcp
      output_path.base.rcp + '/' + @d
    end
    self
  end
  #def css
  #  #"#{@env.path.output}/#{@env.path.style}"
  #end
  self
end
pdf() click to toggle source
# File lib/sisu/se_file_op.rb, line 2392
def pdf
  def ft
    'pdf'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  self
end
pdf_l() click to toggle source
# File lib/sisu/se_file_op.rb, line 642
def pdf_l
  STDERR.puts 'ERROR not available due to multiple page format sizes'
end
pdf_l_a4(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1312
def pdf_l_a4(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_a4]
end
pdf_l_a5(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1315
def pdf_l_a5(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_a5]
end
pdf_l_b5(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1318
def pdf_l_b5(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_b5]
end
pdf_l_letter(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1321
def pdf_l_letter(fh=nil)
  pdf_l(fh) + @md.fn[:pdf_l_letter]
end
pdf_p() click to toggle source
# File lib/sisu/se_file_op.rb, line 639
def pdf_p
  STDERR.puts 'ERROR not available due to multiple page format sizes'
end
pdf_p_a4(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1297
def pdf_p_a4(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_a4]
end
pdf_p_a5(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1300
def pdf_p_a5(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_a5]
end
pdf_p_b5(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1303
def pdf_p_b5(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_b5]
end
pdf_p_letter(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1306
def pdf_p_letter(fh=nil)
  pdf_p(fh) + @md.fn[:pdf_p_letter]
end
place_file() click to toggle source
# File lib/sisu/se_file_op.rb, line 495
def place_file
  def txt
    def dir
      output_path.txt.dir + '/' \
      + base_filename.txt
    end
    def rel
      output_path.txt.rel + '/' \
      + base_filename.txt
    end
    self
  end
  def textile
    def dir
      output_path.textile.dir + '/' \
      + base_filename.textile
    end
    def rel
      output_path.textile.rel + '/' \
      + base_filename.textile
    end
    self
  end
  def asciidoc
    def dir
      output_path.asciidoc.dir + '/' \
      + base_filename.asciidoc
    end
    def rel
      output_path.asciidoc.rel + '/' \
      + base_filename.asciidoc
    end
    self
  end
  def markdown
    def dir
      output_path.markdown.dir + '/' \
      + base_filename.markdown
    end
    def rel
      output_path.markdown.rel + '/' \
      + base_filename.markdown
    end
    self
  end
  def rst
    def dir
      output_path.rst.dir + '/' \
      + base_filename.rst
    end
    def rel
      output_path.rst.rel + '/' \
      + base_filename.rst
    end
    self
  end
  def orgmode
    def dir
      output_path.orgmode.dir + '/' \
      + base_filename.orgmode
    end
    def rel
      output_path.orgmode.rel + '/' \
      + base_filename.orgmode
    end
    self
  end
  def html_scroll
    def dir
      output_path.html_scroll.dir + '/' \
      + base_filename.html_scroll
    end
    def rel
      output_path.html_scroll.rel + '/' \
      + base_filename.html_scroll
    end
    self
  end
  def html_seg_index
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_seg_index
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_seg_index
    end
    self
  end
  def html_segtoc
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_segtoc
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_segtoc
    end
    self
  end
  def html_book_index
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_book_index
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_book_index
    end
    self
  end
  def html_concordance
    def dir
      output_path.html_seg.dir + '/' \
      + base_filename.html_concordance
    end
    def rel
      output_path.html_seg.rel + '/' \
      + base_filename.html_concordance
    end
    self
  end
  def odt
    def dir
      output_path.odt.dir + '/' \
      + base_filename.odt
    end
    def rel
      output_path.odt.rel + '/' \
      + base_filename.odt
    end
    self
  end
  def epub
    def dir
      output_path.epub.dir + '/' \
      + base_filename.epub
    end
    def rel
      output_path.epub.rel + '/' \
      + base_filename.epub
    end
    self
  end
  def pdf_p
    STDERR.puts 'ERROR not available due to multiple page format sizes'
  end
  def pdf_l
    STDERR.puts 'ERROR not available due to multiple page format sizes'
  end
  def xhtml
    def dir
      output_path.xhtml.dir + '/' \
      + base_filename.xhtml
    end
    def rel
      output_path.xhtml.rel + '/' \
      + base_filename.xhtml
    end
    self
  end
  def xml_sax
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_sax
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_sax
    end
    self
  end
  def xml_dom
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_dom
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_dom
    end
    self
  end
  def xml_docbook_book
    def dir
      output_path.xml_docbook.dir + '/' \
      + base_filename.xml_docbook_book
    end
    def rel
      output_path.xml_docbook.rel + '/' \
      + base_filename.xml_docbook_book
    end
    self
  end
  def xml_fictionbook
    def dir
      output_path.xml_fictionbook.dir + '/' \
      + base_filename.xml_fictionbook
    end
    def rel
      output_path.xml_fictionbook.rel + '/' \
      + base_filename.xml_fictionbook
    end
    self
  end
  def xml_scaffold_structure_sisu
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_scaffold_structure_sisu
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_scaffold_structure_sisu
    end
    self
  end
  def xml_scaffold_structure_collapse
    def dir
      output_path.xml.dir + '/' \
      + base_filename.xml_scaffold_structure_collapse
    end
    def rel
      output_path.xml.rel + '/' \
      + base_filename.xml_scaffold_structure_collapse
    end
    self
  end
  def json
    def dir
      output_path.json.dir + '/' \
      + base_filename.json
    end
    def rel
      output_path.json.rel + '/' \
      + base_filename.json
    end
    self
  end
  def sqlite_discrete
    def dir
      output_path.sqlite_discrete.dir + '/' \
      + base_filename.sqlite_discrete
    end
    def rel
      output_path.sqlite_discrete.rel + '/' \
      + base_filename.sqlite_discrete
    end
    self
  end
  def hash_digest
    def dir
      output_path.hash_digest.dir + '/' \
      + base_filename.hash_digest
    end
    def rel
      output_path.hash_digest.rel + '/' \
      + base_filename.hash_digest
    end
    self
  end
  def src
    def dir
      output_path.src.dir + '/' \
        + base_filename.src
    end
    def rel
      output_path.src.rel + '/' \
      + base_filename.src
    end
    self
  end
  def sisupod
    def dir
      output_path.sisupod.dir + '/' \
      + base_filename.sisupod
    end
    def rel
      output_path.sisupod.rel + '/' \
      + base_filename.sisupod
    end
    self
  end
  def po
    def dir
      output_path.po.dir + '/' \
      + base_filename.po
    end
    def rel
      output_path.po.rel + '/' \
      + base_filename.po
    end
    self
  end
  def pot
    def dir
      output_path.pot.dir + '/' \
      + base_filename.pot
    end
    def rel
      output_path.pot.rel + '/' \
      + base_filename.pot
    end
    self
  end
  def po_git
    def dir
      output_path.po_git + '/' \
      + base_filename.po
    end
    def rel
      #output_path.po_git + '/' + base_filename.po
    end
    self
  end
  def pot_git
    def dir
      output_path.pot_git + '/' \
      + base_filename.pot
    end
    def rel
      #output_path.pot_git + '/' + base_filename.pot
    end
    self
  end
  def manpage
    def dir
      output_path.manpage.dir + '/' \
      + base_filename.manpage
    end
    def rel
      output_path.manpage.rel + '/' \
      + base_filename.manpage
    end
    self
  end
  def texinfo
    def dir
      output_path.texinfo.dir + '/' \
      + base_filename.texinfo
    end
    def rel
      output_path.texinfo.rel + '/' \
      + base_filename.texinfo
    end
    self
  end
  def info
    def dir
      output_path.texinfo.dir + '/' \
      + base_filename.info
    end
    def rel
      output_path.texinfo.rel + '/' \
      + base_filename.info
    end
    self
  end
  def qrcode_title
    def dir
      output_path.qrcode.dir + '/' \
      + base_filename.qrcode_title
    end
    def rel
      output_path.qrcode.rel + '/' \
      + base_filename.qrcode_title
    end
    self
  end
  def qrcode_md
    def dir
      output_path.qrcode.dir + '/' \
      + base_filename.qrcode_md
    end
    def rel
      output_path.qrcode.rel + '/' \
      + base_filename.qrcode_md
    end
    self
  end
  def manifest
    def dir
      output_path.manifest.dir + '/' \
        + base_filename.manifest
    end
    def rel
      output_path.manifest.rel + '/' \
        + base_filename.manifest
    end
    self
  end
  self
end
po(lng=@md.opt.lng) click to toggle source
# File lib/sisu/se_file_op.rb, line 481
def po(lng=@md.opt.lng)
  path=output_path.po(lng).dir
  make_path(path)
  fn=base_filename.po
  make_file(path,fn)
end
po4a() click to toggle source
# File lib/sisu/se_file_op.rb, line 1801
def po4a
  def dir
   output_path.base.dir + '/' \
     + Gt[:src] + '/' \
     + @md.opt.fng + '/po4a'
  end
  def url
    output_path.base.url + '/po4a/' \
      + @md.fnb
  end
  def rcp
    #p "#{output_path.base.dir}/po4a/#{@md.fnb}"
  end
  self
end
po4a_cfg() click to toggle source
# File lib/sisu/se_file_op.rb, line 469
def po4a_cfg
  path=output_path.po4a.dir
  make_path(path)
  fn=base_filename.po4a_cfg
  make_file(path,fn)
end
po4a_sst(lng=@md.opt.lng) click to toggle source
# File lib/sisu/se_file_op.rb, line 487
def po4a_sst(lng=@md.opt.lng)
  path=output_path.po4a_sst(lng).dir
  make_path(path)
  fn=base_filename.po4a_sst
  make_file(path,fn)
end
po_git() click to toggle source
# File lib/sisu/se_file_op.rb, line 799
def po_git
  def dir
    output_path.po_git + '/' \
    + base_filename.po
  end
  def rel
    #output_path.po_git + '/' + base_filename.po
  end
  self
end
pot() click to toggle source
# File lib/sisu/se_file_op.rb, line 475
def pot
  path=output_path.pot.dir
  make_path(path)
  fn=base_filename.pot
  make_file(path,fn)
end
pot_git() click to toggle source
# File lib/sisu/se_file_op.rb, line 809
def pot_git
  def dir
    output_path.pot_git + '/' \
    + base_filename.pot
  end
  def rel
    #output_path.pot_git + '/' + base_filename.pot
  end
  self
end
qrcode() click to toggle source
# File lib/sisu/se_file_op.rb, line 451
def qrcode
  path=output_path.qrcode.dir
  make_path(path)
  fn=base_filename.qrcode
  make_file(path,fn)
end
qrcode_md() click to toggle source
# File lib/sisu/se_file_op.rb, line 863
def qrcode_md
  def dir
    output_path.qrcode.dir + '/' \
    + base_filename.qrcode_md
  end
  def rel
    output_path.qrcode.rel + '/' \
    + base_filename.qrcode_md
  end
  self
end
qrcode_title() click to toggle source
# File lib/sisu/se_file_op.rb, line 852
def qrcode_title
  def dir
    output_path.qrcode.dir + '/' \
    + base_filename.qrcode_title
  end
  def rel
    output_path.qrcode.rel + '/' \
    + base_filename.qrcode_title
  end
  self
end
rcp() click to toggle source
# File lib/sisu/se_file_op.rb, line 1664
def rcp
  def abc
    if output_dir_structure.by_language_code?
      output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
    elsif output_dir_structure.by_filetype?
      output_path.stub.rcp + '/' + @ft
    else
      output_path.stub.rcp + '/' + @md.fnb
    end
  end
  def ab
    if output_dir_structure.by_language_code?
      output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
    else
      output_path.stub.rcp + '/' + @ft
    end
  end
  self
end
rel() click to toggle source
# File lib/sisu/se_file_op.rb, line 501
def rel
  output_path.txt.rel + '/' \
  + base_filename.txt
end
rel_image() click to toggle source
# File lib/sisu/se_file_op.rb, line 2040
def rel_image
  if output_dir_structure.dump_or_redirect?
    './image'
  elsif output_dir_structure.by_language_code?
    '../../_sisu/image'
  elsif output_dir_structure.by_filetype?
    '../_sisu/image'
  else
    '../_sisu/image'
  end
end
rel_sm() click to toggle source
# File lib/sisu/se_file_op.rb, line 1624
def rel_sm
  def abc
    if output_dir_structure.by_language_code?
      @md.opt.lng + '/' + @ft
    elsif output_dir_structure.by_filetype?
      @ft
    else
      @md.fnb
    end
  end
  def ab
    if output_dir_structure.dump_or_redirect?
      '.'
    elsif output_dir_structure.by_language_code? \
    or output_dir_structure.by_filetype?
      '../' + @ft
    else '.'
    end
  end
  def ab_src
    locate="#{@ft}/#{@md.opt.fng}/#{Gt[:sisupod]}/#{Gt[:doc]}/#{@md.opt.lng}"
    if output_dir_structure.dump_or_redirect?
      '.'
    elsif output_dir_structure.by_language_code?
      '../../' + locate
    else
      '../' + locate
    end
  end
  def ab_pod
    if output_dir_structure.dump_or_redirect?
      '.'
    elsif output_dir_structure.by_language_code?
      '../../' + @ft
    else
      '../' + @ft
    end
  end
  self
end
rst() click to toggle source
# File lib/sisu/se_file_op.rb, line 342
def rst
  path=output_path.rst.dir
  make_path(path)
  fn=base_filename.rst
  make_file(path,fn)
end
set_path(ft) click to toggle source
# File lib/sisu/se_file_op.rb, line 1517
def set_path(ft)
  @ft=ft
  def dir
    def abc
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      elsif output_dir_structure.by_language_code?
        output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        output_path.base.dir + '/' + @ft
      else
        output_path.base.dir + '/' + @md.fnb
      end
    end
    def ab
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      elsif output_dir_structure.by_language_code?
        output_path.base.dir + '/' + @md.opt.lng + '/' + @ft
      else
        output_path.base.dir + '/' + @ft
      end
    end
    def ab_src
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      else
        output_path.base.dir + '/' \
          + @ft + '/' \
          + @md.opt.fng + '/' \
          + Gt[:sisupod] + '/' \
          + Gt[:doc] + '/' \
          + @md.opt.lng
      end
    end
    def ab_pod
      if output_dir_structure.redirect?
        @md.opt.opt_act[:redirect][:inst] + '/' + @md.fnb
      elsif output_dir_structure.dump?
        @md.opt.opt_act[:dump][:inst]
      else
        output_path.base.dir + '/' + @ft
      end
    end
    self
  end
  def url
    def abc
      if output_dir_structure.by_language_code?
        output_path.base.url + '/' + @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        output_path.base.url + '/' + @ft
      else
        output_path.base.url + '/' + @md.fnb
      end
    end
    def ab
      if output_dir_structure.by_language_code?
        output_path.base.url + '/' + @md.opt.lng + '/' + @ft
      else
        output_path.base.url + '/' + @ft
      end
    end
    def ab_src
      output_path.base.url + '/' \
        + @ft + '/' \
        + @md.opt.fng + '/' \
        + Gt[:sisupod] + '/' \
        + Gt[:doc] + '/' \
        + @md.opt.lng
    end
    def ab_pod
      output_path.base.url + '/' + @ft
    end
    self
  end
  def rel
    def abc
      if output_dir_structure.by_language_code?
        @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        @ft
      else
        @md.fnb
      end
    end
    def ab
      if output_dir_structure.by_language_code?
        @md.opt.lng + '/' + @ft
      else
        @ft
      end
    end
    def ab_src
      @ft
    end
    def ab_pod
      @ft
    end
    self
  end
  def rel_sm
    def abc
      if output_dir_structure.by_language_code?
        @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        @ft
      else
        @md.fnb
      end
    end
    def ab
      if output_dir_structure.dump_or_redirect?
        '.'
      elsif output_dir_structure.by_language_code? \
      or output_dir_structure.by_filetype?
        '../' + @ft
      else '.'
      end
    end
    def ab_src
      locate="#{@ft}/#{@md.opt.fng}/#{Gt[:sisupod]}/#{Gt[:doc]}/#{@md.opt.lng}"
      if output_dir_structure.dump_or_redirect?
        '.'
      elsif output_dir_structure.by_language_code?
        '../../' + locate
      else
        '../' + locate
      end
    end
    def ab_pod
      if output_dir_structure.dump_or_redirect?
        '.'
      elsif output_dir_structure.by_language_code?
        '../../' + @ft
      else
        '../' + @ft
      end
    end
    self
  end
  def rcp
    def abc
      if output_dir_structure.by_language_code?
        output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
      elsif output_dir_structure.by_filetype?
        output_path.stub.rcp + '/' + @ft
      else
        output_path.stub.rcp + '/' + @md.fnb
      end
    end
    def ab
      if output_dir_structure.by_language_code?
        output_path.stub.rcp + '/' + @md.opt.lng + '/' + @ft
      else
        output_path.stub.rcp + '/' + @ft
      end
    end
    self
  end
  self
end
sisugit() click to toggle source
# File lib/sisu/se_file_op.rb, line 1740
def sisugit
  def dir
    output_path.base.dir + '/git'
  end
  def url
    output_path.base.url + '/git'
  end
  def rel
    output_path.base.rel + '/git'
  end
  def rcp
    output_path.base.rcp + '/git'
  end
  self
end
sisupod() click to toggle source
# File lib/sisu/se_file_op.rb, line 766
def sisupod
  def dir
    output_path.sisupod.dir + '/' \
    + base_filename.sisupod
  end
  def rel
    output_path.sisupod.rel + '/' \
    + base_filename.sisupod
  end
  self
end
sitemap(fh=nil) click to toggle source
# File lib/sisu/se_file_op.rb, line 1390
def sitemap(fh=nil)
  fh=default_hash_build(fh,Sfx[:xml])
  fh[:lng]=lang_code?(fh[:lng])
  fnh=if output_dir_structure.by_language_code?
    {
      fn: fh[:fn] + '.sitemap',
      ft: fh[:ft],
    }
  elsif output_dir_structure.by_filetype?
    {
      fn: fh[:fn],
      ft: fh[:ft],
      lng: fh[:lng],
    }
  else
    {
      fn: 'sitemap',
      ft: fh[:ft],
      lng: fh[:lng],
    }
  end
  i18n(fnh)
end
sitemaps() click to toggle source
# File lib/sisu/se_file_op.rb, line 2574
def sitemaps
  def ft
    'sitemaps'
  end
  def dir
    set_path(ft).dir.ab
  end
  def url
    set_path(ft).url.ab
  end
  def rel
    set_path(ft).rel.ab
  end
  def rcp
    set_path(ft).rcp.ab
  end
  self
end
sqlite() click to toggle source
# File lib/sisu/se_file_op.rb, line 2592
def sqlite #check url
  def dir
    output_path.base.dir
  end
  def url
    output_path.base.url
  end
  def rel
    output_path.base.rel
  end
  def rcp
    output_path.base.rcp
  end
  self
end
sqlite_discrete() click to toggle source
# File lib/sisu/se_file_op.rb, line 733
def sqlite_discrete
  def dir
    output_path.sqlite_discrete.dir + '/' \
    + base_filename.sqlite_discrete
  end
  def rel
    output_path.sqlite_discrete.rel + '/' \
    + base_filename.sqlite_discrete
  end
  self
end
src() click to toggle source
# File lib/sisu/se_file_op.rb, line 755
def src
  def dir
    output_path.src.dir + '/' \
      + base_filename.src
  end
  def rel
    output_path.src.rel + '/' \
    + base_filename.src
  end
  self
end
stub() click to toggle source
# File lib/sisu/se_file_op.rb, line 1701
def stub
  def dir
    @md.opt.f_pth[:pth_stub]
  end
  #def url
  #  "#{@env.url.root}"
  #end
  def rel
    './' + @md.opt.f_pth[:pth_stub]
  end
  def rcp
    @md.opt.f_pth[:pth_stub]
  end
  self
end
texinfo() click to toggle source
# File lib/sisu/se_file_op.rb, line 433
def texinfo
  path=output_path.texinfo.dir
  make_path(path)
  fn=base_filename.texinfo
  make_file(path,fn)
end
textile() click to toggle source
# File lib/sisu/se_file_op.rb, line 324
def textile
  path=output_path.textile.dir
  make_path(path)
  fn=base_filename.textile
  make_file(path,fn)
end
txt() click to toggle source
# File lib/sisu/se_file_op.rb, line 318
def txt
  path=output_path.txt.dir
  make_path(path)
  fn=base_filename.txt
  make_file(path,fn)
end
url() click to toggle source
# File lib/sisu/se_file_op.rb, line 1569
def url
  def abc
    if output_dir_structure.by_language_code?
      output_path.base.url + '/' + @md.opt.lng + '/' + @ft
    elsif output_dir_structure.by_filetype?
      output_path.base.url + '/' + @ft
    else
      output_path.base.url + '/' + @md.fnb
    end
  end
  def ab
    if output_dir_structure.by_language_code?
      output_path.base.url + '/' + @md.opt.lng + '/' + @ft
    else
      output_path.base.url + '/' + @ft
    end
  end
  def ab_src
    output_path.base.url + '/' \
      + @ft + '/' \
      + @md.opt.fng + '/' \
      + Gt[:sisupod] + '/' \
      + Gt[:doc] + '/' \
      + @md.opt.lng
  end
  def ab_pod
    output_path.base.url + '/' + @ft
  end
  self
end
web_base() click to toggle source
# File lib/sisu/se_file_op.rb, line 1686
def web_base
  def dir
    @env.path.webserv
  end
  def url
    #"#{@env.url.root}"
  end
  def rel
    '.'
  end
  def rcp
    '.'
  end
  self
end
webserver_path() click to toggle source
# File lib/sisu/se_file_op.rb, line 1716
def webserver_path
  if output_dir_structure.dump?
    @md.opt.opt_act[:dump][:inst]
  elsif output_dir_structure.redirect?
    @md.opt.opt_act[:redirect][:inst]
  else
    @env.path.webserv
  end
end
write_file() click to toggle source
# File lib/sisu/se_file_op.rb, line 317
def write_file
  def txt
    path=output_path.txt.dir
    make_path(path)
    fn=base_filename.txt
    make_file(path,fn)
  end
  def textile
    path=output_path.textile.dir
    make_path(path)
    fn=base_filename.textile
    make_file(path,fn)
  end
  def asciidoc
    path=output_path.asciidoc.dir
    make_path(path)
    fn=base_filename.asciidoc
    make_file(path,fn)
  end
  def markdown
    path=output_path.markdown.dir
    make_path(path)
    fn=base_filename.markdown
    make_file(path,fn)
  end
  def rst
    path=output_path.rst.dir
    make_path(path)
    fn=base_filename.rst
    make_file(path,fn)
  end
  def orgmode
    path=output_path.orgmode.dir
    make_path(path)
    fn=base_filename.orgmode
    make_file(path,fn)
  end
  def html_scroll
    pth=output_path.html.dir
    make_path(pth)
    p_fn=place_file.html_scroll.dir
    File.new(p_fn,'w+')
  end
  def html_seg_index
    pth=((output_dir_structure.by_filename?) \
    || (output_dir_structure.dump?)) \
    ? "#{output_path.html.dir}"
    : "#{output_path.html.dir}/#{@md.fnb}"
    make_path(pth)
    p_fn=place_file.html_seg_index.dir
    File.new(p_fn,'w+')
  end
  def html_segtoc
    pth=((output_dir_structure.by_filename?) \
    || (output_dir_structure.dump?) \
    || (output_dir_structure.redirect?)) \
    ? "#{output_path.html.dir}"
    : "#{output_path.html.dir}/#{@md.fnb}"
    make_path(pth)
    p_fn=place_file.html_segtoc.dir
    File.new(p_fn,'w+')
  end
  def xhtml
    path=output_path.xhtml.dir
    make_path(path)
    fn=base_filename.xhtml
    make_file(path,fn)
  end
  def xml_sax
    path=output_path.xml.dir
    make_path(path)
    fn=base_filename.xml_sax
    make_file(path,fn)
  end
  def xml_dom
    path=output_path.xml.dir
    make_path(path)
    fn=base_filename.xml_dom
    make_file(path,fn)
  end
  def xml_docbook_book
    path=output_path.xml_docbook_book.dir
    make_path(path)
    fn=base_filename.xml_docbook_book
    make_file(path,fn)
  end
  def xml_fictionbook
    path=output_path.xml_fictionbook.dir
    make_path(path)
    fn=base_filename.xml_fictionbook
    make_file(path,fn)
  end
  def xml_scaffold_structure_sisu
    path=output_path.xml_scaffold_structure_sisu.dir
    make_path(path)
    fn=base_filename.xml_scaffold_structure_sisu
    make_file(path,fn)
  end
  def xml_scaffold_structure_collapse
    path=output_path.xml_scaffold_structure_collapse.dir
    make_path(path)
    fn=base_filename.xml_scaffold_structure_collapse
    make_file(path,fn)
  end
  def json
    path=output_path.json.dir
    make_path(path)
    fn=base_filename.json
    make_file(path,fn)
  end
  def manpage
    path=output_path.manpage.dir
    make_path(path)
    fn=base_filename.manpage
    make_file(path,fn)
  end
  def texinfo
    path=output_path.texinfo.dir
    make_path(path)
    fn=base_filename.texinfo
    make_file(path,fn)
  end
  def info
    path=output_path.texinfo.dir
    make_path(path)
    fn=base_filename.info
    make_file(path,fn)
  end
  def hash_digest
    path=output_path.hash_digest.dir
    make_path(path)
    fn=base_filename.hash_digest
    make_file(path,fn)
  end
  def qrcode
    path=output_path.qrcode.dir
    make_path(path)
    fn=base_filename.qrcode
    make_file(path,fn)
  end
  def manifest
    path=output_path.manifest.dir
    make_path(path)
    fn=base_filename.manifest
    make_file(path,fn)
  end
  def manifest_txt
    path=output_path.manifest.dir
    make_path(path)
    fn=base_filename.manifest_txt
    make_file(path,fn)
  end
  def po4a_cfg
    path=output_path.po4a.dir
    make_path(path)
    fn=base_filename.po4a_cfg
    make_file(path,fn)
  end
  def pot
    path=output_path.pot.dir
    make_path(path)
    fn=base_filename.pot
    make_file(path,fn)
  end
  def po(lng=@md.opt.lng)
    path=output_path.po(lng).dir
    make_path(path)
    fn=base_filename.po
    make_file(path,fn)
  end
  def po4a_sst(lng=@md.opt.lng)
    path=output_path.po4a_sst(lng).dir
    make_path(path)
    fn=base_filename.po4a_sst
    make_file(path,fn)
  end
  self
end
xhtml() click to toggle source
# File lib/sisu/se_file_op.rb, line 379
def xhtml
  path=output_path.xhtml.dir
  make_path(path)
  fn=base_filename.xhtml
  make_file(path,fn)
end
xhtml_css() click to toggle source
# File lib/sisu/se_file_op.rb, line 262
def xhtml_css
  default_output_css
end
xml() click to toggle source
# File lib/sisu/se_file_op.rb, line 2188
def xml
  def ft
    'xml'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    '../../_sisu/image'
  end
  self
end
xml_css() click to toggle source
# File lib/sisu/se_file_op.rb, line 265
def xml_css
  default_output_css
end
xml_docbook() click to toggle source
# File lib/sisu/se_file_op.rb, line 2220
def xml_docbook
  def ft
    'docbook'
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    '../../_sisu/image'
  end
  self
end
xml_docbook_article() click to toggle source
# File lib/sisu/se_file_op.rb, line 2244
def xml_docbook_article
  def ft
    'docbook' \
      + DEVELOPER[:under_construction]
  end
  def dir
    set_path(ft).dir.abc
  end
  def url
    set_path(ft).url.abc
  end
  def rel
    set_path(ft).rel.abc
  end
  def rcp
    set_path(ft).rcp.abc
  end
  def rel_sm
    set_path(ft).rel_sm.ab
  end
  def rel_image
    '../../_sisu/image'
  end
  self
end
xml_docbook_book() click to toggle source
# File lib/sisu/se_file_op.rb, line 397
def xml_docbook_book
  path=output_path.xml_docbook_book.dir
  make_path(path)
  fn=base_filename.xml_docbook_book
  make_file(path,fn)
end
xml_dom() click to toggle source
# File lib/sisu/se_file_op.rb, line 391
def xml_dom
  path=output_path.xml.dir
  make_path(path)
  fn=base_filename.xml_dom
  make_file(path,fn)
end
xml_fictionbook() click to toggle source
# File lib/sisu/se_file_op.rb, line 403
def xml_fictionbook
  path=output_path.xml_fictionbook.dir
  make_path(path)
  fn=base_filename.xml_fictionbook
  make_file(path,fn)
end
xml_sax() click to toggle source
# File lib/sisu/se_file_op.rb, line 385
def xml_sax
  path=output_path.xml.dir
  make_path(path)
  fn=base_filename.xml_sax
  make_file(path,fn)
end
xml_scaffold_structure_collapse() click to toggle source
# File lib/sisu/se_file_op.rb, line 415
def xml_scaffold_structure_collapse
  path=output_path.xml_scaffold_structure_collapse.dir
  make_path(path)
  fn=base_filename.xml_scaffold_structure_collapse
  make_file(path,fn)
end
xml_scaffold_structure_sisu() click to toggle source
# File lib/sisu/se_file_op.rb, line 409
def xml_scaffold_structure_sisu
  path=output_path.xml_scaffold_structure_sisu.dir
  make_path(path)
  fn=base_filename.xml_scaffold_structure_sisu
  make_file(path,fn)
end