summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-09-16 04:35:57 +0000
committerRalph Amissah <ralph@amissah.com>2008-09-16 04:35:57 +0000
commitf555e0777bb4408e2e380150f28f3d433cb66d66 (patch)
tree5b9d1e83b9e3faeff51e264f8a6db8ad7a193131
parentchangelog date, touch (diff)
downloadsisu-f555e0777bb4408e2e380150f28f3d433cb66d66.zip
sisu-f555e0777bb4408e2e380150f28f3d433cb66d66.tar.xz
fixes: alphabet list (concordance, dal_idx), and file types (dal_expand_insertions)
-rw-r--r--CHANGELOG2
-rw-r--r--lib/sisu/v0/concordance.rb7
-rw-r--r--lib/sisu/v0/dal.rb45
-rw-r--r--lib/sisu/v0/dal_expand_insertions.rb45
-rw-r--r--lib/sisu/v0/dal_idx.rb7
5 files changed, 56 insertions, 50 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 1cfaf8a..663cb8f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,7 +9,7 @@ Reverse Chronological:
%% STABLE MANIFEST
-%% sisu_0.69.0.orig.tar.gz (2008-09-15:37/1)
+%% sisu_0.69.0.orig.tar.gz (2008-09-16:37/2)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.69.0.orig.tar.gz
sisu_0.69.0.orig.tar.gz
sisu_0.69.0-1.dsc
diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb
index dd4411a..babc665 100644
--- a/lib/sisu/v0/concordance.rb
+++ b/lib/sisu/v0/concordance.rb
@@ -326,8 +326,11 @@ WOK
f=/^(\S)/.match(word)[1]
if letter < f.upcase
while letter < f.upcase
- letter=alph.shift
- @file_concordance << %{\n<hr />\n<p class="book_index_lev1"><a name="#{letter}">#{letter}</a></p>}
+ if alph.length > 0
+ letter=alph.shift
+ @file_concordance << %{\n<hr />\n<p class="book_index_lev1"><a name="#{letter}">#{letter}</a></p>}
+ else break
+ end
end
end
keyword=SiSU_Concordance::Source::Word.new(word,@freq[word]).html
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index c01c2d0..18e2f8d 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -265,51 +265,6 @@ module SiSU_DAL
outputdata
end
protected
- def output_filetypes_in_cmd(cmd_shortcut,source=nil)
- #make list of file types in shortcut command (as configured), e.g. when sisu -3 is used
- cf_defaults=SiSU_Env::Info_processing_flag.new
- cmd_list=case cmd_shortcut.inspect
- when /0/; cf_defaults.cf_0
- when /1/; cf_defaults.cf_1
- when /2/; cf_defaults.cf_2
- when /3/; cf_defaults.cf_3
- when /4/; cf_defaults.cf_4
- when /5/; cf_defaults.cf_5
- end
- 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[:gen] <<= if cmd_list =~ /h/; ['toc.html', 'doc.html']
- end
- file_type_names[:gen] <<= if cmd_list =~ /p/; ['landscape.pdf', 'portrait.pdf']
- end
- #file_type_names[:gen] <<= if cmd_list =~ /i/; 'manpage.1'
- #end
- file_type_names[:gen] <<= if cmd_list =~ /o/; 'opendocument.odt'
- end
- file_type_names[:gen] <<= if cmd_list =~ /b/; 'scroll.xhtml'
- end
- file_type_names[:gen] <<= if cmd_list =~ /x/; 'sax.xml'
- end
- file_type_names[:gen] <<= if cmd_list =~ /X/; 'dom.xml'
- end
- file_type_names[:gen] <<= if cmd_list =~ /a/; 'plain.txt'
- end
- file_type_names[:gen] <<= if cmd_list =~ /g/; 'wiki.txt'
- end
- file_type_names[:gen] <<= if cmd_list =~ /w/; 'concordance.html'
- end
- file_type_names[:gen] <<= if cmd_list =~ /N/; 'digest.txt'
- end
- file_type_names[:src] <<= if source and cmd_shortcut =~ /s/; source
- end
- file_type_names[:src] <<= if cmd_shortcut =~ /S/; "#{source}.zip"
- end
- file_type_names[:gen]=file_type_names[:gen].flatten
- file_type_names[:src]=file_type_names[:src].flatten
- file_type_names
- end
end
end
__END__
diff --git a/lib/sisu/v0/dal_expand_insertions.rb b/lib/sisu/v0/dal_expand_insertions.rb
index 1ab0c03..1736209 100644
--- a/lib/sisu/v0/dal_expand_insertions.rb
+++ b/lib/sisu/v0/dal_expand_insertions.rb
@@ -64,6 +64,51 @@ module SiSU_insertions
def initialize(data)
@data=data
end
+ def output_filetypes_in_cmd(cmd_shortcut,source=nil)
+ #make list of file types in shortcut command (as configured), e.g. when sisu -3 is used
+ cf_defaults=SiSU_Env::Info_processing_flag.new
+ cmd_list=case cmd_shortcut.inspect
+ when /0/; cf_defaults.cf_0
+ when /1/; cf_defaults.cf_1
+ when /2/; cf_defaults.cf_2
+ when /3/; cf_defaults.cf_3
+ when /4/; cf_defaults.cf_4
+ when /5/; cf_defaults.cf_5
+ end
+ 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[:gen] <<= if cmd_list =~ /h/; ['toc.html', 'doc.html']
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /p/; ['landscape.pdf', 'portrait.pdf']
+ end
+ #file_type_names[:gen] <<= if cmd_list =~ /i/; 'manpage.1'
+ #end
+ file_type_names[:gen] <<= if cmd_list =~ /o/; 'opendocument.odt'
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /b/; 'scroll.xhtml'
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /x/; 'sax.xml'
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /X/; 'dom.xml'
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /a/; 'plain.txt'
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /g/; 'wiki.txt'
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /w/; 'concordance.html'
+ end
+ file_type_names[:gen] <<= if cmd_list =~ /N/; 'digest.txt'
+ end
+ file_type_names[:src] <<= if source and cmd_shortcut =~ /s/; source
+ end
+ file_type_names[:src] <<= if cmd_shortcut =~ /S/; "#{source}.zip"
+ end
+ 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=@data
tuned_file,tuned_file_tmp=[],[]
diff --git a/lib/sisu/v0/dal_idx.rb b/lib/sisu/v0/dal_idx.rb
index c2bba84..d7d5223 100644
--- a/lib/sisu/v0/dal_idx.rb
+++ b/lib/sisu/v0/dal_idx.rb
@@ -181,8 +181,11 @@ module SiSU_book_index
f=/^(\S)/.match(x)[1]
if letter < f
while letter < f
- letter=alph.shift
- @idx[:html] << %{\n<hr />\n<p class="book_index_lev1"><a name="#{letter}">#{letter}</a></p>}
+ if alph.length > 0
+ letter=alph.shift
+ @idx[:html] << %{\n<hr />\n<p class="book_index_lev1"><a name="#{letter}">#{letter}</a></p>}
+ else break
+ end
end
end
@idx[:sst] << %{\n\n#{Mx[:fa_bold_o]}#{x},#{Mx[:fa_bold_c]} }