aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-02-14 18:39:16 -0500
committerRalph Amissah <ralph@amissah.com>2013-02-14 18:39:16 -0500
commitd2fa6daa3f2ecbafd2dda8d6da895ef69575e3b3 (patch)
treef770693fea411cc2f85e6c442119860b19fc03ff /lib/sisu/v4
parentv4 (v3): version & changelog (diff)
v4 (v3): cosmetic, minor code shuffle, & remove trailing white-spaces
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/constants.rb1
-rw-r--r--lib/sisu/v4/epub_format.rb3
-rw-r--r--lib/sisu/v4/html.rb12
-rw-r--r--lib/sisu/v4/html_format.rb8
-rw-r--r--lib/sisu/v4/hub.rb2
-rw-r--r--lib/sisu/v4/manifest.rb14
-rw-r--r--lib/sisu/v4/urls.rb4
7 files changed, 21 insertions, 23 deletions
diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb
index 7ad3516b..505fdc02 100644
--- a/lib/sisu/v4/constants.rb
+++ b/lib/sisu/v4/constants.rb
@@ -295,6 +295,7 @@ DEVELOPER={
__END__
puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:red).set
puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:green)
+puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia)
puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__
puts "#{ANSI_C[:red]} #{__LINE__.to_s} #{ANSI_C[:off]} #{__FILE__}"
puts ANSI_C[:fuchsia] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:fuchsia]}\\1#{ANSI_C[:off]}")
diff --git a/lib/sisu/v4/epub_format.rb b/lib/sisu/v4/epub_format.rb
index 48408162..a56ea394 100644
--- a/lib/sisu/v4/epub_format.rb
+++ b/lib/sisu/v4/epub_format.rb
@@ -65,7 +65,6 @@ module SiSU_EPUB_Format
def initialize(md,ocn)
@md,@ocn=md,ocn.to_s
@ocn ||=''
- vz=SiSU_Viz::Defaults.new
end
def ocn_display
make=SiSU_Env::ProcessingSettings.new(@md)
@@ -1687,7 +1686,7 @@ output_epub_cont_seg.close
fn=fn_base + Sfx[:epub_xhtml]
name=hashtag ? fn + hashtag : fn
name=name ? name : dob.name
- guide_name=(name =~/#{Sfx[:epub_xhtml]}/) ? name : (name + Sfx[:epub_xhtml])
+ guide_name=(name =~/#{Sfx[:epub_xhtml]}/) ? name : (name + Sfx[:epub_xhtml])
<<-WOK
<reference type="text" href="#{guide_name}" />
WOK
diff --git a/lib/sisu/v4/html.rb b/lib/sisu/v4/html.rb
index 94b20afe..9b73823b 100644
--- a/lib/sisu/v4/html.rb
+++ b/lib/sisu/v4/html.rb
@@ -108,18 +108,18 @@ module SiSU_HTML
data=nil
tuned_file_array=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions
data=tuned_file_array
- if @opt.act[:html_scroll][:set]==:on
+ if @opt.act[:html_scroll][:set]==:on
scr_endnotes=SiSU_HTML::Source::Endnotes.new(data,@md).scroll
end
toc=SiSU_HTML::Source::Toc.new(@md,data).songsheet
links_guide=SiSU_HTML::Source::LinksGuide.new(data,@md).toc
data=tuned_file_array
scr_toc=SiSU_HTML::Source::ScrollHeadAndSegToc.new(@md,toc,links_guide).in_common #watch
- if @opt.act[:html_seg][:set]==:on
+ if @opt.act[:html_seg][:set]==:on
SiSU_HTML::Source::Seg.new(@md,data).songsheet
end
data=tuned_file_array
- if @opt.act[:html_scroll][:set]==:on
+ if @opt.act[:html_scroll][:set]==:on
scr=SiSU_HTML::Source::Scroll.new(@md,data,scr_endnotes).songsheet
scroll=SiSU_HTML::Source::ScrollOutput.new(scr_toc,scr[:body],scr[:metadata],scr[:owner_details],scr[:tails],@md).publish
SiSU_HTML::Source::Output.new(scroll,@md).scroll
@@ -602,7 +602,7 @@ WOK
ads=SiSU_HTML_Promo::Ad.new(@md)
@segtoc << format_head_toc.seg_navigation_tail << ads.div.close << ads.display << format_head_toc.html_close
@segtoc=@segtoc.flatten.compact #watch
- if @md.opt.act[:html_seg][:set]==:on
+ if @md.opt.act[:html_seg][:set]==:on
SiSU_HTML::Source::Output.new(@segtoc,@md).segtoc
end
@segtoc=[]
@@ -633,7 +633,7 @@ WOK
@o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
end
def scroll
- if @md.opt.act[:html_scroll][:set]==:on
+ if @md.opt.act[:html_scroll][:set]==:on
begin
@filename_html_scroll=@file.write_file.html_scroll
@data.each do |para|
@@ -657,7 +657,7 @@ WOK
end
end
def segtoc
- if @md.opt.act[:html_seg][:set]==:on
+ if @md.opt.act[:html_seg][:set]==:on
begin
@filename_html_segtoc=@file.write_file.html_segtoc
@data.each do |para|
diff --git a/lib/sisu/v4/html_format.rb b/lib/sisu/v4/html_format.rb
index 7fcf89a0..25a8dbee 100644
--- a/lib/sisu/v4/html_format.rb
+++ b/lib/sisu/v4/html_format.rb
@@ -67,8 +67,8 @@ module SiSU_HTML_Format
@ocn ||=''
end
def ocn_display
- @make=SiSU_Env::ProcessingSettings.new(@md)
- if @make.build.ocn?
+ make=SiSU_Env::ProcessingSettings.new(@md)
+ if make.build.ocn?
ocn_class='ocn'
if @ocn.to_i==0
@ocn.gsub(/^(\d+|)$/,
@@ -104,11 +104,10 @@ module SiSU_HTML_Format
@vz=SiSU_Viz::Defaults.new
@seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || [])
@seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || [])
- @metalink='#metadata'
@tocband_scroll,@tocband_segtoc=nil,nil
@stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet
@o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
- @index='index'
+ @index,@metalink='index','#metadata'
@toc="#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}"
end
def url_path_image_sys
@@ -1235,7 +1234,6 @@ WOK
def clean(txt)
txt=txt.gsub(/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}/,'').
gsub(/#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/,'')
- txt
end
def subtoc_lev(tag,attrib)
@txt=clean(@txt)
diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb
index d55a5f17..e02fa940 100644
--- a/lib/sisu/v4/hub.rb
+++ b/lib/sisu/v4/hub.rb
@@ -673,7 +673,7 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on
or @opt.act[:scp][:set]==:on \
or @opt.act[:webrick][:set]==:on \
or @opt.act[:zap][:set]==:on \
- or (
+ or (
@opt.cmd =~/^-/ \
and @opt.cmd =~/([abCcDdeFGgHhIjikLMmNnoPpQqRrSsTtUuVvWwXxYyZ_0-9])/ \
and @opt.mod.inspect !~/--(?:sitemaps|query|identify)/ \
diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb
index c5a841a1..d7c4d33a 100644
--- a/lib/sisu/v4/manifest.rb
+++ b/lib/sisu/v4/manifest.rb
@@ -511,14 +511,14 @@ WOK
end
end
def metadata_tests
- if defined? @md.title #%
+ if defined? @md.title #%
if defined? @md.title.full \
and @md.title.full=~/\S+/
id,info=@translate.full_title,@md.title.full
metadata(id,info)
end
end
- if defined? @md.creator #%
+ if defined? @md.creator #%
if defined? @md.creator.author \
and @md.creator.author=~/\S+/
id,info=@translate.author,@md.creator.author
@@ -562,7 +562,7 @@ WOK
metadata(id,info)
end
end
- if defined? @md.date #%
+ if defined? @md.date #%
if defined? @md.date.published \
and @md.date.published=~/\S+/ #dc
id,info=@translate.date,@md.date.published
@@ -599,7 +599,7 @@ WOK
id,info=@translate.publisher,@md.publisher
metadata(id,info)
end
- if defined? @md.notes #%
+ if defined? @md.notes #%
if defined? @md.notes.description \
and @md.notes.description=~/\S+/
id,info=@translate.description,@md.notes.description
@@ -626,7 +626,7 @@ WOK
metadata(id,info)
end
end
- if defined? @md.title #%
+ if defined? @md.title #%
if defined? @md.title.language \
and @md.title.language=~/\S+/
id,info=@translate.language,@md.title.language
@@ -638,7 +638,7 @@ WOK
metadata(id,info)
end
end
- if defined? @md.classify #%
+ if defined? @md.classify #%
if defined? @md.topic_register_array \
and @md.topic_register_array.length > 0
@manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{@translate.topic_register}:</p></th><td>\n}
@@ -701,7 +701,7 @@ WOK
metadata(id,info)
end
end
- if defined? @md.identifier #%
+ if defined? @md.identifier #%
if defined? @md.identifier.oclc \
and @md.identifier.oclc=~/\S+/
id,info=@translate.cls_oclc,@md.identifier.oclc
diff --git a/lib/sisu/v4/urls.rb b/lib/sisu/v4/urls.rb
index ad7ab480..e5341581 100644
--- a/lib/sisu/v4/urls.rb
+++ b/lib/sisu/v4/urls.rb
@@ -324,11 +324,11 @@ module SiSU_Urls
or @opt.act[:html_scroll][:set]==:on \
or @opt.act[:html_seg][:set]==:on)
if x =~/scroll/
- if @opt.act[:html_scroll][:set]==:on
+ if @opt.act[:html_scroll][:set]==:on
show.html.scroll(x)
end
else
- if @opt.act[:html_seg][:set]==:on
+ if @opt.act[:html_seg][:set]==:on
show.html.toc(x)
end
end