aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-12-11 21:30:36 -0500
committerRalph Amissah <ralph@amissah.com>2008-12-11 21:31:47 -0500
commit1b8c2dbfb474dce40548bc1cfc052017a9682a12 (patch)
tree33c160fe7acd0cd22ecbd35597d3a543cce6f181
parentodf_format, copyright notice consistency (diff)
harvest, better integrated into sisu
[note sql module not yet updated to include topic_register, as requires recreation of all sisu db(s)]
-rw-r--r--lib/sisu/v0/css.rb90
-rw-r--r--lib/sisu/v0/harvest.rb4
-rw-r--r--lib/sisu/v0/harvest_authors.rb33
-rw-r--r--lib/sisu/v0/harvest_topics.rb33
-rw-r--r--lib/sisu/v0/hub.rb6
-rw-r--r--lib/sisu/v0/i18n.rb21
-rw-r--r--lib/sisu/v0/manifest.rb16
7 files changed, 181 insertions, 22 deletions
diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb
index d5a15971..2094134f 100644
--- a/lib/sisu/v0/css.rb
+++ b/lib/sisu/v0/css.rb
@@ -248,6 +248,7 @@ WOK
}
th, td {
display: inline;
+ vertical-align: top;
}
*/
a:link {
@@ -334,7 +335,7 @@ WOK
.norm, .bold {
line-height: 150%;
- margin-left: 1em;
+ margin-left: 0em;
margin-right: 2em;
margin-top: 10px;
margin-bottom: 0px;
@@ -347,22 +348,83 @@ WOK
font-weight: normal;
line-height: 150%;
text-align: justify;
- margin-left: 1em;
+ margin-left: 0em;
margin-right: 2em;
text-indent: 0mm;
margin-top: 3px;
margin-bottom: 3px;
}
p.norm { }
- p.i1 {margin-left: 2em;}
- p.i2 {margin-left: 3em;}
- p.i3 {margin-left: 4em;}
- p.i4 {margin-left: 5em;}
- p.i5 {margin-left: 6em;}
- p.i6 {margin-left: 7em;}
- p.i7 {margin-left: 8em;}
- p.i8 {margin-left: 9em;}
- p.i9 {margin-left: 10em;}
+ p.i1 {margin-left: 1em;}
+ p.i2 {margin-left: 2em;}
+ p.i3 {margin-left: 3em;}
+ p.i4 {margin-left: 4em;}
+ p.i5 {margin-left: 5em;}
+ p.i6 {margin-left: 6em;}
+ p.i7 {margin-left: 7em;}
+ p.i8 {margin-left: 8em;}
+ p.i9 {margin-left: 9em;}
+
+ p.it0 {
+ margin-left: 0em;
+ margin-top: 6px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it1 {
+ margin-left: 1em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it2 {
+ margin-left: 2em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it3 {
+ margin-left: 3em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it4 {
+ margin-left: 4em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it5 {
+ margin-left: 5em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it6 {
+ margin-left: 6em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it7 {
+ margin-left: 7em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it8 {
+ margin-left: 8em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ line-height: 100%;
+ }
+ p.it9 {
+ margin-left: 9em;
+ margin-bottom: 0px;
+ margin-top: 0px;
+ line-height: 100%;
+ }
p.code {
font-family: inconsolata, andale mono, courier new, courier, monospace;
@@ -396,6 +458,10 @@ WOK
p.bold {
font-weight: bold;
}
+ p.bold_left {
+ font-weight: bold;
+ text-align: left;
+ }
p.centerbold {
text-align: center;
font-weight: bold;
@@ -534,7 +600,7 @@ WOK
table { }
tr { }
- th, td { }
+ th, td { vertical-align: top; }
p.left, th.left, td.left {
text-align: left;
diff --git a/lib/sisu/v0/harvest.rb b/lib/sisu/v0/harvest.rb
index e8609a93..49303571 100644
--- a/lib/sisu/v0/harvest.rb
+++ b/lib/sisu/v0/harvest.rb
@@ -80,6 +80,10 @@ def cases(opt)
css(opt) if opt.cmd.inspect =~/M/
HARVEST_authors::Songsheet.new(opt).songsheet
HARVEST_topics::Songsheet.new(opt).songsheet
+ if opt.cmd.inspect =~/R/
+ require "#{SiSU_lib}/remote"
+ SiSU_Remote::Put.new(opt).rsync_harvest
+ end
else
help
end
diff --git a/lib/sisu/v0/harvest_authors.rb b/lib/sisu/v0/harvest_authors.rb
index 7a5e1cea..9586fcc3 100644
--- a/lib/sisu/v0/harvest_authors.rb
+++ b/lib/sisu/v0/harvest_authors.rb
@@ -168,38 +168,57 @@ module HARVEST_authors
@env=SiSU_Env::Info_env.new
@rc=Get_init.instance.yamlrc
@page='sisu_manifest.html'
+ @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
+ @letter=@alph.shift
+ @vz=SiSU_Env::Get_init.instance.skin
+ end
+ def html_file_open
@output={}
@output[:html]=File.new("#{@env.path.output_md_harvest}/harvest_authors.html",'w')
@output[:html_mnt]= if @opt.cmd.inspect =~/-M/
File.new("#{@env.path.pwd}/harvest_authors.html",'w')
else nil
end
- @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
- @letter=@alph.shift
+ end
+ def html_file_close
+ @output[:html].close
+ @output[:html_mnt].close if @output[:html_mnt].class == File
end
def html_print
def html_songsheet
+ html_file_open
html_head
html_alph
html_body
html_tail
+ html_file_close
end
def html_head_adjust(type='')
css_path=if type !~/maintenance/
'../_sisu/css/harvest.css'
else 'harvest.css'
end
+ sv=SiSU_Env::Info_version.new.get_version
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SiSU Metadata Harvest - Authors</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="dc.title" content= "SiSU metadata harvest, Authors - SiSU information Structuring Universe, Structured information Serialised Units, 2008" />
+<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
+<meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" />
+<link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" />
<link rel="stylesheet" href="#{css_path}" type="text/css" />
+<link rel="shortcut icon" href="../_sisu/image/rb7.ico" />
</head>
<body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en">
+<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>also see <a href="harvest_topics.html">SiSU Metadata Harvest - Topics</a></p>
+<p>[<a href="../index.html">&nbsp;HOME&nbsp;</a>] also see <a href="harvest_topics.html">SiSU Metadata Harvest - Topics</a></p>
<hr />
WOK
end
@@ -222,6 +241,14 @@ WOK
def html_tail
a=[]
a <<<<WOK
+<hr />
+<a name="bottom" id="bottom"></a>
+<a name="down" id="down"></a>
+<a name="end" id="end"></a>
+<a name="finish" id="finish"></a>
+<a name="stop" id="stop"></a>
+<a name="credits"></a>
+#{@vz.credits_sisu}
</body>
</html>
WOK
diff --git a/lib/sisu/v0/harvest_topics.rb b/lib/sisu/v0/harvest_topics.rb
index bda82629..51f55b2b 100644
--- a/lib/sisu/v0/harvest_topics.rb
+++ b/lib/sisu/v0/harvest_topics.rb
@@ -251,37 +251,56 @@ module HARVEST_topics
@env=SiSU_Env::Info_env.new
@rc=Get_init.instance.yamlrc
@page='sisu_manifest.html'
+ @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
+ @letter=@alph.shift
+ @vz=SiSU_Env::Get_init.instance.skin
+ end
+ def html_file_open
@output={}
@output[:html]=File.new("#{@env.path.output_md_harvest}/harvest_topics.html",'w')
if @opt.cmd.inspect =~/-M/
@output[:html_mnt]=File.new("#{@env.path.pwd}/harvest_topics.html",'w')
end
- @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
- @letter=@alph.shift
+ end
+ def html_file_close
+ @output[:html].close
+ @output[:html_mnt].close if @output[:html_mnt].class == File
end
def html_print
def html_songsheet
+ html_file_open
html_head
html_alph
html_body
html_tail
+ html_file_close
end
def html_head_adjust(type='')
css_path=if type !~/maintenance/
'../_sisu/css/harvest.css'
else 'harvest.css'
end
+ sv=SiSU_Env::Info_version.new.get_version
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SiSU Metadata Harvest - Topics</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="dc.title" content= "SiSU metadata harvest, Topics - SiSU information Structuring Universe, Structured information Serialised Units, 2008" />
+<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
+<meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" />
+<link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" />
<link rel="stylesheet" href="#{css_path}" type="text/css" />
+<link rel="shortcut icon" href="../_sisu/image/rb7.ico" />
</head>
<body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en">
+<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>also see <a href="harvest_authors.html">SiSU Metadata Harvest - Authors</a></p>
+<p>[<a href="../index.html">&nbsp;HOME&nbsp;</a>] also see <a href="harvest_authors.html">SiSU Metadata Harvest - Authors</a></p>
<hr />
WOK
end
@@ -304,6 +323,14 @@ WOK
def html_tail
a=[]
a <<<<WOK
+<hr />
+<a name="bottom" id="bottom"></a>
+<a name="down" id="down"></a>
+<a name="end" id="end"></a>
+<a name="finish" id="finish"></a>
+<a name="stop" id="stop"></a>
+<a name="credits"></a>
+#{@vz.credits_sisu}
</body>
</html>
WOK
diff --git a/lib/sisu/v0/hub.rb b/lib/sisu/v0/hub.rb
index 93766140..33af71f9 100644
--- a/lib/sisu/v0/hub.rb
+++ b/lib/sisu/v0/hub.rb
@@ -181,7 +181,7 @@ module SiSU
end
end
end
- SiSU_Remote::Put.new(@opt).rsync_harvest if @opt.cmd.inspect =~/R/ and @opt.mod.inspect =~/harvest/
+ #SiSU_Remote::Put.new(@opt).rsync_harvest if @opt.cmd.inspect =~/R/ and @opt.mod.inspect =~/harvest/
elsif @req =~/^dbi$/; SiSU_DBI::SiSU_SQL.new(@opt).connect # -D -d
elsif @req=~/^sisupod_make$/; SiSU_Doc::Source.new(@opt).read # -S
end
@@ -495,8 +495,8 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
if @opt.cmd =~/R/; op('remote','rsync') #% -R copy to remote server
end
else
- if @opt.cmd =~/R/; op('remote','rsync_harvest') #% -R copy to remote server
- end
+ #if @opt.cmd =~/R/; op('remote','rsync_harvest') #% -R copy to remote server
+ #end
end
if @opt.cmd =~/[QuUvVM]/; op('urls','urls') #% -Q -u -v -V -M urls
end
diff --git a/lib/sisu/v0/i18n.rb b/lib/sisu/v0/i18n.rb
index 673ab08d..20f788f5 100644
--- a/lib/sisu/v0/i18n.rb
+++ b/lib/sisu/v0/i18n.rb
@@ -227,6 +227,9 @@ module SiSU_Translate
def prefix_b
@lang_class.prefix_b
end
+ def topic_register
+ @lang_class.topic_register
+ end
def fns
@lang_class.fns
end
@@ -436,6 +439,9 @@ module SiSU_Translate
def prefix_b
'Prefix (b)'
end
+ def topic_register
+ 'Topics Registered'
+ end
def sourcefile
'Sourcefile'
end
@@ -641,6 +647,9 @@ module SiSU_Translate
def prefix_b
'Préfixe (b)'
end
+ def topic_register
+ 'Topics Registered'
+ end
def sourcefile
'Fichier source'
end
@@ -846,6 +855,9 @@ module SiSU_Translate
def prefix_b
'Präfix (b)'
end
+ def topic_register
+ 'Topics Registered'
+ end
def sourcefile
'Quelldatei'
end
@@ -1051,6 +1063,9 @@ module SiSU_Translate
def prefix_b
'Prefijo (b)'
end
+ def topic_register
+ 'Topics Registered'
+ end
def sourcefile
'Fichero fuente'
end
@@ -1256,6 +1271,9 @@ module SiSU_Translate
def prefix_b
'Premessa (b)'
end
+ def topic_register
+ 'Topics Registered'
+ end
def sourcefile
'Sorgente'
end
@@ -1461,6 +1479,9 @@ module SiSU_Translate
def prefix_b
'Prefix (b)'
end
+ def topic_register
+ 'Topics Registered'
+ end
def sourcefile
'Lähdetiedosto'
end
diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb
index 0b7c7bfc..793ecdc2 100644
--- a/lib/sisu/v0/manifest.rb
+++ b/lib/sisu/v0/manifest.rb
@@ -170,7 +170,7 @@ module SiSU_Manifest
end
end
def metadata(id,info)
- @manifest[:html] << %{<tr><th class="left"><p class="bold">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n}
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n}
end
def links(url,lnk,target)
static=if url =~/^\.\//; url.gsub(/^\.(\.)?/,@base_url)
@@ -465,6 +465,20 @@ module SiSU_Manifest
id,info=@translate.prefix_b,@md.prefix_b
metadata(id,info)
end
+ if @md.topic_register_array.length > 1
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{@translate.topic_register}:</p></th><td>\n}
+ @md.topic_register_array.each do |t|
+ t.each_with_index do |st,i|
+ if st.class == Array
+ st.each do |v|
+ @manifest[:html] << %{<p class="it#{i}">#{v}</p>\n}
+ end
+ else @manifest[:html] << %{<p class="it#{i}">#{st}</p>\n}
+ end
+ end
+ end
+ @manifest[:html] << %{</td></tr>\n}
+ end
if @md.fns
id,info=@translate.sourcefile,@md.fns
metadata(id,info)