aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/dal.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-14 21:29:55 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-14 21:29:55 +0100
commit69e8c05210e249e679b259cb843a5e708273e9be (patch)
tree065b61391a561df11711106e4767d6d0b2a7225e /lib/sisu/v0/dal.rb
parentremote, (put, get) in single file; embedded content, posted locally and remot... (diff)
shared markup source output moved to own common src directory
Diffstat (limited to 'lib/sisu/v0/dal.rb')
-rw-r--r--lib/sisu/v0/dal.rb58
1 files changed, 36 insertions, 22 deletions
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index 132da336..3631a77c 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -324,36 +324,39 @@ module SiSU_DAL
when /4/; cf_defaults.cf_4
when /5/; cf_defaults.cf_5
end
- file_type_names=[]
- file_type_names <<= if cmd_list =~ /y/; 'sisu_manifest.html'
+ file_type_names={}
+ file_type_names[:gen],file_type_names[:src]=[],[]
+ file_type_names[:gen] <<= if cmd_list =~ /y/; 'sisu_manifest.html'
end
- file_type_names <<= if cmd_list =~ /h/; ['toc.html', 'doc.html']
+ file_type_names[:gen] <<= if cmd_list =~ /h/; ['toc.html', 'doc.html']
end
- file_type_names <<= if cmd_list =~ /p/; ['landscape.pdf', 'portrait.pdf']
+ file_type_names[:gen] <<= if cmd_list =~ /p/; ['landscape.pdf', 'portrait.pdf']
end
- #file_type_names <<= if cmd_list =~ /i/; 'manpage.1'
+ #file_type_names[:gen] <<= if cmd_list =~ /i/; 'manpage.1'
#end
- file_type_names <<= if cmd_list =~ /o/; 'opendocument.odt'
+ file_type_names[:gen] <<= if cmd_list =~ /o/; 'opendocument.odt'
end
- file_type_names <<= if cmd_list =~ /b/; 'scroll.xhtml'
+ file_type_names[:gen] <<= if cmd_list =~ /b/; 'scroll.xhtml'
end
- file_type_names <<= if cmd_list =~ /x/; 'sax.xml'
+ file_type_names[:gen] <<= if cmd_list =~ /x/; 'sax.xml'
end
- file_type_names <<= if cmd_list =~ /X/; 'dom.xml'
+ file_type_names[:gen] <<= if cmd_list =~ /X/; 'dom.xml'
end
- file_type_names <<= if cmd_list =~ /a/; 'plain.txt'
+ file_type_names[:gen] <<= if cmd_list =~ /a/; 'plain.txt'
end
- file_type_names <<= if cmd_list =~ /g/; 'wiki.txt'
+ file_type_names[:gen] <<= if cmd_list =~ /g/; 'wiki.txt'
end
- file_type_names <<= if cmd_list =~ /w/; 'concordance.html'
+ file_type_names[:gen] <<= if cmd_list =~ /w/; 'concordance.html'
end
- file_type_names <<= if cmd_list =~ /N/; 'digest.txt'
+ file_type_names[:gen] <<= if cmd_list =~ /N/; 'digest.txt'
end
- file_type_names <<= if source and cmd_shortcut =~ /s/; source
+ file_type_names[:src] <<= if source and cmd_shortcut =~ /s/; source
end
- file_type_names <<= if cmd_shortcut =~ /S/; 'sisupod.zip'
+ file_type_names[:src] <<= if cmd_shortcut =~ /S/; "#{source}.zip"
end
- file_type_names=file_type_names.flatten
+ file_type_names[:gen]=file_type_names[:gen].flatten
+ file_type_names[:src]=file_type_names[:src].flatten
+ file_type_names
end
def expand_insertions?(data)
tuned_file,tuned_file_tmp=[],[]
@@ -378,7 +381,8 @@ module SiSU_DAL
end
end
tuned_file_tmp << manifest
- output_filetypes_in_cmd(cmd,source).each do |o_f|
+ output_filetypes=output_filetypes_in_cmd(cmd,source)
+ output_filetypes[:gen].each do |o_f|
describe = case o_f
when /sisu_manifest.html/; '~^ document manifest'
when /toc.html/; ' html, segmented text'
@@ -394,15 +398,25 @@ module SiSU_DAL
when /wiki.txt/; ' wiki text'
when /concordance.html/; ' concordance'
when /digest.txt/; ' dcc, document content certificate (digests)'
+ else nil
+ end
+ if describe
+ tuned_file_tmp << if @output_url #to double space <:br> at beginning of entry
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#@output_url/#{url_dir}/#{o_f}" if describe
+ else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
+ end
+ end
+ end
+ output_filetypes[:src].each do |o_f|
+ describe = case o_f
+ when /#{source}\.zip/; ' markup source (zipped) pod'
when /#{source}/; ' markup source text'
- when /sisupod.zip/; ' zipped markup source pod'
else nil
end
if describe
- if @output_url
- tuned_file_tmp << "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#@output_url/#{url_dir}/#{o_f}" if describe #to double space <:br> at beginning of entry
- else
- tuned_file_tmp << "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}" #to double space <:br> at beginning of entry
+ tuned_file_tmp << if @output_url
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#@output_url/src/#{o_f}" if describe
+ else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
end
end
end