aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-25 23:07:56 -0400
committerRalph Amissah <ralph@amissah.com>2013-03-25 23:07:56 -0400
commit88d06e3e9b40289ad2098a9bc7be82d5f1d22b89 (patch)
treefc217bf7ecb96747a7fa006ad30cd5c01ec896ea
parentdebian/changelog (4.0.16-1) (diff)
parentv4: version & changelog, dates touched (diff)
Merge tag 'sisu_4.0.17' into debian/sid
SiSU 4.0.17
-rw-r--r--data/doc/sisu/CHANGELOG_v417
-rw-r--r--data/sisu/v4/v/version.yml6
-rw-r--r--lib/sisu/v4/harvest_authors.rb17
-rw-r--r--lib/sisu/v4/harvest_topics.rb17
-rw-r--r--lib/sisu/v4/hub.rb2
-rw-r--r--lib/sisu/v4/manifest.rb14
-rw-r--r--lib/sisu/v4/param.rb3
-rw-r--r--lib/sisu/v4/sysenv.rb22
8 files changed, 79 insertions, 19 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index 95c45ff2..89a07c55 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -21,6 +21,23 @@ v2 branch is removed; it is available in sisu =< 3.3.2
%% Reverse Chronological:
+%% 4.0.17.orig.tar.xz (2013-03-25:12/1)
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.17
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.17-1
+http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.17.orig.tar.xz
+ sisu_4.0.17.orig.tar.xz
+ sisu_4.0.17-1.dsc
+
+* v4: manifest & harvest, links to default site home page index.html
+
+* v4: sysenv, copy or create homepages, one of the actions taken on --config
+ * provide info as to where manually created homepages may be stored
+ * do not make default sisu homepage (previously did)
+
+* v4: param, guard against situation where no document creator/author given
+
+* v4: hub, non-verbose terminal info reduced, minor
+
%% 4.0.16.orig.tar.xz (2013-03-18:11/1)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.16
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.16-1
diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml
index 2b1a5447..c5104cc7 100644
--- a/data/sisu/v4/v/version.yml
+++ b/data/sisu/v4/v/version.yml
@@ -1,5 +1,5 @@
---
-:version: 4.0.16
-:date_stamp: 2013w11/1
-:date: "2013-03-18"
+:version: 4.0.17
+:date_stamp: 2013w12/1
+:date: "2013-03-25"
:project: SiSU
diff --git a/lib/sisu/v4/harvest_authors.rb b/lib/sisu/v4/harvest_authors.rb
index 671b93ab..e360e3a3 100644
--- a/lib/sisu/v4/harvest_authors.rb
+++ b/lib/sisu/v4/harvest_authors.rb
@@ -252,6 +252,19 @@ module SiSU_HarvestAuthors
harvest_languages += %{<a href="#{file}">#{l}</a>&nbsp;&nbsp;&nbsp;}
end
sv=SiSU_Env::InfoVersion.instance.get_version
+ if @env.output_dir_structure.by? == :language
+ home_pth='../..'
+ output_structure_by='(output organised by language &amp; filetype)'
+ elsif @env.output_dir_structure.by? == :filetype
+ home_pth='..'
+ output_structure_by='(output organised by filetype)'
+ elsif @env.output_dir_structure.by? == :filename
+ home_pth='.'
+ output_structure_by='(output organised by filename)'
+ else
+ home_pth='.'
+ output_structure_by='(output organised by ?)'
+ end
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -270,8 +283,8 @@ module SiSU_HarvestAuthors
<a name="top" id="top"></a>
<a name="up" id="up"></a>
<a name="start" id="start"></a>
-<h1>SiSU Metadata Harvest - Authors</h1>
-<p>[<a href="../index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{topics}">SiSU Metadata Harvest - Topics</a></p>
+<h1>SiSU Metadata Harvest - Authors #{output_structure_by}</h1>
+<p>[<a href="#{home_pth}/index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{topics}">SiSU Metadata Harvest - Topics</a></p>
<p>#{@env.widget_static.search_form}</p>
<hr />
<p class="tiny">#{harvest_languages}</p>
diff --git a/lib/sisu/v4/harvest_topics.rb b/lib/sisu/v4/harvest_topics.rb
index fda71e7c..bce96ced 100644
--- a/lib/sisu/v4/harvest_topics.rb
+++ b/lib/sisu/v4/harvest_topics.rb
@@ -610,6 +610,19 @@ module SiSU_HarvestTopics
harvest_languages += %{<a href="#{file}">#{l}</a>&nbsp;&nbsp;&nbsp;}
end
sv=SiSU_Env::InfoVersion.instance.get_version
+ if @env.output_dir_structure.by? == :language
+ home_pth='../..'
+ output_structure_by='(output organised by language &amp; filetype)'
+ elsif @env.output_dir_structure.by? == :filetype
+ home_pth='..'
+ output_structure_by='(output organised by filetype)'
+ elsif @env.output_dir_structure.by? == :filename
+ home_pth='.'
+ output_structure_by='(output organised by filename)'
+ else
+ home_pth='.'
+ output_structure_by='(output organised by ?)'
+ end
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -628,8 +641,8 @@ module SiSU_HarvestTopics
<a name="top" id="top"></a>
<a name="up" id="up"></a>
<a name="start" id="start"></a>
-<h1>SiSU Metadata Harvest - Topics</h1>
-<p>[<a href="../index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{authors}">SiSU Metadata Harvest - Authors</a></p>
+<h1>SiSU Metadata Harvest - Topics #{output_structure_by}</h1>
+<p>[<a href="#{home_pth}/index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{authors}">SiSU Metadata Harvest - Authors</a></p>
<p>#{@env.widget_static.search_form}</p>
<hr />
<p class="tiny">#{harvest_languages}</p>
diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb
index 6577f1fa..70a9fc9a 100644
--- a/lib/sisu/v4/hub.rb
+++ b/lib/sisu/v4/hub.rb
@@ -694,7 +694,7 @@ module SiSU
if action_on_file_ == :true \
and @opt.files.length > 0
do_loops
- @msg,@msgs="\tsisu -W [to start ruby web-server on output directory]\n",nil unless @opt.act[:quiet][:set] ==:on
+ @msg,@msgs="\tsisu -W [to start ruby web-server on output directory]\n",nil if @opt.cmd =~/[vVM]/
@tell.call.print_brown if @opt.cmd =~/[uUvVM]/ unless @opt.files.join.empty?
if defined? @@env.processing_path.processing \
and @@env.user \
diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb
index 1f5724c5..403271b5 100644
--- a/lib/sisu/v4/manifest.rb
+++ b/lib/sisu/v4/manifest.rb
@@ -833,14 +833,22 @@ WOK
elsif @f.output_dir_structure.by_language_code? \
or @f.output_dir_structure.by_filetype?
pth_local=@f.output_path.manifest.dir
- pth_rel='./'
+ pth_rel='.'
else
pth_local=@f.output_path.base.dir
- pth_rel='../'
+ pth_rel='..'
+ end
+ pth_rel_home=if @env.output_dir_structure.by? == :language
+ '../..'
+ elsif @env.output_dir_structure.by? == :filetype
+ '..'
+ elsif @env.output_dir_structure.by? == :filename
+ '..'
+ else '..'
end
harvest=(FileTest.file?("#{pth_local}/authors#{@fn_lng}.html") \
&& FileTest.file?("#{pth_local}/topics#{@fn_lng}.html")) \
- ? %{<p class="small">other document manifests: [<a href="#{pth_rel}authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}topics#{@fn_lng}.html">topics</a>]</p>}
+ ? %{<p class="small"><a href="#{pth_rel_home}/index.html">.:</a> other document manifests: [<a href="#{pth_rel}/authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}/topics#{@fn_lng}.html">topics</a>]</p>}
: ''
manifest_title=%{<p class="bold">#{@translate.manifest_description}</p>#{harvest}}
@manifest[:html] <<<<WOK
diff --git a/lib/sisu/v4/param.rb b/lib/sisu/v4/param.rb
index 360625e4..035697c9 100644
--- a/lib/sisu/v4/param.rb
+++ b/lib/sisu/v4/param.rb
@@ -1154,7 +1154,8 @@ module SiSU_Param
tf="@title: #{tf}"
@title=SiSU_Param::Parameters::Md.new(tf.strip,@opt,@env).title
end
- creator=(defined? @creator.author \
+ creator=(@creator.is_a?(SiSU_Param::Parameters::Md) \
+ && defined? @creator.author \
&& @creator.author.is_a?(String)) \
? " #{@creator.author}"
: ''
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index 92ba76b5..6ed94d5d 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -5904,14 +5904,11 @@ WOK
@vz=SiSU_Viz::Defaults.new
@vz_home=SiSU_Viz::Home.new
end
- def homepage
- home_pages_manually_created=Dir.glob("#{@env.path.rc}/home/*.html")
- FileUtils::mkdir_p("#{@env.path.webserv}/#{@env.path.stub_pwd}") unless FileTest.directory?("#{@env.path.webserv}/#{@env.path.stub_pwd}")
- if home_pages_manually_created.length > 0
- home_pages_manually_created.each do |homepage|
- FileUtils.cp(homepage,"#{@env.path.webserv}/#{@env.path.stub_pwd}")
- end
+ def create_default_sisu_homepage(action=:none)
+ if action==:none
+ puts %{ place your homepages in directory:\n "#{@env.path.rc}/home/*.html"\n (no action taken)}
else
+ puts %{ place your homepages in directory:\n "#{@env.path.rc}/home/*.html"\n (in order to replace default sisu homepage)}
filename_homepage="#{@env.path.webserv}/#{@env.path.stub_pwd}/index.html"
filename_home_toc="#{@env.path.webserv}/#{@env.path.stub_pwd}/toc.html"
file_homepage=File.new(filename_homepage,'w')
@@ -5922,6 +5919,17 @@ WOK
file_home_toc.close
end
end
+ def homepage
+ home_pages_manually_created=Dir.glob("#{@env.path.rc}/home/*.html")
+ FileUtils::mkdir_p("#{@env.path.webserv}/#{@env.path.stub_pwd}") unless FileTest.directory?("#{@env.path.webserv}/#{@env.path.stub_pwd}")
+ if home_pages_manually_created.length > 0
+ home_pages_manually_created.each do |homepage|
+ FileUtils.cp(homepage,"#{@env.path.webserv}/#{@env.path.stub_pwd}")
+ end
+ else
+ create_default_sisu_homepage(:none)
+ end
+ end
def cp_images(src_path,dest_path)
if FileTest.directory?(src_path)
FileUtils::cd(src_path)