aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/develop/html_manifest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/develop/html_manifest.rb')
-rw-r--r--lib/sisu/develop/html_manifest.rb384
1 files changed, 195 insertions, 189 deletions
diff --git a/lib/sisu/develop/html_manifest.rb b/lib/sisu/develop/html_manifest.rb
index 3e61d29b..2e2b775d 100644
--- a/lib/sisu/develop/html_manifest.rb
+++ b/lib/sisu/develop/html_manifest.rb
@@ -160,19 +160,19 @@ module SiSU_Manifest
%{<p class="tiny">#{the_url_decoration.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{the_url_decoration.xml_close}</p>}
end
end
- def summarize(id,file,pth='',rel='',url='',img='● ')
+ def summarize(desc,id,file,pth='',rel='',url='',img='● ')
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
- @manifest[:txt] << "#{file} #{id} #{kb}\n"
- @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
+ @manifest[:txt] << "#{file} #{desc} #{kb}\n"
+ @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{desc}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
end
- def summarize_html_seg(id,file,pth='',rel='',url='',img='● ')
+ def summarize_html_seg(desc,id,file,pth='',rel='',url='',img='● ')
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
- @manifest[:txt] << "#{file} #{id} #{kb}\n"
- @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
+ @manifest[:txt] << "#{file} #{desc} #{kb}\n"
+ @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{desc}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
end
- def summarize_sources(id,file,pth,rel,url)
+ def summarize_sources(desc,id,file,pth,rel,url)
sys=SiSU_Env::SystemCall.new
dgst=case @dg
when :sha512
@@ -194,9 +194,9 @@ module SiSU_Manifest
end
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
- @manifest[:txt] << "#{file} #{id} #{kb}\n"
+ @manifest[:txt] << "#{file} #{desc} #{kb}\n"
@manifest[:html] << %{<tr>} \
- + %{<th class="left"><p class="norm"><a href="#{rel}/#{file}">#{id}</a></p></th>} \
+ + %{<th class="left"><p class="norm" id="#{id}"><a href="#{rel}/#{file}">#{desc}</a></p></th>} \
+ %{<td class="right"><p class="tiny"><a href="#{rel}/#{file}">#{file}</a> &nbsp;&nbsp;#{dgst[1]}#{url_make(url,file,:src)}</p></td>} \
+ %{<td class="right"><p class="right">#{kb}</p></td>} \
+ %{</tr>\n} \
@@ -246,7 +246,7 @@ module SiSU_Manifest
end
@m=@m.uniq
end
- def languages(id,file)
+ def languages(desc,file)
@manifest[:html] << %{<tr><th class="left"><div id="horizontal_links"><ul id="horizontal">\n}
published_manifests?.each do |l|
SiSU_Translate::Source.new(@md,@language,l[:n]).language_list
@@ -255,15 +255,15 @@ module SiSU_Manifest
end
@manifest[:html] << %{</ul></div></th></tr>\n}
end
- def published_languages(id)
+ def published_languages(desc)
published_manifests?.each do |l|
@manifest[:txt] << "#{l[:mu]} #{l[:l]}\n"
@manifest[:html] << %{<tr><th class="left"><p class="bold"><a href="#{l[:mu]}">#{l[:l]}</a></p></th><td><p class="norm">#{l[:l]}</p><p class="tiny">#{the_url_decoration.xml_open}<a href="#{l[:mu]}">#{l[:mu]}</a>#{the_url_decoration.xml_close}</p></td><td class="right"><p class="right">&nbsp;</p></td></tr>\n}
end
end
- def metadata(id,info)
+ def metadata(desc,id,info)
info=info.to_s.gsub(/(?:#{Mx[:br_line]}|\\)+/,'<br>')
- @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n}
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left" id="#{id}">#{desc}:</p></th><td><p class="left">#{info}</p></td></tr>\n}
end
def links(url,lnk,target)
static=if url =~/^\.\// then url.gsub(/^\.(\.)?/,@base_url)
@@ -278,279 +278,285 @@ module SiSU_Manifest
pth=@f.output_path.html_seg.dir
rel=@f.output_path.html_seg.rel_sm
url=@f.output_path.html_seg.url
- id,file='HTML, table of contents (for segmented text)',@f.base_filename.html_segtoc
- summarize_html_seg(id,file,pth,rel,url,img)
+ desc,id,file='HTML, table of contents (for segmented text)','html',@f.base_filename.html_segtoc
+ summarize_html_seg(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.html_scroll.dir)==true
img=%{<img border="0" height="15" width="15" src="#{@image_path}/b_doc.png" alt="Full Text" /> }
pth=@f.output_path.html_scroll.dir
rel=@f.output_path.html_scroll.rel_sm
url=@f.output_path.html_scroll.url
- id,file='HTML, full length document',@f.base_filename.html_scroll
- summarize(id,file,pth,rel,url,img)
+ desc,id,file='HTML, full length document','html_scroll',@f.base_filename.html_scroll
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.html_book_index.dir)==true
pth=@f.output_path.html_seg.dir
rel=@f.output_path.html_seg.rel_sm
url=@f.output_path.html_seg.url
- id,file='HTML, (book type) index',@f.base_filename.html_book_index
- summarize(id,file,pth,rel,url)
+ desc,id,file='HTML, (book type) index','html_book',@f.base_filename.html_book_index
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.html_concordance.dir)==true
pth=@f.output_path.html_seg.dir
rel=@f.output_path.html_seg.rel_sm
url=@f.output_path.html_seg.url
- id,file='HTML, concordance file',@f.base_filename.html_concordance
- summarize(id,file,pth,rel,url)
+ desc,id,file='HTML, concordance file','concordance',@f.base_filename.html_concordance
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.epub.dir)==true
img=%{<img border="0" height="18" width="18" src="#{@image_path}/b_epub.png" alt="EPUB" /> }
- id,file='EPUB (Electronic Publication, e-book standard)',@f.base_filename.epub
+ desc,id,file='EPUB (Electronic Publication, e-book standard)','epub',@f.base_filename.epub
pth=@f.output_path.epub.dir
rel=@f.output_path.epub.rel_sm
url=@f.output_path.epub.url
- summarize(id,file,pth,rel,url,img)
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_letter}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. letter size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_letter}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. letter size, portrait/vertical document (recommended for printing)",'pdf_letter',"#{@f.base_filename.pdf_p_letter}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_letter}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. letter size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_letter}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. letter size, landscape/horizontal document (recommended for screen viewing)",'pdf_letter_landscape',"#{@f.base_filename.pdf_l_letter}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_a4}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A4 size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_a4}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A4 size, portrait/vertical document (recommended for printing)",'pdf_a4',"#{@f.base_filename.pdf_p_a4}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_a4}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A4 size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_a4}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A4 size, landscape/horizontal document (recommended for screen viewing)",'pdf_a4_landscape',"#{@f.base_filename.pdf_l_a4}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_a5}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A5 (book) size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_a5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A5 (book) size, portrait/vertical document (recommended for printing)",'pdf_a5',"#{@f.base_filename.pdf_p_a5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_a5}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_a5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A5 (book) size, landscape/horizontal document (recommended for screen viewing)",'pdf_a5_landscape',"#{@f.base_filename.pdf_l_a5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_b5}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, B5 (book) size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_b5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, B5 (book) size, portrait/vertical document (recommended for printing)",'pdf_b5',"#{@f.base_filename.pdf_p_b5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_b5}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, B5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_b5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, B5 (book) size, landscape/horizontal document (recommended for screen viewing)",'pdf_a5_landscape',"#{@f.base_filename.pdf_l_b5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_legal}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. legal size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_legal}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. legal size, portrait/vertical document (recommended for printing)",'pdf_legal',"#{@f.base_filename.pdf_p_legal}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_legal}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. legal size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_legal}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. legal size, landscape/horizontal document (recommended for screen viewing)",'pdf_legal_landscape',"#{@f.base_filename.pdf_l_legal}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.odt.dir)==true
img=%{<img border="0" height="18" width="18" src="#{@image_path}/b_odf.png" alt="ODF/ODT" /> }
pth=@f.output_path.odt.dir
rel=@f.output_path.odt.rel_sm
url=@f.output_path.odt.url
- id,file='ODF:ODT (Open Document Format)',@f.base_filename.odt
- summarize(id,file,pth,rel,url,img)
+ desc,id,file='ODF:ODT (Open Document Format)','odt',@f.base_filename.odt
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.xhtml.dir)==true
pth=@f.output_path.xhtml.dir
rel=@f.output_path.xhtml.rel_sm
url=@f.output_path.xhtml.url
- id,file='ODF:ODT (Open Document Format)',@f.base_filename.odt
- id,file='XHTML',@f.base_filename.xhtml
- summarize(id,file,pth,rel,url)
+ desc,id,file='XHTML','xhtml',@f.base_filename.xhtml
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_sax.dir)==true
pth=@f.output_path.xml_sax.dir
rel=@f.output_path.xml_sax.rel_sm
url=@f.output_path.xml_sax.url
- id,file='XML SAX',@f.base_filename.xml_sax
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML SAX','xml_sax',@f.base_filename.xml_sax
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_dom.dir)==true
pth=@f.output_path.xml_dom.dir
rel=@f.output_path.xml_dom.rel_sm
url=@f.output_path.xml_dom.url
- id,file='XML DOM',@f.base_filename.xml_dom
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML DOM','xml_dom',@f.base_filename.xml_dom
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_docbook_article.dir)==true
pth=@f.output_path.xml_docbook_article.dir
rel=@f.output_path.xml_docbook_article.rel_sm
url=@f.output_path.xml_docbook_article.url
- id,file='XML Docbook Book',@f.base_filename.xml_docbook_article
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Docbook Article','docbook_article',@f.base_filename.xml_docbook_article
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_docbook_book.dir)==true
pth=@f.output_path.xml_docbook_book.dir
rel=@f.output_path.xml_docbook_book.rel_sm
url=@f.output_path.xml_docbook_book.url
- id,file='XML Docbook Book',@f.base_filename.xml_docbook_book
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Docbook Book','docbook',@f.base_filename.xml_docbook_book
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_fictionbook.dir)==true
pth=@f.output_path.xml_fictionbook.dir
rel=@f.output_path.xml_fictionbook.rel_sm
url=@f.output_path.xml_fictionbook.url
- id,file='XML Fictionbook',@f.base_filename.xml_fictionbook
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Fictionbook','fictionbook',@f.base_filename.xml_fictionbook
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_scaffold_structure_sisu.dir)==true
pth=@f.output_path.xml_scaffold_structure_sisu.dir
rel=@f.output_path.xml_scaffold_structure_sisu.rel_sm
url=@f.output_path.xml_scaffold_structure_sisu.url
- id,file='XML Scaffold sisu structure',@f.base_filename.xml_scaffold_structure_sisu
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Scaffold sisu structure','xml_scaffold',@f.base_filename.xml_scaffold_structure_sisu
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_scaffold_structure_collapse.dir)==true
pth=@f.output_path.xml_scaffold_structure_collapse.dir
rel=@f.output_path.xml_scaffold_structure_collapse.rel_sm
url=@f.output_path.xml_scaffold_structure_collapse.url
- id,file='XML Scaffold collapsed structure',@f.base_filename.xml_scaffold_structure_collapse
- summarize(id,file,pth,rel,url)
- end
+ desc,id,file='XML Scaffold collapsed structure','xml_collapsed',@f.base_filename.xml_scaffold_structure_collapse
+ summarize(desc,id,file,pth,rel,url)
+ end
+ #if FileTest.file?(@f.place_file.json.dir)==true ###
+ # pth=@f.output_path.json.dir
+ # rel=@f.output_path.json.rel_sm
+ # url=@f.output_path.json.url
+ # desc,id,file='JSON',@f.base_filename.json_sax
+ # summarize(desc,id,file,pth,rel,url)
+ #end
if FileTest.file?(@f.place_file.info.dir)==true
pth=@f.output_path.texinfo.dir
rel=@f.output_path.texinfo.rel_sm
url=@f.output_path.texinfo.url
- id,file='Info file',@f.base_filename.info
- summarize(id,file,pth,rel,url)
+ desc,id,file='Info file','info',@f.base_filename.info
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.manpage.dir)==true
pth=@f.output_path.manpage.dir
rel=@f.output_path.manpage.rel_sm
url=@f.output_path.manpage.url
- id,file='Manpage',@f.base_filename.manpage
- summarize(id,file,pth,rel,url)
+ desc,id,file='Manpage','manpage',@f.base_filename.manpage
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.sqlite_discrete.dir)==true
- id,file='SQLite3 file',@f.base_filename.sqlite_discrete
+ desc,id,file='SQLite3 file','sqlite',@f.base_filename.sqlite_discrete
pth=@f.output_path.sqlite_discrete.dir
rel=@f.output_path.sqlite_discrete.rel_sm
url=@f.output_path.sqlite_discrete.url
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.txt.dir)==true
- id='Plaintext (UTF-8)'
+ desc,id='Plaintext (UTF-8)','text'
pth=@f.output_path.txt.dir
rel=@f.output_path.txt.rel_sm
url=@f.output_path.txt.url
file=@f.base_filename.txt
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.textile.dir)==true
- id='Textile text (UTF-8)'
+ desc,id='Textile text (UTF-8)','textile'
pth=@f.output_path.textile.dir
rel=@f.output_path.textile.rel_sm
url=@f.output_path.textile.url
file=@f.base_filename.textile
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.asciidoc.dir)==true
- id='AsciiDoc text (UTF-8)'
+ desc,id='AsciiDoc text (UTF-8)','asciidoc'
pth=@f.output_path.asciidoc.dir
rel=@f.output_path.asciidoc.rel_sm
url=@f.output_path.asciidoc.url
file=@f.base_filename.asciidoc
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.markdown.dir)==true
- id='Markdown text (UTF-8)'
+ desc,id='Markdown text (UTF-8)','markdown'
pth=@f.output_path.markdown.dir
rel=@f.output_path.markdown.rel_sm
url=@f.output_path.markdown.url
file=@f.base_filename.markdown
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.rst.dir)==true
- id='rST text (UTF-8)'
+ desc,id='rST text (UTF-8)','rst'
pth=@f.output_path.rst.dir
rel=@f.output_path.rst.rel_sm
url=@f.output_path.rst.url
file=@f.base_filename.rst
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.orgmode.dir)==true
- id='OrgMode structure text (UTF-8)'
+ desc,id='OrgMode structure text (UTF-8)','org'
pth=@f.output_path.orgmode.dir
rel=@f.output_path.orgmode.rel_sm
url=@f.output_path.orgmode.url
file=@f.base_filename.orgmode
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true
- id,file='LaTeX (portrait)',"#{@md.fns}.tex"
+ desc,id,file='LaTeX (portrait)','latex',"#{@md.fns}.tex"
pth,rel,url='','',''
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true
- id,file='LaTeX (landscape)',"#{@md.fns}.landscape.tex"
+ desc,id,file='LaTeX (landscape)','latex_landscape',"#{@md.fns}.landscape.tex"
pth,rel,url='','',''
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.hash_digest.dir)==true
pth=@f.output_path.hash_digest.dir
rel=@f.output_path.hash_digest.rel_sm
url=@f.output_path.hash_digest.url
- id,file="Digest/DCC - Document Content Certificate (#{@dg})",@f.base_filename.hash_digest
- summarize(id,file,pth,rel,url)
+ desc,id,file="Digest/DCC - Document Content Certificate (#{@dg})",'digests',@f.base_filename.hash_digest
+ summarize(desc,id,file,pth,rel,url)
end
end
def published_versions
- id,file='Markup (SiSU source)',@md.fns
- languages(id,file)
+ desc,file='Markup (SiSU source)','source',@md.fns
+ languages(desc,file)
end
def language_versions
if FileTest.file?(@f.place_file.manifest.dir)==true
- id='Markup (SiSU source)'
- published_languages(id)
+ desc='Markup (SiSU source)'
+ published_languages(desc)
end
end
def qrc_image
@@ -590,165 +596,165 @@ WOK
pth=@f.output_path.src.dir
rel=@f.output_path.src.rel_sm
url=@f.output_path.src.url
- id,file='Markup Composite File (SiSU source)',@f.base_filename.src
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='Markup Composite File (SiSU source)','source',@f.base_filename.src
+ summarize_sources(desc,id,file,pth,rel,url)
end
else
if FileTest.file?(@f.place_file.src.dir)==true
pth=@f.output_path.src.dir
rel=@f.output_path.src.rel_sm
url=@f.output_path.src.url
- id,file='Markup (SiSU source)',@f.base_filename.src
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='Markup (SiSU source)','composite',@f.base_filename.src
+ summarize_sources(desc,id,file,pth,rel,url)
end
end
if FileTest.file?(@f.place_file.sisupod.dir)==true
pth=@f.output_path.sisupod.dir
rel=@f.output_path.sisupod.rel_sm
url=@f.output_path.sisupod.url
- id,file='SiSU doc (tar.xz)',@f.base_filename.sisupod
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='SiSUdoc pod (tar.xz)','sisupod',@f.base_filename.sisupod
+ summarize_sources(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.pot.dir)==true
pth=@f.output_path.pot.dir
rel=@f.output_path.pot.rel_sm
url=@f.output_path.pot.url
- id,file='SiSU pot',@f.base_filename.pot
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='SiSU pot','pot',@f.base_filename.pot
+ summarize_sources(desc,id,file,pth,rel,url)
end
end
def metadata_tests
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)
+ desc,id,info=@translate.full_title,'title',@md.title.full
+ metadata(desc,id,info)
end
end
if defined? @md.creator #%
if defined? @md.creator.author \
and @md.creator.author=~/\S+/
- id,info=@translate.author,@md.creator.author
- metadata(id,info)
+ desc,id,info=@translate.author,'author',@md.creator.author
+ metadata(desc,id,info)
end
if defined? @md.creator.editor \
and @md.creator.editor=~/\S+/
- id,info=@translate.editor,@md.creator.editor
- metadata(id,info)
+ desc,id,info=@translate.editor,'editor',@md.creator.editor
+ metadata(desc,id,info)
end
if defined? @md.creator.contributor \
and @md.creator.contributor=~/\S+/
- id,info=@translate.contributor,@md.creator.contributor
- metadata(id,info)
+ desc,id,info=@translate.contributor,'contributor',@md.creator.contributor
+ metadata(desc,id,info)
end
if defined? @md.creator.translator \
and @md.creator.translator=~/\S+/
- id,info=@translate.translator,@md.creator.translator
- metadata(id,info)
+ desc,id,info=@translate.translator,'creator',@md.creator.translator
+ metadata(desc,id,info)
end
if defined? @md.creator.illustrator \
and @md.creator.illustrator=~/\S+/
- id,info=@translate.illustrator,@md.creator.illustrator
- metadata(id,info)
+ desc,id,info=@translate.illustrator,'illustrator',@md.creator.illustrator
+ metadata(desc,id,info)
end
if defined? @md.creator.prepared_by \
and @md.creator.prepared_by=~/\S+/
- id,info=@translate.prepared_by,@md.creator.prepared_by
- metadata(id,info)
+ desc,id,info=@translate.prepared_by,'prepared_by',@md.creator.prepared_by
+ metadata(desc,id,info)
end
if defined? @md.creator.digitized_by \
and @md.creator.digitized_by=~/\S+/
- id,info=@translate.digitized_by,@md.creator.digitized_by
- metadata(id,info)
+ desc,id,info=@translate.digitized_by,'designed_by',@md.creator.digitized_by
+ metadata(desc,id,info)
end
end
if defined? @md.rights
if defined? @md.rights.all \
and @md.rights.all=~/\S+/ #dc
- id,info=@translate.rights,@md.rights.all
- metadata(id,info)
+ desc,id,info=@translate.rights,'rights',@md.rights.all
+ metadata(desc,id,info)
end
end
if defined? @md.date #%
if defined? @md.date.published \
and @md.date.published=~/\S+/ #dc
- id,info=@translate.date,@md.date.published
- metadata(id,info)
+ desc,id,info=@translate.date,'date',@md.date.published
+ metadata(desc,id,info)
end
if defined? @md.date.created \
and @md.date.created=~/\S+/ #dc
- id,info=@translate.date_created,@md.date.created
- metadata(id,info)
+ desc,id,info=@translate.date_created,'date_created',@md.date.created
+ metadata(desc,id,info)
end
if defined? @md.date.issued \
and @md.date.issued=~/\S+/ #dc
- id,info=@translate.date_issued,@md.date.issued
- metadata(id,info)
+ desc,id,info=@translate.date_issued,'date_issued',@md.date.issued
+ metadata(desc,id,info)
end
if defined? @md.date.available \
and @md.date.available=~/\S+/ #dc
- id,info=@translate.date_available,@md.date.available
- metadata(id,info)
+ desc,id,info=@translate.date_available,'date_available',@md.date.available
+ metadata(desc,id,info)
end
if defined? @md.date.modified \
and @md.date.modified=~/\S+/ #dc
- id,info=@translate.date_modified,@md.date.modified
- metadata(id,info)
+ desc,id,info=@translate.date_modified,'date_modified',@md.date.modified
+ metadata(desc,id,info)
end
if defined? @md.date.valid \
and @md.date.valid=~/\S+/ #dc
- id,info=@translate.date_valid,@md.date.valid
- metadata(id,info)
+ desc,id,info=@translate.date_valid,'date_valid',@md.date.valid
+ metadata(desc,id,info)
end
end
if defined? @md.publisher \
and @md.publisher=~/\S+/ #dc
- id,info=@translate.publisher,@md.publisher
- metadata(id,info)
+ desc,id,info=@translate.publisher,'publisher',@md.publisher
+ metadata(desc,id,info)
end
if defined? @md.notes #%
if defined? @md.notes.description \
and @md.notes.description=~/\S+/
- id,info=@translate.description,@md.notes.description
- metadata(id,info)
+ desc,id,info=@translate.description,'description',@md.notes.description
+ metadata(desc,id,info)
end
if defined? @md.notes.abstract \
and @md.notes.abstract=~/\S+/
- id,info=@translate.abstract,@md.notes.abstract
- metadata(id,info)
+ desc,id,info=@translate.abstract,'abstract',@md.notes.abstract
+ metadata(desc,id,info)
end
if defined? @md.notes.comment \
and @md.notes.comment=~/\S+/
- id,info=@translate.comments,@md.notes.comment
- metadata(id,info)
+ desc,id,info=@translate.comments,'comment',@md.notes.comment
+ metadata(desc,id,info)
end
if defined? @md.notes.prefix_a \
and @md.notes.prefix_a=~/\S+/
- id,info=@translate.prefix_a,@md.notes.prefix_a
- metadata(id,info)
+ desc,id,info=@translate.prefix_a,'prefix',@md.notes.prefix_a
+ metadata(desc,id,info)
end
if defined? @md.notes.prefix_b \
and @md.notes.prefix_b=~/\S+/
- id,info=@translate.prefix_b,@md.notes.prefix_b
- metadata(id,info)
+ desc,id,info=@translate.prefix_b,'prefix_b',@md.notes.prefix_b
+ metadata(desc,id,info)
end
end
if defined? @md.title #%
if defined? @md.title.language \
and @md.title.language=~/\S+/
- id,info=@translate.language,@md.title.language
- metadata(id,info)
+ desc,id,info=@translate.language,'language',@md.title.language
+ metadata(desc,id,info)
end
if defined? @md.original.language \
and @md.original.language=~/\S+/
- id,info=@translate.language_original,@md.original.language
- metadata(id,info)
+ desc,id,info=@translate.language_original,'language_original',@md.original.language
+ metadata(desc,id,info)
end
end
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}
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left" id="topics">#{@translate.topic_register}:</p></th><td>\n}
@md.topic_register_array.each do |t|
t.each_with_index do |st,i|
if st.is_a?(Array)
@@ -769,104 +775,104 @@ WOK
end
if defined? @md.classify.subject \
and @md.classify.subject=~/\S+/
- id,info=@translate.subject,@md.classify.subject
- metadata(id,info)
+ desc,id,info=@translate.subject,'subject',@md.classify.subject
+ metadata(desc,id,info)
end
if defined? @md.classify.keywords \
and @md.classify.keywords=~/\S+/
- id,info=@translate.keywords,@md.classify.keywords
- metadata(id,info)
+ desc,id,info=@translate.keywords,'keywords',@md.classify.keywords
+ metadata(desc,id,info)
end
if defined? @md.classify.loc \
and @md.classify.loc=~/\S+/
- id,info=@translate.cls_loc,@md.classify.loc
- metadata(id,info)
+ desc,id,info=@translate.cls_loc,'loc',@md.classify.loc
+ metadata(desc,id,info)
end
if defined? @md.classify.dewey \
and @md.classify.dewey=~/\S+/
- id,info=@translate.cls_dewey,@md.classify.dewey
- metadata(id,info)
+ desc,id,info=@translate.cls_dewey,'dewey',@md.classify.dewey
+ metadata(desc,id,info)
end
if defined? @md.notes.coverage \
and @md.notes.coverage=~/\S+/
- id,info=@translate.coverage,@md.notes.coverage
- metadata(id,info)
+ desc,id,info=@translate.coverage,'coverage',@md.notes.coverage
+ metadata(desc,id,info)
end
if defined? @md.notes.relation \
and @md.notes.relation=~/\S+/
- id,info=@translate.relation,@md.notes.relation
- metadata(id,info)
+ desc,id,info=@translate.relation,'relation',@md.notes.relation
+ metadata(desc,id,info)
end
if defined? @md.notes.type \
and @md.notes.type=~/\S+/ #dc
- id,info=@translate.type,@md.notes.type
- metadata(id,info)
+ desc,id,info=@translate.type,'type',@md.notes.type
+ metadata(desc,id,info)
end
if defined? @md.notes.format \
and @md.notes.format=~/\S+/
- id,info=@transate.format,@md.notes.format
- metadata(id,info)
+ desc,id,info=@transate.format,'format',@md.notes.format
+ metadata(desc,id,info)
end
end
if defined? @md.identifier #%
if defined? @md.identifier.oclc \
and @md.identifier.oclc=~/\S+/
- id,info=@translate.cls_oclc,@md.identifier.oclc
- @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td>\n}
+ desc,id,info=@translate.cls_oclc,'',@md.identifier.oclc
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{desc}:</p></th><td>\n}
@manifest[:html] << %{<p class="left"><a href="http://worldcat.org/oclc/#{info}">#{info}</a></p>\n}
@manifest[:html] << %{</td></tr>\n}
end
if defined? @md.identifier.pg \
and @md.identifier.pg=~/\S+/
- id,info=@translate.cls_gutenberg,@md.identifier.pg
- metadata(id,info)
+ desc,id,info=@translate.cls_gutenberg,'ocalc',@md.identifier.pg
+ metadata(desc,id,info)
end
if defined? @md.identifier.isbn \
and @md.identifier.isbn=~/\S+/
- id,info=@translate.cls_isbn,@md.identifier.isbn
- metadata(id,info)
+ desc,id,info=@translate.cls_isbn,'isbn',@md.identifier.isbn
+ metadata(desc,id,info)
end
end
if defined? @md.original.source \
and @md.original.source=~/\S+/
- id,info=@translate.source,@md.original.source
- metadata(id,info)
+ desc,id,info=@translate.source,'source_original',@md.original.source
+ metadata(desc,id,info)
end
if @md.fns
- id,info=@translate.sourcefile,@md.fns
- metadata(id,info)
+ desc,id,info=@translate.sourcefile,'source_filename',@md.fns
+ metadata(desc,id,info)
end
if @md.en[:mismatch] > 0
- id,info='WARNING document error in endnote markup, number mismatch',"endnotes: #{@md.en[:note]} != endnote reference marks: #{@md.en[:mark]} (difference = #{@md.en[:mismatch]})"
- metadata(id,info)
+ desc,id,info='WARNING document error in endnote markup, number mismatch','',"endnotes: #{@md.en[:note]} != endnote reference marks: #{@md.en[:mark]} (difference = #{@md.en[:mismatch]})"
+ metadata(desc,id,info)
end
if @md.wc_words
- id,info=@translate.word_count,@md.wc_words
- metadata(id,info)
+ desc,id,info=@translate.word_count,'wordcount',@md.wc_words
+ metadata(desc,id,info)
end
if @md.dgst
- id,info="#{@translate.sourcefile_digest} (#{@dg})",@md.dgst[1]
- metadata(id,info)
+ desc,id,info="#{@translate.sourcefile_digest} (#{@dg})",'digests',@md.dgst[1]
+ metadata(desc,id,info)
end
if @md.sc_number
- id,info=@translate.sc_number,@md.sc_number
- metadata(id,info)
+ desc,id,info=@translate.sc_number,'sc_number',@md.sc_number
+ metadata(desc,id,info)
end
if @md.sc_date
- id,info=@translate.sc_date,"#{@md.sc_date} at #{@md.sc_time}"
- metadata(id,info)
+ desc,id,info=@translate.sc_date,'sc_date',"#{@md.sc_date} at #{@md.sc_time}"
+ metadata(desc,id,info)
end
if @md.generated
- id,info=@translate.last_generated,@md.generated
- metadata(id,info)
+ desc,id,info=@translate.last_generated,'generated',@md.generated
+ metadata(desc,id,info)
end
if @md.project_details
- id,info=@translate.sisu_version,"#{@md.project_details.project} #{@md.project_details.version} #{@md.project_details.date_stamp} (#{@md.project_details.date})#{@md.project_details.install_method}"
- metadata(id,info)
+ desc,id,info=@translate.sisu_version,'project',"#{@md.project_details.project} #{@md.project_details.version} #{@md.project_details.date_stamp} (#{@md.project_details.date})#{@md.project_details.install_method}"
+ metadata(desc,id,info)
end
if @md.ruby_version
- id,info=@translate.ruby_version,@md.ruby_version
- metadata(id,info)
+ desc,id,info=@translate.ruby_version,'ruby',@md.ruby_version
+ metadata(desc,id,info)
end
end
def links_tests
@@ -987,7 +993,7 @@ WOK
@manifest[:html] <<<<WOK
<h2 class="small"><a name="metadata">#{@translate.manifest_description_metadata}</a></h2>
<table summary="document metadata" width="100%" border="0" cellpadding="2" align="center">
-<tr> <th class="left"><p class="bold">#{@translate.metadata}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th></tr>
+<tr> <th class="left"><p class="bold" id="metadata">#{@translate.metadata}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th></tr>
WOK
metadata_tests
@manifest[:html] <<<<WOK