aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/dal.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-09-23 05:16:53 +0100
committerRalph Amissah <ralph@amissah.com>2007-09-23 05:16:53 +0100
commitbcd7f88ba20b1dbc956522d90fca4f1982dddcef (patch)
treefea6227b42001b2949635b36daaf30da864e53ce /lib/sisu/v0/dal.rb
parentMerge branch 'upstream' into debian/sid (diff)
parentprimarily todo with sisu documentation, changelog reproduced below: (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/dal.rb')
-rw-r--r--lib/sisu/v0/dal.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index c2c92485..f5da8b05 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -264,7 +264,7 @@ module SiSU_DAL
end
data.each do |para|
para.strip!
- if para =~/\{\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?\}(?:(?:https?|ftp):\S+|image)/
+ if para =~/\{\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?\}(?:(?:https?|file|ftp):\S+|image)/
if para !~/\{\s*\S+\.(?:png|jpg|gif)\s+\d+x\d+\s+/
m=/\{\s*(\S+\.(?:png|jpg|gif))/
if @rmgk
@@ -295,7 +295,7 @@ module SiSU_DAL
end
end
para.gsub!(/(#{image})/,"#{image} #{img_col}x#{img_row}")
- else para.gsub!(/\{\s*(\S+)\.(png|jpg|gif).+?\}((?:https?|ftp):\S+|image)/,'[ \1 (\2 missing) ]')
+ else para.gsub!(/\{\s*(\S+)\.(png|jpg|gif).+?\}((?:https?|file|ftp):\S+|image)/,'[ \1 (\2 missing) ]')
end
end
else
@@ -306,7 +306,7 @@ module SiSU_DAL
end
end
end
- para.gsub!(/\{\s+(\S+\.(?:png|jpg|gif))\s+/i,'{\1 ') if para =~/\{\s+\S+\.(?:png|jpg|gif).+?\}(?:(?:https?|ftp):\S+|image)/
+ para.gsub!(/\{\s+(\S+\.(?:png|jpg|gif))\s+/i,'{\1 ') if para =~/\{\s+\S+\.(?:png|jpg|gif).+?\}(?:(?:https?|file|ftp):\S+|image)/
tuned_file << para unless para.nil?
end
tuned_file
@@ -329,6 +329,8 @@ module SiSU_DAL
end
file_type_names <<= if cmd_list =~ /p/; ['landscape.pdf', 'portrait.pdf']
end
+ #file_type_names <<= if cmd_list =~ /i/; 'manpage.1'
+ #end
file_type_names <<= if cmd_list =~ /o/; 'opendocument.odt'
end
file_type_names <<= if cmd_list =~ /b/; 'scroll.xhtml'
@@ -406,6 +408,7 @@ module SiSU_DAL
when /sax.xml/; ' xml, sax'
when /dom.xml/; ' xml, dom'
when /plain.txt/; ' plain text utf-8'
+ #when /manpage.1/; ' man, 1'
when /wiki.txt/; ' wiki text'
when /concordance.html/; ' concordance'
when /digest.txt/; ' dcc, document content certificate (digests)'
@@ -1069,7 +1072,7 @@ module SiSU_DAL
#s=s.gsub(/¡¡\d+¡/,' ') # tables
#s=s.gsub(/¡/,' ') # tables tidy later
#s=s.gsub(/<.+?>/,'')
- s=s.gsub(/\{.+?\.(?:png|jpg|gif).+?\}(?:https?|ftp)\\\:\S+ /,' [image] ') # else image names found in search
+ s=s.gsub(/\{.+?\.(?:png|jpg|gif).+?\}(?:https?|file|ftp)\\\:\S+ /,' [image] ') # else image names found in search
s=s.gsub(/\s\s+/,' ')
s=s.strip
end