diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-07-30 21:30:36 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-07-30 21:30:39 -0400 |
commit | 3e58296fa7761edaa59f807d4f8e87987ea8e921 (patch) | |
tree | d93286de4e7cba8462a71fa013d223cf84413e88 /lib/sisu/v5/harvest_authors.rb | |
parent | v5: output structure by, add monolingual alt for :filetype & :filename, step 1 (diff) |
v5: output structure by, monolingual alternative for :filetype or :filename
* filename without language code, if document is in default language
* set a default language, 'en' or as specified
* set in rc file or from command line instruction
* command line e.g.
sisu -hv --monolingual --by-filename sisu_markup.sst
sisu -3v --monolingual --by-filetype sisu_manual.ssm
* sisurc.yml lingual: 'mono' | 'multi'
lingual: 'mono'
* note: output by :filetype is roughly equivalent to what monolingual output
by :language would be
* allow command line setting of default language using language code
--default-language='en' --default-lang-en if used together with
--monolingual and --by-filetype or --by-filename the selected default
language document will not have a language code in the output filename
Diffstat (limited to 'lib/sisu/v5/harvest_authors.rb')
-rw-r--r-- | lib/sisu/v5/harvest_authors.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sisu/v5/harvest_authors.rb b/lib/sisu/v5/harvest_authors.rb index c20558df..c78971e4 100644 --- a/lib/sisu/v5/harvest_authors.rb +++ b/lib/sisu/v5/harvest_authors.rb @@ -364,12 +364,13 @@ WOK @output[lng][:html_mnt] << x end @output[lng][:html] << x + lang_code_insert=SiSU_Env::FilenameLanguageCodeInsert.new(@opt,lng).language_code_insert works=[] a[1][:md].each do |i| manifest_at=if @env.output_dir_structure.by? == :language - i[:file] + '.html' + i[:file] + Sfx[:html] elsif @env.output_dir_structure.by? == :filetype - i[:file] + '.' + lng + '.html' + i[:file] + '.' + lang_code_insert + Sfx[:html] elsif @env.output_dir_structure.by? == :filename "./#{i[:file]}/#{i[:page]}" else '' #error |