aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/epub_concordance.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-04-19 21:37:52 -0400
committerRalph Amissah <ralph@amissah.com>2011-04-19 21:37:52 -0400
commit44464e284ee840ee0ef7eae2d3f8d589680b18ca (patch)
tree7967e499e253737a4d8573e9c903ee714be1e762 /lib/sisu/v3/epub_concordance.rb
parentv3: options, hub, introduce opt.act booleans, more setting in options (diff)
v3: param, md remove md.cmd and md.mod shortcut methods, use use md.opt
* affects many files that now use @md.opt.cmd & @md.opt.mod (instead of @md.cmd & @md.mod)
Diffstat (limited to 'lib/sisu/v3/epub_concordance.rb')
-rw-r--r--lib/sisu/v3/epub_concordance.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sisu/v3/epub_concordance.rb b/lib/sisu/v3/epub_concordance.rb
index e03034dc..205f4f22 100644
--- a/lib/sisu/v3/epub_concordance.rb
+++ b/lib/sisu/v3/epub_concordance.rb
@@ -75,20 +75,20 @@ module SiSU_EPUB_Concordance
begin
@env,@md=@particulars.env,@particulars.md
loc=@env.url.output_tell
- tool=((@md.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:concordance]}" : '')
- SiSU_Screen::Ansi.new(@md.cmd,"Concordance",tool).grey_title_hi unless @md.cmd =~/q/
+ tool=((@md.opt.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:concordance]}" : '')
+ SiSU_Screen::Ansi.new(@md.opt.cmd,"Concordance",tool).grey_title_hi unless @md.opt.cmd =~/q/
wordmax=@env.concord_max
unless @md.wc_words.nil?
if @md.wc_words < wordmax
SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet
else
- SiSU_Screen::Ansi.new(@md.cmd,"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})").warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.opt.cmd,"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})").warn unless @md.opt.cmd =~/q/
end
else
- SiSU_Screen::Ansi.new(@md.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.opt.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.opt.cmd =~/q/
SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet
end
- rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
+ rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
end
end
@@ -170,14 +170,14 @@ WOK
@rxp_excluded0=/^(?:#{Mx[:fa_bold_o]}|#{Mx[:fa_italics_o]})?(?:to\d+|\d+|&nbsp;|#{Mx[:br_endnotes]}|EOF|#{Mx[:br_eof]}|thumb_\S+|snap_\S+|_+|-+|[(]?(?:ii+|iv|vi+|ix|xi+|xiv|xv|xvi+|xix|xx)[).]?|\S+?_\S+|[\d_]+\w\S+|[\w\d]{1,2}|\d{1,3}\w?|[0-9a-f]{16,64}|\d{2,3}x\d{2,3}|\S{0,2}sha\d|\S{0,3}\d{4}w\d\d|\b\w\d+|\d_all\b|e\.?g\.?)(?:#{Mx[:fa_bold_c]}|#{Mx[:fa_italics_c]})?$/mi #this regex causes and cures a stack dump in ruby 1.9 !!!
@rgx_splitlist=%r{[—.,;:-]+|#{Mx[:nbsp]}+}mi
@rgx_scanlist=%r{#{Mx[:fa_italics_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_bold_c]}|#{Mx[:url_o]}https?://\S+?#{Mx[:url_c]}|file://\S+|<\S+?>|\w+|[a-zA-Z]+}mi
- rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
+ rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
end
end
def songsheet
begin
@file_concordance=File.open("#{@path}/content/#{@md.fn[:epub_concord]}",'w')
map_para
- rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
+ rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
@file_concordance.close
end