diff options
| -rw-r--r-- | lib/sisu/v0/concordance.rb | 7 | ||||
| -rw-r--r-- | lib/sisu/v0/dal_metadata.rb | 42 | ||||
| -rw-r--r-- | lib/sisu/v0/dal_syntax.rb | 6 | ||||
| -rw-r--r-- | lib/sisu/v0/db_import.rb | 40 | ||||
| -rw-r--r-- | lib/sisu/v0/digests.rb | 14 | ||||
| -rw-r--r-- | lib/sisu/v0/html.rb | 10 | ||||
| -rw-r--r-- | lib/sisu/v0/html_format.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v0/html_segments.rb | 10 | ||||
| -rw-r--r-- | lib/sisu/v0/i18n.rb | 472 | ||||
| -rw-r--r-- | lib/sisu/v0/manifest.rb | 88 | ||||
| -rw-r--r-- | lib/sisu/v0/manpage.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v0/param.rb | 88 | ||||
| -rw-r--r-- | lib/sisu/v0/shared_txt.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v0/shared_xml.rb | 184 | ||||
| -rw-r--r-- | lib/sisu/v0/sitemaps.rb | 10 | ||||
| -rw-r--r-- | lib/sisu/v0/texinfo_format.rb | 120 | ||||
| -rw-r--r-- | lib/sisu/v0/texpdf.rb | 22 | ||||
| -rw-r--r-- | lib/sisu/v0/texpdf_format.rb | 6 | ||||
| -rw-r--r-- | lib/sisu/v0/xml_fictionbook.rb | 8 | ||||
| -rw-r--r-- | lib/sisu/v0/xml_format.rb | 168 | ||||
| -rw-r--r-- | lib/sisu/v0/xml_md_oai_pmh_dc.rb | 86 | 
21 files changed, 696 insertions, 691 deletions
| diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb index 87b86930..aea5e556 100644 --- a/lib/sisu/v0/concordance.rb +++ b/lib/sisu/v0/concordance.rb @@ -111,11 +111,10 @@ module SiSU_Concordance          @vz=SiSU_Env::Get_init.instance.skin          txt_path=%{#{@md.dir_out}}          SiSU_Env::Info_skin.new(@md).select -        @md_title=@md.title          @fnb=@md.fnb          @lex_button=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="../_sisu/image/sisu.png" alt="SiSU home -->"></a>}          @doc_details =<<WOK -<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right"> </td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.dc_title}</b></a></h1><p class="bold">#{@md.dc_creator}</p></td></tr></table> +<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right"> </td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.full_title}</b></a></h1><p class="bold">#{@md.author}</p></td></tr></table>  WOK        end        def create @@ -127,11 +126,11 @@ WOK  <html>  <head>    <title> -    SiSU created WordIndex for: #{@md.dc_title} +    SiSU created WordIndex for: #{@md.full_title}    </title>    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />    <meta name="Description" content=" SiSU created"> -  <meta name="keywords" content="word index for #{@md.dc_title}"> +  <meta name="keywords" content="word index for #{@md.full_title}">    <meta name="generator" content="SiSU (Linux & Ruby!)">    <link rel="generator" href="http://www.jus.uio.no/sisu" />    <link rel="shortcut icon" href="../_sisu/image/rb7.ico" /> diff --git a/lib/sisu/v0/dal_metadata.rb b/lib/sisu/v0/dal_metadata.rb index b46c0ce6..cf81616e 100644 --- a/lib/sisu/v0/dal_metadata.rb +++ b/lib/sisu/v0/dal_metadata.rb @@ -87,9 +87,9 @@ module SiSU_metadata            ocnm+=1; ocnd+=1            @dc << case para            when /^#{Mx[:meta_o]}title#{Mx[:meta_c]}/ -            "\n#{@tr.dc_title}: #{Mx[:fa_underscore_o]}#{@md.dc_title}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.full_title}: #{Mx[:fa_underscore_o]}#{@md.full_title}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}(?:creator|author)#{Mx[:meta_c]}/ -            "\n#{@tr.creator}: #{Mx[:fa_underscore_o]}#{@md.dc_creator}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.author}: #{Mx[:fa_underscore_o]}#{@md.author}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /#{Mx[:meta_o]}(?:translator|translated_by)#{Mx[:meta_c]}/              "\n#{@tr.translator}: #{Mx[:fa_underscore_o]}#{@md.translator}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}(?:illustrator|illustrated_by)#{Mx[:meta_c]}/ @@ -99,45 +99,45 @@ module SiSU_metadata            when /^#{Mx[:meta_o]}digitized_by#{Mx[:meta_c]}/              "\n#{@tr.digitized_by}: #{Mx[:fa_underscore_o]}#{@md.digitized_by}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}description#{Mx[:meta_c]}/ -            "\n#{@tr.description}: #{Mx[:fa_underscore_o]}#{@md.dc_description}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.description}: #{Mx[:fa_underscore_o]}#{@md.description}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}subject#{Mx[:meta_c]}/ -            "\n#{@tr.subject}: #{Mx[:fa_underscore_o]}#{@md.dc_subject}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.subject}: #{Mx[:fa_underscore_o]}#{@md.subject}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}abstract#{Mx[:meta_c]}/ -            "\n#{@tr.abstract}: #{Mx[:fa_underscore_o]}#{@md.dc_abstract}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.abstract}: #{Mx[:fa_underscore_o]}#{@md.abstract}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}publisher#{Mx[:meta_c]}/ -            "\n#{@tr.publisher}: #{Mx[:fa_underscore_o]}#{@md.dc_publisher}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.publisher}: #{Mx[:fa_underscore_o]}#{@md.publisher}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}contributor#{Mx[:meta_c]}/ -            "\n#{@tr.contributor}: #{Mx[:fa_underscore_o]}#{@md.dc_contributor}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.contributor}: #{Mx[:fa_underscore_o]}#{@md.contributor}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.created#{Mx[:meta_c]}/ -            "\n#{@tr.date_created}: #{Mx[:fa_underscore_o]}#{@md.dc_date_created}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_created}: #{Mx[:fa_underscore_o]}#{@md.date_created}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.issued#{Mx[:meta_c]}/ -            "\n#{@tr.date_issued}: #{Mx[:fa_underscore_o]}#{@md.dc_date_issued}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_issued}: #{Mx[:fa_underscore_o]}#{@md.date_issued}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.available#{Mx[:meta_c]}/ -            "\n#{@tr.date_available}: #{Mx[:fa_underscore_o]}#{@md.dc_date_available}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_available}: #{Mx[:fa_underscore_o]}#{@md.date_available}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.modified#{Mx[:meta_c]}/ -            "\n#{@tr.date_modified}: #{Mx[:fa_underscore_o]}#{@md.dc_date_modified}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_modified}: #{Mx[:fa_underscore_o]}#{@md.date_modified}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.valid#{Mx[:meta_c]}/ -            "\n#{@tr.date_valid}: #{Mx[:fa_underscore_o]}#{@md.dc_date_valid}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_valid}: #{Mx[:fa_underscore_o]}#{@md.date_valid}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date#{Mx[:meta_c]}/ -            "\n#{@tr.date}: #{Mx[:fa_underscore_o]}#{@md.dc_date}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date}: #{Mx[:fa_underscore_o]}#{@md.date}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}type#{Mx[:meta_c]}/ -            "\n#{@tr.type}: #{Mx[:fa_underscore_o]}#{@md.dc_type}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.type}: #{Mx[:fa_underscore_o]}#{@md.type}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}format#{Mx[:meta_c]}/ -            "\n#{@tr.format}: #{Mx[:fa_underscore_o]}#{@md.dc_format}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.format}: #{Mx[:fa_underscore_o]}#{@md.format}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}rights#{Mx[:meta_c]}/ -            "\n#{@tr.rights}: #{Mx[:fa_underscore_o]}#{@md.dc_rights}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.rights}: #{Mx[:fa_underscore_o]}#{@md.rights}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}identifier#{Mx[:meta_c]}/ -            "\n#{@tr.identifier}: #{Mx[:fa_underscore_o]}#{@md.dc_identifier}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.identifier}: #{Mx[:fa_underscore_o]}#{@md.identifier}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}source#{Mx[:meta_c]}/ -            "\n#{@tr.source}: #{Mx[:fa_underscore_o]}#{@md.dc_source}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.source}: #{Mx[:fa_underscore_o]}#{@md.source}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}language#{Mx[:meta_c]}/ -            "\n#{@tr.language}: #{Mx[:fa_underscore_o]}#{@md.dc_language}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.language}: #{Mx[:fa_underscore_o]}#{@md.language}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}language.original#{Mx[:meta_c]}/              "\n#{@tr.language_original}: #{Mx[:fa_underscore_o]}#{@md.language_original}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}relation#{Mx[:meta_c]}/ -            "\n#{@tr.relation}: #{Mx[:fa_underscore_o]}#{@md.dc_relation}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.relation}: #{Mx[:fa_underscore_o]}#{@md.relation}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}coverage#{Mx[:meta_c]}/ -            "\n#{@tr.coverage}: #{Mx[:fa_underscore_o]}#{@md.dc_coverage}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.coverage}: #{Mx[:fa_underscore_o]}#{@md.coverage}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}keywords#{Mx[:meta_c]}/              "\n#{@tr.keywords}: #{Mx[:fa_underscore_o]}#{@md.keywords}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}comments#{Mx[:meta_c]}/ diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb index 4120497a..1d6407e2 100644 --- a/lib/sisu/v0/dal_syntax.rb +++ b/lib/sisu/v0/dal_syntax.rb @@ -255,19 +255,19 @@ module SiSU_Syntax          line.gsub!(/~\[(.+?)\]~/m,Mx[:en_b_o] + '\1' + Mx[:en_b_c])          if @md.subtitle and not @md.subtitle.empty?            if line =~/(?:by\s+)?(?:@creator|@author)/ -            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title} - #{@md.subtitle},<br />\\2#{@md.dc_creator}") +            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title} - #{@md.subtitle},<br />\\2#{@md.author}")            else              line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s*$/,"\\1 #{@md.title} - #{@md.subtitle}")            end          else            if line =~/(?:by\s+)?(?:@creator|@author)/ -            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title},<br />\\2#{@md.dc_creator}") +            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title},<br />\\2#{@md.author}")            else              line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s*$/,"\\1 #{@md.title}")            end          end          line.gsub!(/^(1~\??) @title\s*$/,"\\1 #{@md.title} - #{@md.subtitle}")                    # -        line.gsub!(/^(#{Mx[:lv_o]}[23]:\??#{Mx[:lv_c]}) (?:(by\s+)?(?:@creator|@author))\s*$/,"\\1 \\2#{@md.dc_creator}")                    # +        line.gsub!(/^(#{Mx[:lv_o]}[23]:\??#{Mx[:lv_c]}) (?:(by\s+)?(?:@creator|@author))\s*$/,"\\1 \\2#{@md.author}")                    #          line.gsub!(/<((?:https?|file):\/\/\S+?)>/,'< \1 >')                    #catch problem markup          line.gsub!(/\}\.\.\/(\S+)/,"\}#@output_url/\\1")                       #means you are not supporting relative links (only relevant in html), converted to static here          line.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }http://www.jus.uio.no/sisu')                                                    #adjustment 2005w30 diff --git a/lib/sisu/v0/db_import.rb b/lib/sisu/v0/db_import.rb index e30776c7..1e1e25d7 100644 --- a/lib/sisu/v0/db_import.rb +++ b/lib/sisu/v0/db_import.rb @@ -179,7 +179,7 @@ module SiSU_DB_import          @@id_t+=1 #bug related, needs to be performed once at start of file, but consider moving, as, placed here it means program will fail if document header lacks 0~title          puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@@cX.off}} unless @opt.cmd =~/q/        end -      if @md.dc_title; @tp[:long_title]=@md.dc_title +      if @md.full_title; @tp[:long_title]=@md.full_title #dc          #sql='SELECT MAX(tid) FROM metadata'          #id_t=@conn.execute( sql ) { |x| x.fetch_all.to_s.to_i }          #@@id_t=id_t if id_t @@ -191,11 +191,11 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:subtitle_f],@tp[:subtitle_i]='subtitle, ',"'#{txt}', "        end -      if @md.dc_creator; txt=@md.dc_creator +      if @md.author; txt=@md.author #dc          special_character_escape(txt)          @tp[:creator_f],@tp[:creator_i]='creator, ',"'#{txt}', "        end -      if @md.dc_contributor; txt=@md.dc_contributor +      if @md.contributor; txt=@md.contributor #dc          special_character_escape(txt)          @tp[:contributor_f],@tp[:contributor_i]='contributor, ',"'#{txt}', "        end @@ -207,7 +207,7 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:illustrator_f],@tp[:illustrator_i]='illustrator, ',"'#{txt}', "        end -      if @md.dc_publisher; txt=@md.dc_publisher +      if @md.publisher; txt=@md.publisher #dc          special_character_escape(txt)          @tp[:publisher_f],@tp[:publisher_i]='publisher, ',"'#{txt}', "        end @@ -219,11 +219,11 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:digitized_by_f],@tp[:digitized_by_i]='digitized_by, ',"'#{txt}', "        end -      if @md.dc_subject; txt=@md.dc_subject +      if @md.subject; txt=@md.subject #dc          special_character_escape(txt)          @tp[:subject_f],@tp[:subject_i]='subject, ',"'#{txt}', "        end -      if @md.dc_description; txt=@md.dc_description +      if @md.description; txt=@md.description #dc          special_character_escape(txt)          @tp[:description_f],@tp[:description_i]='description, ',"'#{txt}', "        end @@ -231,7 +231,7 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:abstract_f],@tp[:abstract_i]='abstract, ',"'#{txt}', "        end -      if @md.dc_type; txt=@md.dc_type +      if @md.type; txt=@md.type #dc          special_character_escape(txt)          @tp[:type_f],@tp[:type_i]='type, ',"'#{txt}', "        end @@ -243,35 +243,35 @@ module SiSU_DB_import        #  special_character_escape(txt)        #  @tp[:copyright_f],@tp[:copyright_i]='copyright, ',"'#{txt}', "        #end -      if @md.dc_rights; txt=@md.dc_rights +      if @md.rights; txt=@md.rights #dc          special_character_escape(txt)          @tp[:rights_f],@tp[:rights_i]='rights, ',"'#{txt}', "        end -      if @md.dc_date; txt=@md.dc_date +      if @md.date; txt=@md.date #dc          special_character_escape(txt)          @tp[:date_f],@tp[:date_i]='date, ',"'#{txt}', "        end -      if @md.dc_date_created; txt=@md.dc_date_created +      if @md.date_created; txt=@md.date_created #dc          special_character_escape(txt)          @tp[:date_created_f],@tp[:date_created_i]='date_created, ',"'#{txt}', "        end -      if @md.dc_date_issued; txt=@md.dc_date_issued +      if @md.date_issued; txt=@md.date_issued #dc          special_character_escape(txt)          @tp[:date_issued_f],@tp[:date_issued_i]='date_issued, ',"'#{txt}', "        end -      if @md.dc_date_available; txt=@md.dc_date_available +      if @md.date_available; txt=@md.date_available #dc          special_character_escape(txt)          @tp[:date_available_f],@tp[:date_available_i]='date_available, ',"'#{txt}', "        end -      if @md.dc_date_modified; txt=@md.dc_date_modified +      if @md.date_modified; txt=@md.date_modified #dc          special_character_escape(txt)          @tp[:date_modified_f],@tp[:date_modified_i]='date_modified, ',"'#{txt}', "        end -      if @md.dc_date_valid; txt=@md.dc_date_valid +      if @md.date_valid; txt=@md.date_valid #dc          special_character_escape(txt)          @tp[:date_valid_f],@tp[:date_valid_i]='date_valid, ',"'#{txt}', "        end -      if @md.dc_language[:name]; txt=@md.dc_language[:name] +      if @md.language[:name]; txt=@md.language[:name] #dc          special_character_escape(txt)          @tp[:language_f],@tp[:language_i]='language, ',"'#{txt}', "        end @@ -279,23 +279,23 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:language_original_f],@tp[:language_original_i]='language_original, ',"'#{txt}', "        end -      if @md.dc_format; txt=@md.dc_format +      if @md.format; txt=@md.format #dc          special_character_escape(txt)          @tp[:format_f],@tp[:format_i]='format, ',"'#{txt}', "        end -      if @md.dc_identifier; txt=@md.dc_identifier +      if @md.identifier; txt=@md.identifier #dc          special_character_escape(txt)          @tp[:identifier_f],@tp[:identifier_i]='identifier, ',"'#{txt}', "        end -      if @md.dc_source; txt=@md.dc_source +      if @md.source; txt=@md.source #dc          special_character_escape(txt)          @tp[:source_f],@tp[:source_i]='source, ',"'#{txt}', "        end -      if @md.dc_relation; txt=@md.dc_relation +      if @md.relation; txt=@md.relation #dc          special_character_escape(txt)          @tp[:relation_f],@tp[:relation_i]='relation, ',"'#{txt}', "        end -      if @md.dc_coverage; txt=@md.dc_coverage +      if @md.coverage; txt=@md.coverage #dc          special_character_escape(txt)          @tp[:coverage_f],@tp[:coverage_i]='coverage, ',"'#{txt}', "        end diff --git a/lib/sisu/v0/digests.rb b/lib/sisu/v0/digests.rb index fed761d6..baaeb884 100644 --- a/lib/sisu/v0/digests.rb +++ b/lib/sisu/v0/digests.rb @@ -227,7 +227,7 @@ module SiSU_Digest_view                  end                else                  prefix='' -                metad=[@tr.dc_title,@tr.creator,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Skin_Digest: ','Generated by: ','Ruby version: '] +                metad=[@tr.full_title,@tr.author,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Skin_Digest: ','Generated by: ','Ruby version: ']                  metad.each do |n|                    m=rgx_txt(n)                    if m=~/\S+/ \ @@ -242,17 +242,17 @@ module SiSU_Digest_view                    else prefix='  '*9                    end                  end -                m_dc_title=rgx_txt(@tr.dc_title) -                m_creator=rgx_txt(@tr.creator) +                m_title=rgx_txt(@tr.full_title) +                m_author=rgx_txt(@tr.author)                  m_sourcefile_digest=rgx_txt(@tr.sourcefile_digest)                  m_sisu_version=rgx_txt(@tr.sisu_version)                  m_last_generated=rgx_txt(@tr.last_generated)                  m_ruby_version=rgx_txt(@tr.ruby_version)                  case para -                when /#{m_dc_title}: / -                  @t=/#{m_dc_title}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip -                when /#{m_creator}: / -                  @c=/#{m_creator}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip +                when /#{m_title}: / +                  @t=/#{m_title}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip +                when /#{m_author}: / +                  @c=/#{m_author}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip                  when /#{m_sourcefile_digest}.+?<u>/                                        #watch                    dgst_extra="\n" + ' '*21 +'source' +' '*4 + @md.dgst[1] + ' '*34 + @md.fns                  when /Skin_Digest: / diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index 5f2a1954..33285ed0 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -592,7 +592,7 @@ WOK          toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript          @segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript          toc_shared << format_head_toc.scroll_head_navigation_band -        if @md.dc_rights +        if @md.rights            rights=format_head_toc.rights            rights=SiSU_Tune::Clean_html.new(rights).clean          end @@ -620,8 +620,8 @@ WOK            toc_shared << format_txt_obj.center_bold            @segtoc << format_txt_obj.center_bold          end -        if @md.dc_creator -          creator_endnote=@md.dc_creator.gsub(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>}) +        if @md.author +          creator_endnote=@md.author.gsub(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>})            tmp_head=creator_endnote + "\n"            txt_obj={:txt =>tmp_head}            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) @@ -640,13 +640,13 @@ WOK          end          tmp_head=nil          toc_shared << @links_guide_toc -        toc_shared << rights if @md.dc_rights +        toc_shared << rights if @md.rights          toc_shared << prefix_b if @md.prefix_b          #Table of Contents added/appended here          toc_shared << @toc[:scr]          @segtoc << @links_guide_toc          @segtoc << @toc[:seg] -        @segtoc << rights if @md.dc_rights +        @segtoc << rights if @md.rights          @segtoc << prefix_b if @md.prefix_b          #Segtoc tail added here          @segtoc << "</p>\n" #bugfix sort later DEBUGNOW diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 4010209c..88e5fda7 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -478,7 +478,7 @@ WOK      def prefix_a      end      def rights -      rights=@md.dc_rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') +      rights=@md.rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ')        %{<p class="small_left">Rights: #{rights}</p>  <p />}      end diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index a3199903..da33194a 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -72,7 +72,7 @@ module SiSU_HTML_seg          if @type =~/endnote/            @seg[:headers]=[]            format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) -          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator) +          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@author)            txt_obj={:txt =>'Endnotes',:ocn_display =>''}            format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)            @seg[:headers] << format_seg.title_header1 @@ -80,7 +80,7 @@ module SiSU_HTML_seg          elsif @type =~/idx/            @seg[:headers]=[]            format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) -          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator) +          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@author)            txt_obj={:txt =>'Index',:ocn_display =>''}            format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)            @seg[:headers] << format_seg.title_header1 @@ -267,7 +267,7 @@ module SiSU_HTML_seg        end        @p_num ||= ''        if @@is1 == 1 -        @dc_creator=%{<b>#{@md.dc_creator}</b>\n} if @md.dc_creator.to_s =~/\S/ +        @author=%{<b>#{@md.author}</b>\n} if @md.author.to_s =~/\S/          @@seg[:tocband_banner] << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav])          conditional_div_close=if @@get_hash_fn =~/metadata/ #watch            '</div>' @@ -275,7 +275,7 @@ module SiSU_HTML_seg          end          @@seg[:tocband_bannerless] << conditional_div_close << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav])          @@seg[:headers] << format_head_seg.seg_head_escript if SiSU_HTML_Format::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug -        @@seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator).gsub(clean,'') +        @@seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@author).gsub(clean,'')          ocn=if @@header1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1          else ''          end @@ -317,7 +317,7 @@ module SiSU_HTML_seg          format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)          @@seg[:headers] << format_seg.title_header4.gsub(clean,'')        end -      @@seg[:header_endnotes]=format_head_seg.title_endnote(@md.title,@md.subtitle,@dc_creator,@@seg[:dot_nav]) +      @@seg[:header_endnotes]=format_head_seg.title_endnote(@md.title,@md.subtitle,@author,@@seg[:dot_nav])        @@tracker=@@tracker+1      end      def markup(para) diff --git a/lib/sisu/v0/i18n.rb b/lib/sisu/v0/i18n.rb index 20f788f5..0b53e78d 100644 --- a/lib/sisu/v0/i18n.rb +++ b/lib/sisu/v0/i18n.rb @@ -116,8 +116,8 @@ module SiSU_Translate      def sourcefile_digest        @lang_class.sourcefile_digest      end -    def dc_title -      @lang_class.dc_title +    def full_title #dc +      @lang_class.full_title      end      def title        @lang_class.title @@ -125,8 +125,8 @@ module SiSU_Translate      def subtitle        @lang_class.subtitle      end -    def creator -      @lang_class.creator +    def author +      @lang_class.author      end      def contributor        @lang_class.contributor @@ -149,8 +149,8 @@ module SiSU_Translate      def subject        @lang_class.subject      end -    def dc_description -      @lang_class.dc_description +    def description #dc (watch) +      @lang_class.description      end      def abstract        @lang_class.abstract @@ -331,8 +331,8 @@ module SiSU_Translate      def file_size        'file size'      end -    def dc_title -      'DC Title' +    def full_title #dc +      'Title'      end      def title        'Title' @@ -340,11 +340,14 @@ module SiSU_Translate      def subtitle        'Subtitle'      end -    def creator -      'DC Creator' +    def author +      'Author'      end -    def contributor -      'DC Contributor' +    def creator #dc +      'Creator' +    end +    def contributor #dc +      'Contributor'      end      def translator        'Translator' @@ -352,8 +355,8 @@ module SiSU_Translate      def illustrator        'Illustrator'      end -    def publisher -      'DC Publisher' +    def publisher #dc +      'Publisher'      end      def prepared_by        'Prepared by' @@ -361,59 +364,59 @@ module SiSU_Translate      def digitized_by        'Digitized by'      end -    def subject -      'DC Subject' +    def subject #dc +      'Subject'      end -    def dc_description -      'DC Description' +    def description #dc (watch) +      'Description'      end -    def abstract -      'DC Abstract' +    def abstract #dc +      'Abstract'      end -    def type -      'DC Type' +    def type #dc +      'Type'      end -    def rights -      'DC Rights' +    def rights #dc +      'Rights'      end -    def date -      'DC Date' +    def date #dc +      'Date'      end -    def date_created -      'DC Date created' +    def date_created #dc +      'Date created'      end -    def date_issued -      'DC Date issued' +    def date_issued #dc +      'Date issued'      end -    def date_available -      'DC Date available' +    def date_available #dc +      'Date available'      end -    def date_modified -      'DC Date modified' +    def date_modified #dc +      'Date modified'      end -    def date_valid -      'DC Date valid' +    def date_valid #dc +      'Date valid'      end -    def language -      'DC Language' +    def language #dc +      'Language'      end      def language_original        'Original Language'      end -    def format -      'DC Format' +    def format #dc +      'Format'      end -    def identifier -      'DC Identifier' +    def identifier #dc +      'Identifier'      end -    def source -      'DC Source' +    def source #dc +      'Source'      end -    def relation -      'DC Relation' +    def relation #dc +      'Relation'      end -    def coverage -      'DC Coverage' +    def coverage #dc +      'Coverage'      end      def keywords        'Keywords' @@ -539,8 +542,8 @@ module SiSU_Translate      def file_size        'taille'      end -    def dc_title -      'Titre (DC)' +    def full_title #dc +      'Titre'      end      def title        'Titre' @@ -548,11 +551,14 @@ module SiSU_Translate      def subtitle        'Sous titre'      end -    def creator -      'Auteur (DC)' +    def author +      'Auteur'      end -    def contributor -      'Contributeur (DC)' +    def creator #dc +      'Auteur' +    end +    def contributor #dc +      'Contributeur'      end      def translator        'Traducteur' @@ -560,8 +566,8 @@ module SiSU_Translate      def illustrator        'Illustrateur'      end -    def publisher -      'Éditeur (DC)' +    def publisher #dc +      'Éditeur'      end      def prepared_by        'Préparé par' @@ -569,59 +575,59 @@ module SiSU_Translate      def digitized_by        'Numérisé par'      end -    def subject -      'Sujet (DC)' +    def subject #dc +      'Sujet'      end -    def dc_description -      'Description (DC)' +    def description #dc (watch) +      'Description'      end -    def abstract -      'Résumé (DC)' +    def abstract #dc +      'Résumé'      end -    def type -      'Type (DC)' +    def type #dc +      'Type'      end -    def rights -      'Droits relatifs à la ressource (DC)' +    def rights #dc +      'Droits relatifs à la ressource'      end -    def date -      'Date (DC)' +    def date #dc +      'Date'      end -    def date_created -      'Date de création (DC)' +    def date_created #dc +      'Date de création'      end -    def date_issued -      'Date de publication (DC)' +    def date_issued #dc +      'Date de publication'      end -    def date_available -      'Date de mise à disposition (DC)' +    def date_available #dc +      'Date de mise à disposition'      end -    def date_modified -      'Date de modification (DC)' +    def date_modified #dc +      'Date de modification'      end -    def date_valid -      'Date de validité (DC)' +    def date_valid #dc +      'Date de validité'      end -    def language -      'Langue (DC)' +    def language #dc +      'Langue'      end      def language_original        'Langue originale'      end -    def format -      'Format (DC)' +    def format #dc +      'Format'      end -    def identifier -      'Identifiant (DC)' +    def identifier #dc +      'Identifiant'      end -    def source -      'Source (DC)' +    def source #dc +      'Source'      end -    def relation -      'Lien (DC)' +    def relation #dc +      'Lien'      end -    def coverage -      'Portée du document (DC)' +    def coverage #dc +      'Portée du document'      end      def keywords        'Mots clef' @@ -747,8 +753,8 @@ module SiSU_Translate      def file_size        'Dateigrösse'      end -    def dc_title -      'DC Titel' +    def full_title #dc +      'Titel'      end      def title        'Titel' @@ -759,8 +765,8 @@ module SiSU_Translate      def creator        'Autor'      end -    def contributor -      'DC Mitautor' +    def contributor #dc +      'Mitautor'      end      def translator        'Übersetzung' @@ -780,11 +786,11 @@ module SiSU_Translate      def subject        'Titel'      end -    def dc_description +    def description #dc (watch)        'Beschreibung'      end -    def abstract -      'DC Abstract' +    def abstract #dc +      'Abstract'      end      def type        'Typ' @@ -816,20 +822,20 @@ module SiSU_Translate      def language_original        'Ursprungssprache'      end -    def format -      'DC Format' +    def format #dc +      'Format'      end -    def identifier -      'DC Bezeichnung' +    def identifier #dc +      'Bezeichnung'      end -    def source -      'DC Quelle' +    def source #dc +      'Quelle'      end -    def relation -      'DC Beziehung' +    def relation #dc +      'Beziehung'      end -    def coverage -      'DC Eingrenzung' +    def coverage #dc +      'Eingrenzung'      end      def keywords        'Schlüsselwörter' @@ -955,8 +961,8 @@ module SiSU_Translate     def file_size       'tamaño del fichero'     end -   def dc_title -     'Título DC' +   def full_title #dc +     'Título'     end     def title       'Título' @@ -964,11 +970,11 @@ module SiSU_Translate     def subtitle       'Subtítulo'     end -   def creator -     'Creador DC' +   def creator #dc +     'Creador'     end -   def contributor -     'Contribuidor DC' +   def contributor #dc +     'Contribuidor'     end     def translator       'Traductor' @@ -976,8 +982,8 @@ module SiSU_Translate     def illustrator       'Ilustrador'     end -   def publisher -     'Editor DC' +   def publisher #dc +     'Editor'     end     def prepared_by       'Preparado por' @@ -985,59 +991,59 @@ module SiSU_Translate     def digitized_by       'Digitalizado por'     end -   def subject -     'Asunto DC' +   def subject #dc +     'Asunto'     end -   def dc_description -     'Descripción DC' +   def description #dc (watch) +     'Descripción'     end -   def abstract -     'Resumen DC' +   def abstract #dc +     'Resumen'     end -   def type -     'Tipo DC' +   def type #dc +     'Tipo'     end -   def rights -     'Derechos DC' +   def rights #dc +     'Derechos'     end -   def date -     'Fecha DC' +   def date #dc +     'Fecha'     end -   def date_created -     'Fecha de creación DC' +   def date_created #dc +     'Fecha de creación'     end -   def date_issued -     'Fecha de publicación DC' +   def date_issued #dc +     'Fecha de publicación'     end -   def date_available -     'Fecha de disponibilidad DC' +   def date_available #dc +     'Fecha de disponibilidad'     end -   def date_modified -     'Fecha de modificación DC' +   def date_modified #dc +     'Fecha de modificación'     end -   def date_valid -     'Fecha de valided DC' +   def date_valid #dc +     'Fecha de valided'     end -   def language -     'Idioma DC' +   def language #dc +     'Idioma'     end     def language_original       'Lenguaje original'     end -   def format -     'Formato DC' +   def format #dc +     'Formato'     end -   def identifier -     'Identificador DC' +   def identifier #dc +     'Identificador'     end -   def source -     'Fuente DC' +   def source #dc +     'Fuente'     end -   def relation -     'Relación DC' +   def relation #dc +     'Relación'     end -   def coverage -     'Cobertura DC' +   def coverage #dc +     'Cobertura'     end     def keywords       'Palabras claves' @@ -1163,8 +1169,8 @@ module SiSU_Translate      def file_size        'dimensione'      end -    def dc_title -      'Titolo (DC)' +    def full_title #dc +      'Titolo'      end      def title        'Titolo' @@ -1172,11 +1178,11 @@ module SiSU_Translate      def subtitle        'Sottotitolo'      end -    def creator -      'Autore (DC)' +    def creator #dc +      'Autore'      end -    def contributor -      'Contributore (DC)' +    def contributor #dc +      'Contributore'      end      def translator        'Traduttore' @@ -1184,8 +1190,8 @@ module SiSU_Translate      def illustrator        'Illustratore'      end -    def publisher -      'Casa editrice (DC)' +    def publisher #dc +      'Casa editrice'      end      def prepared_by        'Preparato da' @@ -1193,59 +1199,59 @@ module SiSU_Translate      def digitized_by        'Convertito in digitale da'      end -    def subject -      'Oggetto (DC)' +    def subject #dc +      'Oggetto'      end -    def dc_description -      'Descrizione (DC)' +    def description #dc (watch) +      'Descrizione'      end -    def abstract -      'Abstract (DC)' +    def abstract #dc +      'Abstract'      end -    def type -      'Tipo (DC)' +    def type #dc +      'Tipo'      end -    def rights -      'Diritti del lettore (DC)' +    def rights #dc +      'Diritti del lettore'      end -    def date -      'Data (DC)' +    def date #dc +      'Data'      end -    def date_created -      'Data di creazione (DC)' +    def date_created #dc +      'Data di creazione'      end -    def date_issued -      'Data di pubblicazione (DC)' +    def date_issued #dc +      'Data di pubblicazione'      end -    def date_available -      'Data di effettiva disponibilità (DC)' +    def date_available #dc +      'Data di effettiva disponibilità'      end -    def date_modified -      'Data di ultima modifica (DC)' +    def date_modified #dc +      'Data di ultima modifica'      end -    def date_valid -      'Data di inizo validità (DC)' +    def date_valid #dc +      'Data di inizo validità'      end -    def language -      'Lingua (DC)' +    def language #dc +      'Lingua'      end      def language_original        'Lingua originale'      end -    def format -      'Formato (DC)' +    def format #dc +      'Formato'      end -    def identifier -      'Indentificatore (DC)' +    def identifier #dc +      'Indentificatore'      end -    def source -      'Fonte (DC)' +    def source #dc +      'Fonte'      end -    def relation -      'Collegamento (DC)' +    def relation #dc +      'Collegamento'      end -    def coverage -      'Ambito (DC)' +    def coverage #dc +      'Ambito'      end      def keywords        'Parole chiave' @@ -1371,8 +1377,8 @@ module SiSU_Translate      def file_size        'tiedoston koko'      end -    def dc_title -      'DC-otsikko' +    def full_title #dc +      'otsikko'      end      def title        'Otsikko' @@ -1380,11 +1386,11 @@ module SiSU_Translate      def subtitle        'Alaotsikko'      end -    def creator -      'DC-tekijä' +    def creator #dc +      'tekijä'      end -    def contributor -      'DC-osallistuja' +    def contributor #dc +      'osallistuja'      end      def translator        'Kääntäjä' @@ -1392,8 +1398,8 @@ module SiSU_Translate      def illustrator        'Kuvittaja'      end -    def publisher -      'DC-julkaisija' +    def publisher #dc +      'julkaisija'      end      def prepared_by        'Valmistaja' @@ -1401,59 +1407,59 @@ module SiSU_Translate      def digitized_by        'Digitalisoinut'      end -    def subject -      'DC-aihe' +    def subject #dc +      'aihe'      end -    def dc_description -      'DC-kuvaus' +    def description #dc (watch) +      'kuvaus'      end -    def abstract -      'DC-tiivistelmä' +    def abstract #dc +      'tiivistelmä'      end -    def type -      'DC-tyyppi' +    def type #dc +      'tyyppi'      end -    def rights -      'DC-oikeudet' +    def rights #dc +      'oikeudet'      end -    def date -      'DC-päiväys' +    def date #dc +      'päiväys'      end -    def date_created -      'DC-luontipäivä' +    def date_created #dc +      'luontipäivä'      end -    def date_issued -      'DC-julkaisupäivä' +    def date_issued #dc +      'julkaisupäivä'      end -    def date_available -      'DC-saantipäivä' +    def date_available #dc +      'saantipäivä'      end -    def date_modified -      'DC-muokkauspäivä' +    def date_modified #dc +      'muokkauspäivä'      end -    def date_valid -      'DC-kelpoisuuspäivä' +    def date_valid #dc +      'kelpoisuuspäivä'      end -    def language -      'DC-kieli' +    def language #dc +      'kieli'      end      def language_original        'Alkuperäiskieli'      end -    def format -      'DC-muoto' +    def format #dc +      'muoto'      end -    def identifier -      'DC-tunnus' +    def identifier #dc +      'tunnus'      end -    def source -      'DC-lähde' +    def source #dc +      'lähde'      end -    def relation -      'DC-suhde' +    def relation #dc +      'suhde'      end -    def coverage -      'DC-kattavuus' +    def coverage #dc +      'kattavuus'      end      def keywords        'Avainsanat' diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb index 793ecdc2..3fa189fd 100644 --- a/lib/sisu/v0/manifest.rb +++ b/lib/sisu/v0/manifest.rb @@ -319,8 +319,8 @@ module SiSU_Manifest          end        end        def metadata_tests -        if @md.dc_title -          id,info=@translate.dc_title,@md.dc_title +        if @md.full_title #dc +          id,info=@translate.full_title,@md.full_title            metadata(id,info)          end          if @md.title @@ -331,12 +331,12 @@ module SiSU_Manifest            id,info=@translate.subtitle,@md.subtitle            metadata(id,info)          end -        if @md.dc_creator -          id,info=@translate.creator,@md.dc_creator +        if @md.author #dc +          id,info=@translate.author,@md.author            metadata(id,info)          end -        if @md.dc_contributor -          id,info=@translate.contributor,@md.dc_contributor +        if @md.contributor #dc +          id,info=@translate.contributor,@md.contributor            metadata(id,info)          end          if @md.translator @@ -347,8 +347,8 @@ module SiSU_Manifest            id,info=@translate.illustrator,@md.illustrator            metadata(id,info)          end -        if @md.dc_publisher -          id,info=@translate.publisher,@md.dc_publisher +        if @md.publisher #dc +          id,info=@translate.publisher,@md.publisher            metadata(id,info)          end          if @md.prepared_by @@ -359,53 +359,53 @@ module SiSU_Manifest            id,info=@translate.digitized_by,@md.digitized_by            metadata(id,info)          end -        if @md.dc_subject -          id,info=@translate.subject,@md.dc_subject +        if @md.subject #dc +          id,info=@translate.subject,@md.subject            metadata(id,info)          end -        if @md.dc_description -          id,info=@translate.dc_description,@md.dc_description +        if @md.description #dc +          id,info=@translate.description,@md.description            metadata(id,info)          end          if @md.abstract            id,info=@translate.abstract,@md.abstract            metadata(id,info)          end -        if @md.dc_type -          id,info=@translate.type,@md.dc_type +        if @md.type #dc +          id,info=@translate.type,@md.type            metadata(id,info)          end -        if @md.dc_rights -          id,info=@translate.rights,@md.dc_rights +        if @md.rights #dc +          id,info=@translate.rights,@md.rights            metadata(id,info)          end -        if @md.dc_date -          id,info=@translate.date,@md.dc_date +        if @md.date #dc +          id,info=@translate.date,@md.date            metadata(id,info)          end -        if @md.dc_date_created -          id,info=@translate.date_created,@md.dc_date_created +        if @md.date_created #dc +          id,info=@translate.date_created,@md.date_created            metadata(id,info)          end -        if @md.dc_date_issued -          id,info=@translate.date_issued,@md.dc_date_issued +        if @md.date_issued #dc +          id,info=@translate.date_issued,@md.date_issued            metadata(id,info)          end -        if @md.dc_date_available -          id,info=@translate.date_available,@md.dc_date_available +        if @md.date_available #dc +          id,info=@translate.date_available,@md.date_available            metadata(id,info)          end -        if @md.dc_date_modified -          id,info=@translate.date_modified,@md.dc_date_modified +        if @md.date_modified #dc +          id,info=@translate.date_modified,@md.date_modified            metadata(id,info)          end -        if @md.dc_date_valid -          id,info=@translate.date_valid,@md.dc_date_valid +        if @md.date_valid #dc +          id,info=@translate.date_valid,@md.date_valid            metadata(id,info)          end -        if @md.dc_language \ -        and @md.dc_language[:name] -          id,info=@translate.language,@md.dc_language[:name] +        if @md.language \ +        and @md.language[:name] #dc +          id,info=@translate.language,@md.language[:name]            metadata(id,info)          end          if @md.language_original \ @@ -413,24 +413,24 @@ module SiSU_Manifest            id,info=@translate.language_original,@md.language_original[:name]            metadata(id,info)          end -        if @md.dc_format -          id,info=@transate.format,@md.dc_format +        if @md.format #dc +          id,info=@transate.format,@md.format            metadata(id,info)          end -        if @md.dc_identifier -          id,info=@translate.identifier,@md.dc_identifier +        if @md.identifier #dc +          id,info=@translate.identifier,@md.identifier            metadata(id,info)          end -        if @md.dc_source -          id,info=@translate.source,@md.dc_source +        if @md.source #dc +          id,info=@translate.source,@md.source            metadata(id,info)          end -        if @md.dc_relation -          id,info=@translate.relation,@md.dc_relation +        if @md.relation #dc +          id,info=@translate.relation,@md.relation            metadata(id,info)          end -        if @md.dc_coverage -          id,info=@translate.coverage,@md.dc_coverage +        if @md.coverage #dc +          id,info=@translate.coverage,@md.coverage            metadata(id,info)          end          if @md.keywords @@ -558,7 +558,7 @@ WOK  <html xmlns="http://www.w3.org/1999/xhtml">  <head>  <title> -SiSU manifest: #{@md.title} +SiSU manifest: #{@md.full_title}  </title>  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />  <meta name="sourcefile" content="#{@md.fns}" /> @@ -573,8 +573,8 @@ SiSU manifest: #{@md.title}  </div>  <div class="content">  <h1 class="small">#{@translate.manifest_description}</h1> -<h2 class="small">#{@md.dc_title}</h2> -<p class="bold">#{@md.dc_creator}</p> +<h2 class="small">#{@md.full_title}</h2> +<p class="bold">#{@md.author}</p>  <p class="small">    <a href="#output">Document, Available Filetypes</a>  </p> diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb index d4b315f4..d369cc8c 100644 --- a/lib/sisu/v0/manpage.rb +++ b/lib/sisu/v0/manpage.rb @@ -418,7 +418,7 @@ WOK        def publish(manpage)          divider='='          content=[] -        date=if @md.dc_date; @md.dc_date +        date=if @md.date; @md.date          else '2007' #date missing decide on action          end          proj=SiSU_Env::Info_version.new.get_version diff --git a/lib/sisu/v0/param.rb b/lib/sisu/v0/param.rb index ec80e0dd..bcf6f97b 100644 --- a/lib/sisu/v0/param.rb +++ b/lib/sisu/v0/param.rb @@ -118,9 +118,9 @@ module SiSU_Param        @doc={ :lv=>[] }        @doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','',''        @@publisher='SiSU scribe' -      attr_accessor :cmd,:mod,:env,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:sfx,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:dc_title,:html_title,:subtitle,:subtitle_tex,:creator_home,:dc_creator,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:dc_subject,:dc_description,:dc_publisher,:dc_contributor,:dc_date,:dc_date_created,:dc_date_issued,:dc_date_available,:dc_date_valid,:dc_date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:dc_type,:dc_format,:dc_identifier,:dc_source,:dc_language,:language_original,:dc_relation,:dc_coverage,:dc_rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:flag_auto_heading_num,:markup,:markup_instruction,:markup_version,:markup_declared,:make_bold,:make_italic,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:file_size,:user,:home,:hostname,:pwd,:firstseg,:programs,:creator_copymark,:lang,:en,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:man_section,:man_name,:man_synopsis,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original_publication,:original_publication_date,:original_publication_nationality,:original_publication_institution,:writing_focus +      attr_accessor :cmd,:mod,:env,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:sfx,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:flag_auto_heading_num,:markup,:markup_instruction,:markup_version,:markup_declared,:make_bold,:make_italic,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:file_size,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:lang,:en,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:man_section,:man_name,:man_synopsis,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original_publication,:original_publication_date,:original_publication_nationality,:original_publication_institution,:writing_focus        def initialize(fns_array,opt) -        @env=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@sfx=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@dc_title=@html_title=@subtitle=@subtitle_tex=@creator_home=@dc_creator=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_date_created=@dc_date_issued=@dc_date_available=@dc_date_valid=@dc_date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@language_original=@dc_relation=@dc_coverage=@dc_rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_auto_heading_num=@make_bold=@make_italic=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@file_size=@firstseg=@programs=@creator_copymark=@lang=@en=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@man_synopsis=@topic_register=@original_publication_details=@original_publication=@original_publication_date=@original_publication_nationality=@original_publication_institution=@writing_focus=nil +        @env=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@sfx=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_auto_heading_num=@make_bold=@make_italic=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@file_size=@firstseg=@programs=@author_copymark=@lang=@en=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@man_synopsis=@topic_register=@original_publication_details=@original_publication=@original_publication_date=@original_publication_nationality=@original_publication_institution=@writing_focus=nil          @man_section=1          @man_name='man page "name/whatis" information not provided, set in header @man: name=[whatis information]'          @data,@fns,@cmd,@mod,@opt=fns_array,opt.fns,opt.cmd,opt.mod,opt #@data used as data @@ -189,7 +189,7 @@ module SiSU_Param        end        def extract          @user,@home,@hostname,@pwd=ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'] -        @programs,@wc,@dc_language,@language_original={},{},{},{} +        @programs,@wc,@language,@language_original={},{},{},{}          @en={ :sum=>0,:mark=>0,:note=>0,:mismatch=>0 }          @prog=SiSU_Env::Info_settings.new          @sys=SiSU_Env::System_call.new @@ -309,7 +309,7 @@ module SiSU_Param              when /^(?:@ocn:|0~ocn)\s+(.+?)$/m; @ocn=$1                                              #% processing              when /^(?:@title:|0~title)\s+(.+?)$/m                                                   #% metainfo DC                @title=$1.strip -              @dc_title=@title.dup +              @full_title=@title.dup                @html_title=@title.gsub(/(<p>|<p \/>|<br>|<br \/>)/,'')                @set_header_title=true                @title.chomp!(' ') @@ -318,11 +318,11 @@ module SiSU_Param                tell.txt_grey unless @cmd =~/q/              when /^(?:@subtitle:|0~subtitle)\s+(.+?)$/m                                             #% metainfo                @subtitle=$1.strip -              @dc_title="#{@title} - #{@subtitle}" +              @full_title="#{@title} - #{@subtitle}"                @subtitle_tex=@subtitle              when /^(?:@(?:creator|author)-?:|0~(?:creator|author)-?)\s+(.+?)$/                      #% metainfo DC                names=name_format($1) -              @authorship=@dc_creator=names[:name_str] +              @authorship=@author=names[:name_str]                @authors=names[:name_a_h]              when /^@(?:creator|author)\.title:\s+(.+?)$/; @author_title=$1                          # Prof. Dr. etc.              when /^@(?:creator|author)\.nationality:\s+(.+?)$/; @author_nationality=$1 @@ -338,12 +338,12 @@ module SiSU_Param              when /^(?:@digitized_by:|0~digitized_by)\s+(.+?)$/m                                     #% metainfo DC                names=name_format($1)                @digitized_by=names[:name_str] -            when /^(?:@subject:|0~subject)\s+(.+?)$/m; @dc_subject=$1                                               #% metainfo DC -            when /^(?:@description:|0~description)\s+(.+?)$/m; @dc_description=$1                   #% metainfo DC & rss feed +            when /^(?:@subject:|0~subject)\s+(.+?)$/m; @subject=$1                                               #% metainfo DC +            when /^(?:@description:|0~description)\s+(.+?)$/m; @description=$1                   #% metainfo DC & rss feed              when /^(?:@contributor:|0~contributor)\s+(.+?)$/m                                       #% metainfo DC                names=name_format($1) -              @dc_contributor=names[:name_str] -            when /^(?:@publisher:|0~publisher)\s+(.+?)$/m; @dc_publisher=$1                         #% metainfo DC +              @contributor=names[:name_str] +            when /^(?:@publisher:|0~publisher)\s+(.+?)$/m; @publisher=$1                         #% metainfo DC              when /^@original_publication:\s+(.+?)$/m; @original_publication=$1              when /^@original_publication\.date:\s+(.+?)$/; @original_publication_date=$1              when /^@original_publication\.nationality:\s+(.+?)$/; @original_publication_nationality=$1 @@ -351,13 +351,13 @@ module SiSU_Param              when /^@writing_focus\.nationality:\s+(.+?)$/; @writing_focus=$1                       # e.g. Finland (where and article on Finnish law)              when /^(?:@|0~)date.+?$/m                                                               #% metainfo DC                if para =~/(?:@date:|0~date)\s+(.+?)$/m -                @dc_date=$1.strip                                                                   #% original publication date unless the substantive text is updated/modified, then date of update -                if @dc_date !~regx_date \ -                and not @dc_date.empty? -                  tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',@dc_date) +                @date=$1.strip                                                                   #% original publication date unless the substantive text is updated/modified, then date of update +                if @date !~regx_date \ +                and not @date.empty? +                  tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',@date)                    tell.instruct if @cmd =~/v/                  end -                @date_scheme='scheme="ISO-8601"' if @dc_date =~/\d{4}-\d{2}-\d{2}/ +                @date_scheme='scheme="ISO-8601"' if @date =~/\d{4}-\d{2}-\d{2}/                end                if para =~/(?:@date\.added_to_site:|0~date\.added_to_site)\s+(.+?)$/m                  @date_added_to_site=$1.strip @@ -375,7 +375,7 @@ module SiSU_Param                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_created=date +                @date_created=date                  @date_created_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end                if para =~/(?:@date\.issued:|0~date\.issued)\s*(.+?)$/m @@ -385,7 +385,7 @@ module SiSU_Param                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_issued=date +                @date_issued=date                  @date_issued_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end                if para =~/(?:@date\.available:|0~date\.available)\s*(.+?)$/m @@ -395,7 +395,7 @@ module SiSU_Param                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_available=date +                @date_available=date                  @date_available_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end                if para =~/^(?:@date\.valid:|0~date\.valid)\s*(.+?)$/m @@ -405,7 +405,7 @@ module SiSU_Param                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_valid=date +                @date_valid=date                  @date_valid_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end                if para =~/^(?:@date\.modified:|0~date\.modified)\s*(.+?)$/m                                                               #% of interest rss feed & sitemap @@ -415,7 +415,7 @@ module SiSU_Param                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_modified=date +                @date_modified=date                  @date_modified_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end                if para =~/^(?:@date\.translated:|0~date\.translated)\s*(.+?)$/m @@ -428,22 +428,22 @@ module SiSU_Param                  @date_translated=date                  @date_translated_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end -            when /^(?:@type:|0~type)\s+(.+?)$/m;             @dc_type=$1                                                 #% metainfo DC -            when /^(?:@format:|0~format)\s+(.+?)$/m;         @dc_format=$1                                               #% metainfo DC -            #when /^(?:@identifier:|0~identifier)\s+(.+?)$/m; @dc_identifier=$1                                           #% metainfo DC -            when /^(?:@source:|0~source)\s+(.+?)$/m;         @dc_source=$1                                               #% metainfo DC +            when /^(?:@type:|0~type)\s+(.+?)$/m;             @type=$1                                                 #% metainfo DC +            when /^(?:@format:|0~format)\s+(.+?)$/m;         @format=$1                                               #% metainfo DC +            #when /^(?:@identifier:|0~identifier)\s+(.+?)$/m; @identifier=$1                                           #% metainfo DC +            when /^(?:@source:|0~source)\s+(.+?)$/m;         @source=$1                                               #% metainfo DC              when /^(?:@language(?:\.document)?:|0~language(?:\.document)?)\s+(.+?)$/m                                    #% metainfo DC                x=$1.strip                lang=SiSU_Env::Standardise_language.new(x.dup) -              @dc_language[:code]=lang.code -              @dc_language[:name]=lang.title +              @language[:code]=lang.code +              @language[:name]=lang.title              when /^(?:@language\.original:|0~language\.original)\s+(.+?)$/m                                              #% metainfo DC                x=$1.strip                lang=SiSU_Env::Standardise_language.new(x.dup)                @language_original[:name]=lang.title -            when /^(?:@relation:|0~relation)\s+(.+?)$/m;     @dc_relation=$1                                             #% metainfo DC -            when /^(?:@coverage:|0~coverage)\s+(.+?)$/m;     @dc_coverage=$1                                             #% metainfo DC -            when /^(?:@rights:|0~rights)\s+(.+?)$/m;         @dc_rights=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC copyright, public domain, copyleft, creative commons, etc. +            when /^(?:@relation:|0~relation)\s+(.+?)$/m;     @relation=$1                                             #% metainfo DC +            when /^(?:@coverage:|0~coverage)\s+(.+?)$/m;     @coverage=$1                                             #% metainfo DC +            when /^(?:@rights:|0~rights)\s+(.+?)$/m;         @rights=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC copyright, public domain, copyleft, creative commons, etc.              when /^(?:@papersize:|0~papersize)\s+(.+?)$/m                                                                #% metainfo DC                l=$1                if @mod.inspect !~/--papersize[=-]\S+/ @@ -736,11 +736,11 @@ module SiSU_Param            @man_synopsis.gsub!(/\n/,"\n.BR\n")            @man_synopsis.gsub!(/\A/,"\n.SH SYNOPSIS\n")          end -        unless @dc_rights -          if @dc_creator -            @dc_rights ||=if @dc_date =~/([12][890]\d{2})/                     #matches years 1800 through 20\d\d 2004w19 -              "Copyright (C) #{$1} #@dc_creator" -            else 'Copyright (C)' + @dc_creator +        unless @rights +          if @author +            @rights ||=if @date =~/([12][890]\d{2})/                     #matches years 1800 through 20\d\d 2004w19 +              "Copyright (C) #{$1} #@author" +            else 'Copyright (C)' + @author              end            end          end @@ -793,17 +793,17 @@ module SiSU_Param              end            end          end -        @dc_publisher ||= "#@@publisher (this copy)" +        @publisher ||= "#@@publisher (this copy)"          fn_set_lang=SiSU_Env::Standardise_language.new.file_to_language(@fns) -        unless @dc_language[:code] \ -        and @dc_language[:name] +        unless @language[:code] \ +        and @language[:name]            lang=@env.i18n.language #default language settings for directory by name, or in sysrc.yml -          @dc_language[:code] ||= lang.code -          @dc_language[:name] ||= lang.title +          @language[:code] ||= lang.code +          @language[:name] ||= lang.title          end          unless fn_set_lang[:d]==true #decide, naming convention overrides other settings, within document, etc. -          @dc_language[:code]=fn_set_lang[:c] -          @dc_language[:name]=fn_set_lang[:l] +          @language[:code]=fn_set_lang[:c] +          @language[:name]=fn_set_lang[:l]          end          @fnl=@env.i18n.lang_filename(fn_set_lang[:c])          @flv.each do |l| @@ -817,7 +817,7 @@ module SiSU_Param          end if @flv          @lang.uniq!          @fn=SiSU_Env::Env_call.new(@fns).lang(fn_set_lang[:c]) -        @dc_identifier="#{@env.url.root}/#@fnb/#{@fn[:toc]}" #DC note constructed dc identifier +        @identifier="#{@env.url.root}/#@fnb/#{@fn[:toc]}" #DC note constructed dc identifier          if @en[:note] > 0 \          and @en[:sum] > 0            if @en[:sum] > 0 @@ -836,8 +836,8 @@ module SiSU_Param            tell=SiSU_Screen::Ansi.new(@cmd,'Document Title Missing','please provide it')            tell.warn if @cmd =~/v/          end -        if @dc_creator !~/[\S]/ -          tell=SiSU_Screen::Ansi.new(@cmd,'Document Creator/Author Missing','please provide it') +        if @author !~/[\S]/ +          tell=SiSU_Screen::Ansi.new(@cmd,'Document Author/Creator Missing','please provide it')            tell.warn if @cmd =~/v/          end          # Elementary Document Structure Analysis - adds complexity may remove - need to develop - appears to work, proof of concept diff --git a/lib/sisu/v0/shared_txt.rb b/lib/sisu/v0/shared_txt.rb index 91389538..3dfadeb3 100644 --- a/lib/sisu/v0/shared_txt.rb +++ b/lib/sisu/v0/shared_txt.rb @@ -156,7 +156,7 @@ module SiSU_text_utils      end      def start_is_match        meta=case @p -      when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/;               header($1,@md.dc_title,'meta','dc') #dc 1 +      when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/;               header($1,@md.full_title,'meta','dc') #dc 1        #when /^@(subtitle):\s+(.+?)$/;            header($1,$2,'meta','extra')        when /^#{Mx[:meta_o]}(creator|author)#{Mx[:meta_c]}\s*(.+?)$/;      header('creator',$2,'meta','dc')    #dc 2        when /^#{Mx[:meta_o]}(subject)#{Mx[:meta_c]}\s*(.+?)$/;             header($1,$2,'meta','dc')           #dc 3 diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb index aad7c17e..ffd4bc15 100644 --- a/lib/sisu/v0/shared_xml.rb +++ b/lib/sisu/v0/shared_xml.rb @@ -541,109 +541,109 @@ module SiSU_XML_tags #Format    include SiSU_Viz    class RDF      def initialize(md='',seg_name=[],tracker=0) -      @dc_title=@dc_subtitle=@dc_creator=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_date_created=@dc_date_issued=@dc_date_available=@dc_date_valid=@dc_date_modified=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@dc_relation=@dc_coverage=@dc_rights=@copyright=@owner=@keywords='' +      @full_title=@subtitle=@author=@subject=@description=@publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@copyright=@owner=@keywords=''        #seg_name=%{#{@@seg_name[@@tracker]} - } if @@seg_name[@@tracker]        @md=md        @sfx,@pdf=@md.sfx,@md.pdf        @rdfurl=%{  rdf:about="http://www.jus.uio.no/lm/toc"\n} -      if @md.dc_title                                                            # DublinCore 1 - title -        @rdf_title=%{    dc.title="#{seg_name}#{@md.dc_title}"\n} -        @dc_title=%{  <meta name="dc.title" content="#{@md.dc_title}" />\n} -        #@dc_title=%{  <meta name="dc.title" content="#{seg_name}#{@md.dc_title}" />\n} -      end -      if @md.dc_creator                                                          # DublinCore 2 - creator/author (author) -        @rdf_creator=%{    dc.creator="#{@md.dc_creator}"\n} -        content=meta_content_clean(@md.dc_creator) -        @dc_creator=%{  <meta name="dc.creator" content="#{content}" />\n} -      end -      if @md.dc_subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) -        @rdf_subject=%{    dc.subject="#{@md.dc_subject}"\n} -        content=meta_content_clean(@md.dc_subject) -        @dc_subject=%{  <meta name="dc.subject" content="#{content}" />\n} -      end -      if @md.dc_description                                                      # DublinCore 4 - description -        @rdf_description=%{    dc.description="#{@md.dc_description}"\n} -        content=meta_content_clean(@md.dc_description) -        @dc_description=%{  <meta name="dc.description" content="#{content}" />\n} -      end -      if @md.dc_publisher                                                        # DublinCore 5 - publisher (current copy published by) -        @rdf_publisher=%{    dc.publisher="#{@md.dc_publisher}"\n} -        content=meta_content_clean(@md.dc_publisher) -        @dc_publisher=%{  <meta name="dc.publisher" content="#{content}" />\n} -      end -      if @md.dc_contributor                                                      # DublinCore 6 - contributor -        @rdf_contributor=%{    dc.contributor="#{@md.dc_contributor}"\n} -        content=meta_content_clean(@md.dc_contributor) -        @dc_contributor=%{  <meta name="dc.contributor" content="#{content}" />\n} -      end -      if @md.dc_date                                                             # DublinCore 7 - date year-mm-dd -        @rdf_date=%{    dc.date="#{@md.dc_date}"\n} -        @dc_date=%{  <meta name="dc.date" content="#{@md.dc_date}" #{@md.date_scheme} />\n} -      end -      if @md.dc_date_created                                                     # DublinCore 7 - date.created year-mm-dd -        @rdf_date_created=%{    dc.date.created="#{@md.dc_date_created}"\n} -        @dc_date_created=%{  <meta name="dc.date.created" content="#{@md.dc_date_created}" #{@md.date_created_scheme} />\n} -      end -      if @md.dc_date_issued                                                      # DublinCore 7 - date.issued year-mm-dd -        @rdf_date_issued=%{    dc.date.issued="#{@md.dc_date_issued}"\n} -        @dc_date_issued=%{  <meta name="dc.date.issued" content="#{@md.dc_date_issued}" #{@md.date_issued_scheme} />\n} -      end -      if @md.dc_date_available                                                   # DublinCore 7 - date.available year-mm-dd -        @rdf_date_available=%{    dc.date.available="#{@md.dc_date_available}"\n} -        @dc_date_available=%{  <meta name="dc.date.available" content="#{@md.dc_date_available}" #{@md.date_available_scheme} />\n} -      end -      if @md.dc_date_valid                                                       # DublinCore 7 - date.valid year-mm-dd -        @rdf_date_valid=%{    dc.date.valid="#{@md.dc_date_valid}"\n} -        @dc_date_valid=%{  <meta name="dc.date.valid" content="#{@md.dc_date_valid}" #{@md.date_valid_scheme} />\n} -      end -      if @md.dc_date_modified                                                    # DublinCore 7 - date.modified year-mm-dd -        @rdf_date_modified=%{    dc.date.modified="#{@md.dc_date_modified}"\n} -        @dc_date_modified=%{  <meta name="dc.date.modified" content="#{@md.dc_date_modified}" #{@md.date_modified_scheme} />\n} -      end -      if @md.dc_type                                                             # DublinCore 8 - type (genre eg. report, convention etc) -        @rdf_type=%{    dc.type="#{@md.dc_type}"\n} -        content=meta_content_clean(@md.dc_type) -        @dc_type=%{  <meta name="dc.type" content="#{content}" />\n} -      end -      if @md.dc_format                                                           # DublinCore 9 - format (use your mime type) -        @rdf_format=%{    dc.format="#{@md.dc_format}"\n} -        content=meta_content_clean(@md.dc_format) -        @dc_format=%{  <meta name="dc.format" content="#{content}" />\n} -      end -      if @md.dc_identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) -        @rdf_identifier=%{    dc.identifier="#{@md.dc_identifier}"\n} -        content=meta_content_clean(@md.dc_identifier) -        @dc_identifier=%{  <meta name="dc.identifier" content="#{content}" />\n} -      end -      if @md.dc_source                                                           # DublinCore 11 - source (document source) -        @rdf_source=%{    dc.source="#{@md.dc_source}"\n} -        content=meta_content_clean(@md.dc_source) -        @dc_source=%{  <meta name="dc.source" content="#{content}" />\n} -      end -      if @md.dc_language \ -      and @md.dc_language[:name]                                                  # DublinCore 12 - language (English) -        @rdf_language=%{    dc.language="#{@md.dc_language[:name]}"\n} -        @dc_language=%{  <meta name="dc.language" content="#{@md.dc_language[:name]}" />\n} +      if @md.full_title                                                            # DublinCore 1 - title +        @rdf_title=%{    dc.title="#{seg_name}#{@md.full_title}"\n} +        @full_title=%{  <meta name="dc.title" content="#{@md.full_title}" />\n} +        #@full_title=%{  <meta name="dc.title" content="#{seg_name}#{@md.full_title}" />\n} +      end +      if @md.author                                                          # DublinCore 2 - creator/author (author) +        @rdf_author=%{    dc.author="#{@md.author}"\n} +        content=meta_content_clean(@md.author) +        @author=%{  <meta name="dc.author" content="#{content}" />\n} +      end +      if @md.subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) +        @rdf_subject=%{    dc.subject="#{@md.subject}"\n} +        content=meta_content_clean(@md.subject) +        @subject=%{  <meta name="dc.subject" content="#{content}" />\n} +      end +      if @md.description                                                      # DublinCore 4 - description +        @rdf_description=%{    dc.description="#{@md.description}"\n} +        content=meta_content_clean(@md.description) +        @description=%{  <meta name="dc.description" content="#{content}" />\n} +      end +      if @md.publisher                                                        # DublinCore 5 - publisher (current copy published by) +        @rdf_publisher=%{    dc.publisher="#{@md.publisher}"\n} +        content=meta_content_clean(@md.publisher) +        @publisher=%{  <meta name="dc.publisher" content="#{content}" />\n} +      end +      if @md.contributor                                                      # DublinCore 6 - contributor +        @rdf_contributor=%{    dc.contributor="#{@md.contributor}"\n} +        content=meta_content_clean(@md.contributor) +        @contributor=%{  <meta name="dc.contributor" content="#{content}" />\n} +      end +      if @md.date                                                             # DublinCore 7 - date year-mm-dd +        @rdf_date=%{    dc.date="#{@md.date}"\n} +        @date=%{  <meta name="dc.date" content="#{@md.date}" #{@md.date_scheme} />\n} +      end +      if @md.date_created                                                     # DublinCore 7 - date.created year-mm-dd +        @rdf_date_created=%{    dc.date.created="#{@md.date_created}"\n} +        @date_created=%{  <meta name="dc.date.created" content="#{@md.date_created}" #{@md.date_created_scheme} />\n} +      end +      if @md.date_issued                                                      # DublinCore 7 - date.issued year-mm-dd +        @rdf_date_issued=%{    dc.date.issued="#{@md.date_issued}"\n} +        @date_issued=%{  <meta name="dc.date.issued" content="#{@md.date_issued}" #{@md.date_issued_scheme} />\n} +      end +      if @md.date_available                                                   # DublinCore 7 - date.available year-mm-dd +        @rdf_date_available=%{    dc.date.available="#{@md.date_available}"\n} +        @date_available=%{  <meta name="dc.date.available" content="#{@md.date_available}" #{@md.date_available_scheme} />\n} +      end +      if @md.date_valid                                                       # DublinCore 7 - date.valid year-mm-dd +        @rdf_date_valid=%{    dc.date.valid="#{@md.date_valid}"\n} +        @date_valid=%{  <meta name="dc.date.valid" content="#{@md.date_valid}" #{@md.date_valid_scheme} />\n} +      end +      if @md.date_modified                                                    # DublinCore 7 - date.modified year-mm-dd +        @rdf_date_modified=%{    dc.date.modified="#{@md.date_modified}"\n} +        @date_modified=%{  <meta name="dc.date.modified" content="#{@md.date_modified}" #{@md.date_modified_scheme} />\n} +      end +      if @md.type                                                             # DublinCore 8 - type (genre eg. report, convention etc) +        @rdf_type=%{    dc.type="#{@md.type}"\n} +        content=meta_content_clean(@md.type) +        @type=%{  <meta name="dc.type" content="#{content}" />\n} +      end +      if @md.format                                                           # DublinCore 9 - format (use your mime type) +        @rdf_format=%{    dc.format="#{@md.format}"\n} +        content=meta_content_clean(@md.format) +        @format=%{  <meta name="dc.format" content="#{content}" />\n} +      end +      if @md.identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) +        @rdf_identifier=%{    dc.identifier="#{@md.identifier}"\n} +        content=meta_content_clean(@md.identifier) +        @identifier=%{  <meta name="dc.identifier" content="#{content}" />\n} +      end +      if @md.source                                                           # DublinCore 11 - source (document source) +        @rdf_source=%{    dc.source="#{@md.source}"\n} +        content=meta_content_clean(@md.source) +        @source=%{  <meta name="dc.source" content="#{content}" />\n} +      end +      if @md.language \ +      and @md.language[:name]                                                  # DublinCore 12 - language (English) +        @rdf_language=%{    dc.language="#{@md.language[:name]}"\n} +        @language=%{  <meta name="dc.language" content="#{@md.language[:name]}" />\n}        end        if @md.language_original \        and @md.language_original[:name]          @rdf_language_original=%{    dc.language="#{@md.language_original[:name]}"\n}          @language_original=%{  <meta name="dc.language" content="#{@md.language_original[:name]}" />\n}        end -      if @md.dc_relation                                                         # DublinCore 13 - relation -        @rdf_relation=%{    dc.relation="#{@md.dc_relation}"\n} -        content=meta_content_clean(@md.dc_relation) -        @dc_relation=%{  <meta name="dc.relation" content="#{content}" />\n} +      if @md.relation                                                         # DublinCore 13 - relation +        @rdf_relation=%{    dc.relation="#{@md.relation}"\n} +        content=meta_content_clean(@md.relation) +        @relation=%{  <meta name="dc.relation" content="#{content}" />\n}        end -      if @md.dc_coverage                                                         # DublinCore 14 - coverage -        @rdf_coverage=%{    dc.coverage="#{@md.dc_coverage}"\n} -        content=meta_content_clean(@md.dc_coverage) -        @dc_coverage=%{  <meta name="dc.coverage" content="#{content}" />\n} +      if @md.coverage                                                         # DublinCore 14 - coverage +        @rdf_coverage=%{    dc.coverage="#{@md.coverage}"\n} +        content=meta_content_clean(@md.coverage) +        @coverage=%{  <meta name="dc.coverage" content="#{content}" />\n}        end -      if @md.dc_rights                                                           # DublinCore 15 - rights -        @rdf_rights=%{    dc.rights="#{@md.dc_rights}"\n} -        content=meta_content_clean(@md.dc_rights) -        @dc_rights=%{  <meta name="dc.rights" content="#{content}" />\n} +      if @md.rights                                                           # DublinCore 15 - rights +        @rdf_rights=%{    dc.rights="#{@md.rights}"\n} +        content=meta_content_clean(@md.rights) +        @rights=%{  <meta name="dc.rights" content="#{content}" />\n}        end        content=meta_content_clean(@md.keywords)        @keywords=%{  <meta name="keywords" content="#{content}" />\n} if @md.keywords @@ -725,7 +725,7 @@ WOK      def metatag_html #values strung together, because some empty, and resulting output (line breaks) is much better  #{@vz.js_head}  <<WOK -#@dc_title#@dc_subtitle#@dc_creator#@dc_subject#@dc_description#@dc_publisher#@dc_contributor#@dc_date#@dc_date_created#@dc_date_issued#@dc_date_available#@dc_date_valid#@dc_date_modified#@dc_type#@dc_format#@dc_identifier#@dc_source#@dc_language#@dc_relation#@dc_coverage#@dc_rights#@copyright#@owner +#@full_title#@subtitle#@author#@subject#@description#@publisher#@contributor#@date#@date_created#@date_issued#@date_available#@date_valid#@date_modified#@type#@format#@identifier#@source#@language#@relation#@coverage#@rights#@copyright#@owner  #{@vz.txt_generator}  #{@vz.png_ico}  WOK diff --git a/lib/sisu/v0/sitemaps.rb b/lib/sisu/v0/sitemaps.rb index c08a0789..8e706ce4 100644 --- a/lib/sisu/v0/sitemaps.rb +++ b/lib/sisu/v0/sitemaps.rb @@ -153,8 +153,8 @@ WOK        idx=sitemap_idx.join      end      def sitemap -      map=if @md.dc_date_modified \ -      and @md.dc_date_modified=~/\d{4}-\d{2}-\d{2}/ +      map=if @md.date_modified \ +      and @md.date_modified=~/\d{4}-\d{2}-\d{2}/          sitemap_date_modified        else sitemap_no_date        end @@ -169,18 +169,18 @@ WOK  #{@rdf.comment_xml}    <url>      <loc>#{@env.path.url.remote}/#@fnb_utf8_xml/#{@fn[:toc]}</loc> -    <lastmod>#{@md.dc_date_modified}</lastmod> +    <lastmod>#{@md.date_modified}</lastmod>      <changefreq>monthly</changefreq>      <priority>0.7</priority>    </url>    <url>      <loc>#{@env.path.url.remote}/#@fnb_utf8_xml/#{@fn[:doc]}</loc> -    <lastmod>#{@md.dc_date_modified}</lastmod> +    <lastmod>#{@md.date_modified}</lastmod>      <priority>0.5</priority>    </url>    <url>      <loc>#{@env.path.url.remote}/#@fnb_utf8_xml/#{@fn[:manifest]}</loc> -    <lastmod>#{@md.dc_date_modified}</lastmod> +    <lastmod>#{@md.date_modified}</lastmod>      <priority>0.5</priority>    </url>  </urlset> diff --git a/lib/sisu/v0/texinfo_format.rb b/lib/sisu/v0/texinfo_format.rb index 7f669185..91e48d0f 100644 --- a/lib/sisu/v0/texinfo_format.rb +++ b/lib/sisu/v0/texinfo_format.rb @@ -100,7 +100,7 @@ module SiSU_Texinfo_format          subtitle="@subtitle @value{VERSION}, @value{UPDATED}\n" #bugwatch        end        subtitle ||='' -      author=@md.dc_creator if @md.dc_creator +      author=@md.author if @md.author        author ||=''        author.gsub!(/[\*]/,'') #if author        v=SiSU_Env::Info_version.new.get_version @@ -174,68 +174,68 @@ WOK      def dublincore        title=spec_char_string(@md.title) if @md.title        subtitle=spec_char_string(@md.subtitle) if @md.subtitle -      dc_title="#{title} - #{subtitle}" -      dc_creator=spec_char_string(@md.dc_creator) if @md.dc_creator -      dc_subject=spec_char_string(@md.dc_subject) if @md.dc_subject -      dc_description=spec_char_string(@md.dc_description) if @md.dc_description -      dc_publisher=spec_char_string(@md.dc_publisher) if @md.dc_publisher -      dc_contributor=spec_char_string(@md.dc_contributor) if @md.dc_contributor -      dc_date=spec_char_string(@md.dc_date) if @md.dc_date -      dc_date_created=spec_char_string(@md.dc_date_created) if @md.dc_date_created -      dc_date_issued=spec_char_string(@md.dc_date_issued) if @md.dc_date_issued -      dc_date_available=spec_char_string(@md.dc_date_available) if @md.dc_date_available -      dc_date_valid=spec_char_string(@md.dc_date_valid) if @md.dc_date_valid -      dc_date_modified=spec_char_string(@md.dc_date_modified) if @md.dc_date_modified -      dc_type=spec_char_string(@md.dc_type) if @md.dc_type -      dc_format=spec_char_string(@md.dc_format) if @md.dc_format -      dc_identifier=spec_char_string(@md.dc_identifier) if @md.dc_identifier -      dc_source=spec_char_string(@md.dc_source) if @md.dc_source -      dc_language=spec_char_string(@md.dc_language[:name]) if @md.dc_language[:name] +      full_title="#{title} - #{subtitle}"                                           #dc +      author=spec_char_string(@md.author) if @md.author                             #dc +      subject=spec_char_string(@md.subject) if @md.subject                          #dc +      description=spec_char_string(@md.description) if @md.description              #dc +      publisher=spec_char_string(@md.publisher) if @md.publisher                    #dc +      contributor=spec_char_string(@md.contributor) if @md.contributor              #dc +      date=spec_char_string(@md.date) if @md.date                                   #dc +      date_created=spec_char_string(@md.date_created) if @md.date_created           #dc +      date_issued=spec_char_string(@md.date_issued) if @md.date_issued              #dc +      date_available=spec_char_string(@md.date_available) if @md.date_available     #dc +      date_valid=spec_char_string(@md.date_valid) if @md.date_valid                 #dc +      date_modified=spec_char_string(@md.date_modified) if @md.date_modified        #dc +      type=spec_char_string(@md.type) if @md.type                                   #dc +      format=spec_char_string(@md.format) if @md.format                             #dc +      identifier=spec_char_string(@md.identifier) if @md.identifier                 #dc +      source=spec_char_string(@md.source) if @md.source                             #dc +      language=spec_char_string(@md.language[:name]) if @md.language[:name]         #dc        #language_original=spec_char_string(@md.language_original[:name]) if @md.language_original[:name] -      dc_relation=spec_char_string(@md.dc_relation) if @md.dc_relation -      dc_coverage=spec_char_string(@md.dc_coverage) if @md.dc_coverage -      dc_rights=spec_char_string(@md.dc_rights) if @md.dc_rights -      dc_title="Title: #{dc_title}\n\n" if dc_title -      dc_creator="Creator: #{dc_creator}\n\n" if dc_creator -      dc_subject="Subject: #{dc_subject}\n\n" if dc_subject -      dc_description="Description: #{dc_description}\n\n" if dc_description -      dc_publisher="Publisher: #{dc_publisher}\n\n" if dc_publisher -      dc_contributor="Contributor: #{dc_contributor}\n\n" if dc_contributor -      dc_date="Date: #{dc_date}\n\n" if dc_date -      dc_date_created="Date Created: #{dc_date_created}\n\n" if dc_date_created -      dc_date_issued="Date Issued: #{dc_date_issued}\n\n" if dc_date_issued -      dc_date_available="Date Available: #{dc_date_available}\n\n" if dc_date_available -      dc_date_valid="Date Valid: #{dc_date_valid}\n\n" if dc_date_valid -      dc_date_modified="Date Modified: #{dc_date_modified}\n\n" if dc_date_modified -      dc_format="Format: #{dc_format}\n\n" if dc_format -      dc_identifier="Identifier: #{dc_identifier}\n\n" if dc_identifier #watch -      dc_source="Source: #{dc_source}\n\n" if dc_source -      dc_language="Language: #{dc_language}\n\n" if dc_language -      dc_relation="Relation: #{dc_relation}\n\n" if dc_relation -      dc_coverage="Coverage: #{dc_coverage}\n\n" if dc_coverage -      dc_rights="Rights: #{dc_rights}\n\n" if dc_rights +      relation=spec_char_string(@md.relation) if @md.relation                       #dc +      coverage=spec_char_string(@md.coverage) if @md.coverage                       #dc +      rights=spec_char_string(@md.rights) if @md.rights                             #dc +      full_title="Title: #{full_title}\n\n" if full_title                           #dc +      author="Author: #{author}\n\n" if author                                      #dc +      subject="Subject: #{subject}\n\n" if subject                                  #dc +      description="Description: #{description}\n\n" if description                  #dc +      publisher="Publisher: #{publisher}\n\n" if publisher                          #dc +      contributor="Contributor: #{contributor}\n\n" if contributor                  #dc +      date="Date: #{date}\n\n" if date                                              #dc +      date_created="Date Created: #{date_created}\n\n" if date_created              #dc +      date_issued="Date Issued: #{date_issued}\n\n" if date_issued                  #dc +      date_available="Date Available: #{date_available}\n\n" if date_available      #dc +      date_valid="Date Valid: #{date_valid}\n\n" if date_valid                      #dc +      date_modified="Date Modified: #{date_modified}\n\n" if date_modified          #dc +      format="Format: #{format}\n\n" if format                                      #dc +      identifier="Identifier: #{identifier}\n\n" if identifier #watch               #dc +      source="Source: #{source}\n\n" if source                                      #dc +      language="Language: #{language}\n\n" if language                              #dc +      relation="Relation: #{relation}\n\n" if relation                              #dc +      coverage="Coverage: #{coverage}\n\n" if coverage                              #dc +      rights="Rights: #{rights}\n\n" if rights                                      #dc        "@node Dublin Core\n" +          "@unnumbered Dublin Core\n" +          "@cindex chapter, Dublin Core\n\n" + -        "#{dc_title}" + -        "#{dc_creator}" + -        "#{dc_subject}" + -        "#{dc_description}" + -        "#{dc_publisher}" + -        "#{dc_contributor}" + -        "#{dc_date}" + -        "#{dc_date_created}" + -        "#{dc_date_issued}" + -        "#{dc_date_available}" + -        "#{dc_date_valid}" + -        "#{dc_date_modified}" + -        "#{dc_format}" + -        "#{dc_identifier}" + -        "#{dc_source}" + -        "#{dc_language}" + -        "#{dc_relation}" + -        "#{dc_coverage}" + -        "#{dc_rights}" + +        "#{full_title}" + +        "#{author}" + +        "#{subject}" + +        "#{description}" + +        "#{publisher}" + +        "#{contributor}" + +        "#{date}" + +        "#{date_created}" + +        "#{date_issued}" + +        "#{date_available}" + +        "#{date_valid}" + +        "#{date_modified}" + +        "#{format}" + +        "#{identifier}" + +        "#{source}" + +        "#{language}" + +        "#{relation}" + +        "#{coverage}" + +        "#{rights}" +          "\n\n"      end      def tail @@ -518,4 +518,4 @@ WOK    end  end  __END__ - +watch title, might need full_title diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index e7422baf..abafb30f 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -303,10 +303,10 @@ module SiSU_TeX            @@rights=nil            tell=SiSU_Screen::Ansi.new(@md.cmd,"pdfTex portrait & landscape")            tell.txt_grey unless @md.cmd =~/q/ -          if @md.dc_rights -            use=@md.dc_rights.dup #dup is necessary, else contents of :rights changed +          if @md.rights +            use=@md.rights.dup #dup is necessary, else contents of :rights changed              sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,use) -            copymark=if @md.creator_copymark; '{\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} ' +            copymark=if @md.author_copymark; '{\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} '              else ''              end              copymark='Copyright {\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} ' @@ -551,7 +551,7 @@ WOK          sisu_rc_footnote=if @md.sc_info; @tex.doc_sc_info_footnote_full          else                             @tex.doc_sc_info_footnote_brief          end -        #@copymark=if @md.creator_copymark; '^\copyright' +        #@copymark=if @md.author_copymark; '^\copyright'          #else                               ''          #end          @copymark='' #check and remove as now is superflous @@ -561,15 +561,15 @@ WOK          x[:p]=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).title_portrait          @tex_file << x          x=nil -        if @md.dc_creator -          sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,@md.dc_creator) -          creator=sp_char.special_characters -          @tex_file << if @md.creator_home +        if @md.author +          sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,@md.author) +          author=sp_char.special_characters +          @tex_file << if @md.author_home              <<WOK -\\author{\\href{#{@md.creator_home}}{#@copymark \\textnormal{#{creator}}}} +\\author{\\href{#{@md.author_home}}{#@copymark \\textnormal{#{author}}}}  WOK -          else "\n\\author{#@copymark \\textnormal{#{creator}}}" +          else "\n\\author{#@copymark \\textnormal{#{author}}}"            end          end          @tex_file << unless @md.fnb =~/^mail\s*$/; "\n\\date{\\begin{footnotesize} copy @ #{@tex.site} \\end{footnotesize} #{sisu_rc_footnote}}" @@ -581,7 +581,7 @@ WOK  WOK          #@tex_file << @tex.newpage #newpage clearpage depending on portrait or landscape          @tex_file << "\\newpage\n" -        @tex_file << @@rights if @md.dc_rights #if @orientation =~/landscape/ +        @tex_file << @@rights if @md.rights #if @orientation =~/landscape/          @tex_file << @@prefix_b if @md.prefix_b          @tex_file << @tex.sisu_rights          @tex_file << if @md.sc_info; @tex.doc_sc_info diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index 00249c26..2efec5c4 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -603,8 +603,8 @@ para        @ps=@txt if @txt=~/(?:a4|letter|legal|book|a5|b5)/i      end      def language -      @lang=if @md.dc_language[:code] -        case @md.dc_language[:code] +      @lang=if @md.language[:code] +        case @md.language[:code]          when 'en'; 'english'          when 'us'; 'USenglish' # depreciated, see iso-639-2          when 'fr'; 'french' @@ -639,7 +639,7 @@ para      end      def tex_head_lang #babel 18n        language -      #@md.dc_language[:name] +      #@md.language[:name]        lang=if @lang =~/^(?:en)$/; @lang        else "#@lang,english"        end diff --git a/lib/sisu/v0/xml_fictionbook.rb b/lib/sisu/v0/xml_fictionbook.rb index 60cbed66..3cdd098a 100644 --- a/lib/sisu/v0/xml_fictionbook.rb +++ b/lib/sisu/v0/xml_fictionbook.rb @@ -109,10 +109,10 @@ module SiSU_XML_Fictionbook        def head          version=SiSU_Env::Info_version.new.get_version          rb_ver=SiSU_Env::Info_version.new.rbversion -        date_available=if defined? @md.dc_date_available; "\n     <p>#{@md.dc_date_available} Initial version</p>" +        date_available=if defined? @md.date_available; "\n     <p>#{@md.date_available} Initial version</p>"          else ''          end -        date_modified=if defined? @md.dc_date_available; "\n      <p>#{@md.dc_date_modified} Last Modified</p>" +        date_modified=if defined? @md.date_available; "\n      <p>#{@md.date_modified} Last Modified</p>"          else ''          end          head=<<WOK @@ -127,10 +127,10 @@ module SiSU_XML_Fictionbook        <middle-name>***</middle-name>        <last-name>***</last-name>      </author> -    <book-title>#{@md.dc_title}</book-title> +    <book-title>#{@md.full_title}</book-title>      <annotation>      </annotation> -    <date value="#{@md.dc_date}">yyyy</date> +    <date value="#{@md.date}">yyyy</date>    </title-info>       <document-info>      <author> diff --git a/lib/sisu/v0/xml_format.rb b/lib/sisu/v0/xml_format.rb index b90200ea..3fe703d7 100644 --- a/lib/sisu/v0/xml_format.rb +++ b/lib/sisu/v0/xml_format.rb @@ -84,101 +84,101 @@ module SiSU_XML_format    end    class Head_information      def initialize #dc rdf -      @dc_title=@dc_subtitle=@dc_creator=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@dc_relation=@dc_coverage=@dc_rights=@copyright=@owner=@keywords='' +      @full_title=@subtitle=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@copyright=@owner=@keywords=''        @sfx,@pdf,@md=@@md.sfx,@@md.pdf,@@md        # DublinCore 1 - title        @rdfurl=%{  rdf:about="http://www.jus.uio.no/lm/toc"\n} -      if @md.dc_title -        @dc_title=%{<meta name="dc.title" content="#{seg_name}#{@md.dc_title}" />\n} +      if @md.full_title +        @full_title=%{<meta name="dc.title" content="#{seg_name}#{@md.full_title}" />\n}          #if @md.subtitle          #  #@rdf_title=%{    dc.title="#{seg_name}#{@md.title} - #{@md.subtitle}"\n} -        #  @dc_title=%{<meta name="dc.title" content="#{seg_name}#{@md.title} - #{@md.subtitle}" />\n} +        #  @full_title=%{<meta name="dc.title" content="#{seg_name}#{@md.title} - #{@md.subtitle}" />\n}          #else          #  #@rdf_title=%{    dc.title="#{seg_name}#{@md.title}"\n} -        #  @dc_title=%{<meta name="dc.title" content="#{seg_name}#{@md.dc_title}" />\n} +        #  @full_title=%{<meta name="dc.title" content="#{seg_name}#{@md.title}" />\n}          #end        end -      if @md.dc_creator                                                          # DublinCore 2 - creator/author (author) -        @rdf_creator=%{    dc.creator="#{@md.dc_creator}"\n} -        @dc_creator=%{<meta name="dc.creator" content="#{@md.dc_creator}" />\n} +      if @md.author                                                          # DublinCore 2 - author/creator (author) +        @rdf_author=%{    dc.author="#{@md.author}"\n} +        @author=%{<meta name="dc.author" content="#{@md.author}" />\n}        end -      if @md.dc_subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) -        @rdf_subject=%{    dc.subject="#{@md.dc_subject}"\n} -        @dc_subject=%{<meta name="dc.subject" content="#{@md.dc_subject}" />\n} +      if @md.subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) +        @rdf_subject=%{    dc.subject="#{@md.subject}"\n} +        @subject=%{<meta name="dc.subject" content="#{@md.subject}" />\n}        end -      if @md.dc_description                                                      # DublinCore 4 - description +      if @md.description                                                      # DublinCore 4 - description          @rdf_description=%{    dc.description="#{@md.description}"\n} -        @dc_description=%{<meta name="dc.dc_description" content="#{@md.description}" />\n} +        @description=%{<meta name="dc.description" content="#{@md.description}" />\n}        end -      if @md.dc_publisher                                                        # DublinCore 5 - publisher (current copy published by) -        @rdf_publisher=%{    dc.publisher="#{@md.dc_publisher}"\n} -        @dc_publisher=%{<meta name="dc.publisher" content="#{@md.dc_publisher}" />\n} +      if @md.publisher                                                        # DublinCore 5 - publisher (current copy published by) +        @rdf_publisher=%{    dc.publisher="#{@md.publisher}"\n} +        @publisher=%{<meta name="dc.publisher" content="#{@md.publisher}" />\n}        end -      if @md.dc_contributor                                                      # DublinCore 6 - contributor -        @rdf_contributor=%{    dc.contributor="#{@md.dc_contributor}"\n} -        @dc_contributor=%{<meta name="dc.contributor" content="#{@md.dc_contributor}" />\n} +      if @md.contributor                                                      # DublinCore 6 - contributor +        @rdf_contributor=%{    dc.contributor="#{@md.contributor}"\n} +        @contributor=%{<meta name="dc.contributor" content="#{@md.contributor}" />\n}        end -      if @md.dc_date                                                             # DublinCore 7 - date year-mm-dd -        @rdf_date=%{    dc.date="#{@md.dc_date}"\n} -        @dc_date=%{<meta name="dc.date" content="#{@md.dc_date}" #{@md.date_scheme} />\n} +      if @md.date                                                             # DublinCore 7 - date year-mm-dd +        @rdf_date=%{    dc.date="#{@md.date}"\n} +        @date=%{<meta name="dc.date" content="#{@md.date}" #{@md.date_scheme} />\n}        end -      if @md.dc_date_created                                                     # DublinCore 7 - date.created year-mm-dd -        @rdf_date_created=%{    dc.date.created="#{@md.dc_date_created}"\n} -        @dc_date_created=%{<meta name="dc.date.created" content="#{@md.dc_date_created}" #{@md.date_created_scheme} />\n} +      if @md.date_created                                                     # DublinCore 7 - date.created year-mm-dd +        @rdf_date_created=%{    dc.date.created="#{@md.date_created}"\n} +        @date_created=%{<meta name="dc.date.created" content="#{@md.date_created}" #{@md.date_created_scheme} />\n}        end -      if @md.dc_date_issued                                                      # DublinCore 7 - date.issued year-mm-dd -        @rdf_date_issued=%{    dc.date.issued="#{@md.dc_date_issued}"\n} -        @dc_date_issued=%{<meta name="dc.date.issued" content="#{@md.dc_date_issued}" #{@md.date_issued_scheme} />\n} +      if @md.date_issued                                                      # DublinCore 7 - date.issued year-mm-dd +        @rdf_date_issued=%{    dc.date.issued="#{@md.date_issued}"\n} +        @date_issued=%{<meta name="dc.date.issued" content="#{@md.date_issued}" #{@md.date_issued_scheme} />\n}        end -      if @md.dc_date_available                                                   # DublinCore 7 - date.available year-mm-dd -        @rdf_date_available=%{    dc.date.available="#{@md.dc_date_available}"\n} -        @dc_date_available=%{<meta name="dc.date.available" content="#{@md.dc_date_available}" #{@md.date_available_scheme} />\n} +      if @md.date_available                                                   # DublinCore 7 - date.available year-mm-dd +        @rdf_date_available=%{    dc.date.available="#{@md.date_available}"\n} +        @date_available=%{<meta name="dc.date.available" content="#{@md.date_available}" #{@md.date_available_scheme} />\n}        end -      if @md.dc_date_valid                                                       # DublinCore 7 - date.valid year-mm-dd -        @rdf_date_valid=%{    dc.date.valid="#{@md.dc_date_valid}"\n} -        @dc_date_valid=%{<meta name="dc.date.valid" content="#{@md.dc_date_valid}" #{@md.date_valid_scheme} />\n} +      if @md.date_valid                                                       # DublinCore 7 - date.valid year-mm-dd +        @rdf_date_valid=%{    dc.date.valid="#{@md.date_valid}"\n} +        @date_valid=%{<meta name="dc.date.valid" content="#{@md.date_valid}" #{@md.date_valid_scheme} />\n}        end -      if @md.dc_date_modified                                                    # DublinCore 7 - date.modified year-mm-dd -        @rdf_date_modified=%{    dc.date.modified="#{@md.dc_date_modified}"\n} -        @dc_date_modified=%{<meta name="dc.date.modified" content="#{@md.dc_date_modified}" #{@md.date_modified_scheme} />\n} +      if @md.date_modified                                                    # DublinCore 7 - date.modified year-mm-dd +        @rdf_date_modified=%{    dc.date.modified="#{@md.date_modified}"\n} +        @date_modified=%{<meta name="dc.date.modified" content="#{@md.date_modified}" #{@md.date_modified_scheme} />\n}        end -      if @md.dc_type                                                             # DublinCore 8 - type (genre eg. report, convention etc) -        @rdf_type=%{    dc.type="#{@md.dc_type}"\n} -        @dc_type=%{<meta name="dc.type" content="#{@md.dc_type}" />\n} +      if @md.type                                                             # DublinCore 8 - type (genre eg. report, convention etc) +        @rdf_type=%{    dc.type="#{@md.type}"\n} +        @type=%{<meta name="dc.type" content="#{@md.type}" />\n}        end -      if @md.dc_format                                                           # DublinCore 9 - format (use your mime type) -        @rdf_format=%{    dc.format="#{@md.dc_format}"\n} -        @dc_format=%{<meta name="dc.format" content="#{@md.dc_format}" />\n} +      if @md.format                                                           # DublinCore 9 - format (use your mime type) +        @rdf_format=%{    dc.format="#{@md.format}"\n} +        @format=%{<meta name="dc.format" content="#{@md.format}" />\n}        end -      if @md.dc_identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) -        @rdf_identifier=%{    dc.identifier="#{@md.dc_identifier}"\n} -        @dc_identifier=%{<meta name="dc.identifier" content="#{@md.dc_identifier}" />\n} +      if @md.identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) +        @rdf_identifier=%{    dc.identifier="#{@md.identifier}"\n} +        @identifier=%{<meta name="dc.identifier" content="#{@md.identifier}" />\n}        end -      if @md.dc_source                                                           # DublinCore 11 - source (document source) -        @rdf_source=%{    dc.source="#{@md.dc_source}"\n} -        @dc_source=%{<meta name="dc.source" content="#{@md.dc_source}" />\n} +      if @md.source                                                           # DublinCore 11 - source (document source) +        @rdf_source=%{    dc.source="#{@md.source}"\n} +        @source=%{<meta name="dc.source" content="#{@md.source}" />\n}        end -      if @md.dc_language[:name]                                                  # DublinCore 12 - language (English) -        @rdf_language=%{    dc.language="#{@md.dc_language[:name]}"\n} -        @dc_language=%{<meta name="dc.language" content="#{@md.dc_language[:name]}" />\n} +      if @md.language[:name]                                                  # DublinCore 12 - language (English) +        @rdf_language=%{    dc.language="#{@md.language[:name]}"\n} +        @language=%{<meta name="dc.language" content="#{@md.language[:name]}" />\n}        end        if @md.language_original[:name]                                                  # DublinCore 12 - language (English)          @rdf_language_original=%{    dc.language="#{@md.language_original[:name]}"\n}          @language_original=%{<meta name="dc.language" content="#{@md.language_original[:name]}" />\n}        end -      if @md.dc_relation                                                         # DublinCore 13 - relation -        @rdf_relation=%{    dc.relation="#{@md.dc_relation}"\n} -        @dc_relation=%{<meta name="dc.relation" content="#{@md.dc_relation}" />\n} +      if @md.relation                                                         # DublinCore 13 - relation +        @rdf_relation=%{    dc.relation="#{@md.relation}"\n} +        @relation=%{<meta name="dc.relation" content="#{@md.relation}" />\n}        end -      if @md.dc_coverage                                                         # DublinCore 14 - coverage -        @rdf_coverage=%{    dc.coverage="#{@md.dc_coverage}"\n} -        @dc_coverage=%{<meta name="dc.coverage" content="#{@md.dc_coverage}" />\n} +      if @md.coverage                                                         # DublinCore 14 - coverage +        @rdf_coverage=%{    dc.coverage="#{@md.coverage}"\n} +        @coverage=%{<meta name="dc.coverage" content="#{@md.coverage}" />\n}        end -      if @md.dc_rights                                                           # DublinCore 15 - rights -        @rdf_rights=%{    dc.rights="#{@md.dc_rights}"\n} -        @dc_rights=%{<meta name="dc.rights" content="#{@md.dc_rights}" />\n} +      if @md.rights                                                           # DublinCore 15 - rights +        @rdf_rights=%{    dc.rights="#{@md.rights}"\n} +        @rights=%{<meta name="dc.rights" content="#{@md.rights}" />\n}        end -      @copyright=%{<meta name="copyright" content="#{@md.dc_rights}" />\n} if @md.rights # possibly redundant see dc.rights +      @copyright=%{<meta name="copyright" content="#{@md.rights}" />\n} if @md.rights # possibly redundant see dc.rights        @owner=%{<meta name="owner" content="#{@md.owner}" />\n} if @md.owner        @keywords=%{<meta name="keywords" content="#{@md.keywords}" />\n} if @md.keywords        @vz=SiSU_Env::Get_init.instance.skin #margin,paragraph,table,banner,url,png,txt,color,font,nav_txt,nav_png,credits,js,php @@ -206,7 +206,7 @@ module SiSU_XML_format        #<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"        #         xmlns:dc="http://purl.org/dc/elements/1.1/">        #  <rdf:Description rdf:about="http://www.jus.uio.no/lm/doc" -      #      dc:creator="Author" +      #      dc:author="Author"        #      dc:title="Title"        #      dc:description="Description if any"        #      dc:date="Publication Date" @@ -223,7 +223,7 @@ module SiSU_XML_format  #@rdfurl  #@rdf_title  #@rdf_subtitle -#@rdf_creator +#@rdf_author  #@rdf_subject  #@rdf_description  #@rdf_publisher @@ -244,26 +244,26 @@ module SiSU_XML_format  #@rdf_rights    />  </rdf:RDF> -#@dc_title -#@dc_creator -#@dc_subject -#@dc_description -#@dc_publisher -#@dc_contributor -#@dc_date -#@dc_date_created -#@dc_date_issued -#@dc_date_available -#@dc_date_valid -#@dc_date_modified -#@dc_type -#@dc_format -#@dc_identifier -#@dc_source -#@dc_language -#@dc_relation -#@dc_coverage -#@dc_rights +#@full_title +#@author +#@subject +#@description +#@publisher +#@contributor +#@date +#@date_created +#@date_issued +#@date_available +#@date_valid +#@date_modified +#@type +#@format +#@identifier +#@source +#@language +#@relation +#@coverage +#@rights  #@copyright  #@owner  #{@png.ico} diff --git a/lib/sisu/v0/xml_md_oai_pmh_dc.rb b/lib/sisu/v0/xml_md_oai_pmh_dc.rb index 7c89ee07..527c6c78 100644 --- a/lib/sisu/v0/xml_md_oai_pmh_dc.rb +++ b/lib/sisu/v0/xml_md_oai_pmh_dc.rb @@ -82,80 +82,80 @@ module SiSU_XML_metadata  WOK      end      def body -      if @md.dc_title                                                            # DublinCore 1 - title -        @oai_pmh << %{  <dc:title xml:lang="en">#{@md.dc_title}</dc:title>\n} -        #@oai_pmh << %{  <dc:title xml:lang="en">#{seg_name}#{@md.dc_title}</dc:title>\n} +      if @md.full_title                                                            # DublinCore 1 - title +        @oai_pmh << %{  <dc:title xml:lang="en">#{@md.full_title}</dc:title>\n} +        #@oai_pmh << %{  <dc:title xml:lang="en">#{seg_name}#{@md.title}</dc:title>\n}        end -      if @md.dc_creator                                                          # DublinCore 2 - creator/author (author) -        txt=meta_content_clean(@md.dc_creator) -        @oai_pmh << %{  <dc:creator>#{txt}</dc:creator>\n} +      if @md.author                                                          # DublinCore 2 - author/creator (author) +        txt=meta_content_clean(@md.author) +        @oai_pmh << %{  <dc:author>#{txt}</dc:author>\n}        end -      if @md.dc_subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) -        txt=meta_content_clean(@md.dc_subject) +      if @md.subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) +        txt=meta_content_clean(@md.subject)          @oai_pmh << %{  <dc:subject>#{txt}</dc:subject>\n}        end -      if @md.dc_description                                                      # DublinCore 4 - description -        txt=meta_content_clean(@md.dc_description) +      if @md.description                                                      # DublinCore 4 - description +        txt=meta_content_clean(@md.description)          @oai_pmh << %{  <dc:description>#{txt}</dc:description>\n}        end -      if @md.dc_publisher                                                        # DublinCore 5 - publisher (current copy published by) -        txt=meta_content_clean(@md.dc_publisher) +      if @md.publisher                                                        # DublinCore 5 - publisher (current copy published by) +        txt=meta_content_clean(@md.publisher)          @oai_pmh << %{  <dc:publisher>#{txt}</dc:publisher>\n}        end -      if @md.dc_contributor                                                      # DublinCore 6 - contributor -        txt=meta_content_clean(@md.dc_contributor) +      if @md.contributor                                                      # DublinCore 6 - contributor +        txt=meta_content_clean(@md.contributor)          @oai_pmh << %{  <dc:contributor>#{txt}</dc:contributor>\n}        end -      if @md.dc_date                                                             # DublinCore 7 - date year-mm-dd -        @oai_pmh << %{  <dc:date>#{@md.dc_date}</dc:date>\n} +      if @md.date                                                             # DublinCore 7 - date year-mm-dd +        @oai_pmh << %{  <dc:date>#{@md.date}</dc:date>\n}        end -      if @md.dc_date_created                                                     # DublinCore 7 - date.created -        @oai_pmh << %{  <dc:date_created>#{@md.dc_date_created}</dc:date_created>\n} +      if @md.date_created                                                     # DublinCore 7 - date.created +        @oai_pmh << %{  <dc:date_created>#{@md.date_created}</dc:date_created>\n}        end -      if @md.dc_date_issued                                                      # DublinCore 7 - date.issued -        @oai_pmh << %{  <dc:date_issued>#{@md.dc_date_issued}</dc:date_issued>\n} +      if @md.date_issued                                                      # DublinCore 7 - date.issued +        @oai_pmh << %{  <dc:date_issued>#{@md.date_issued}</dc:date_issued>\n}        end -      if @md.dc_date_available                                                   # DublinCore 7 - date.available -        @oai_pmh << %{  <dc:date_available>#{@md.dc_date_available}</dc:date_available>\n} +      if @md.date_available                                                   # DublinCore 7 - date.available +        @oai_pmh << %{  <dc:date_available>#{@md.date_available}</dc:date_available>\n}        end -      if @md.dc_date_valid                                                       # DublinCore 7 - date.valid -        @oai_pmh << %{  <dc:date_valid>#{@md.dc_date_valid}</dc:date_valid>\n} +      if @md.date_valid                                                       # DublinCore 7 - date.valid +        @oai_pmh << %{  <dc:date_valid>#{@md.date_valid}</dc:date_valid>\n}        end -      if @md.dc_date_modified                                                    # DublinCore 7 - date.modified -        @oai_pmh <<  %{  <dc:date_modified>#{@md.dc_date_modified}</dc:date_modified>\n} +      if @md.date_modified                                                    # DublinCore 7 - date.modified +        @oai_pmh <<  %{  <dc:date_modified>#{@md.date_modified}</dc:date_modified>\n}        end -      if @md.dc_type                                                             # DublinCore 8 - type -        txt=meta_content_clean(@md.dc_type) +      if @md.type                                                             # DublinCore 8 - type +        txt=meta_content_clean(@md.type)          @oai_pmh << %{  <dc:type>#{txt}</dc:type>\n}        end -      if @md.dc_format                                                           # DublinCore 9 - format -        txt=meta_content_clean(@md.dc_format) +      if @md.format                                                           # DublinCore 9 - format +        txt=meta_content_clean(@md.format)          @oai_pmh << %{  <dc:format>#{txt}</dc:format>\n}        end -      if @md.dc_identifier                                                       # DublinCore 10 - identifier -        txt=meta_content_clean(@md.dc_identifier) +      if @md.identifier                                                       # DublinCore 10 - identifier +        txt=meta_content_clean(@md.identifier)          @oai_pmh << %{  <dc:identifier>#{txt}</dc:identifier>\n}        end -      if @md.dc_source                                                           # DublinCore 11 - source -        txt=meta_content_clean(@md.dc_source) +      if @md.source                                                           # DublinCore 11 - source +        txt=meta_content_clean(@md.source)          @oai_pmh << %{  <dc:source>#{txt}</dc:source>\n}        end -      if @md.dc_language[:name]                                                  # DublinCore 12 - language (English) -        @oai_pmh << %{  <dc:language>#{@md.dc_language[:name]}</dc:language>\n} +      if @md.language[:name]                                                  # DublinCore 12 - language (English) +        @oai_pmh << %{  <dc:language>#{@md.language[:name]}</dc:language>\n}        end        if @md.language_original[:name]          @oai_pmh << %{  <dc:language>#{@md.language_original[:name]}</dc:language>\n}        end -      if @md.dc_relation                                                         # DublinCore 13 - relation -        txt=meta_content_clean(@md.dc_relation) +      if @md.relation                                                         # DublinCore 13 - relation +        txt=meta_content_clean(@md.relation)          @oai_pmh << %{  <dc:relation>#{txt}</dc:relation>\n}        end -      if @md.dc_coverage                                                         # DublinCore 14 - coverage -        txt=meta_content_clean(@md.dc_coverage) +      if @md.coverage                                                         # DublinCore 14 - coverage +        txt=meta_content_clean(@md.coverage)          @oai_pmh << %{  <dc:coverage>#{txt}</dc:coverage>\n}        end -      if @md.dc_rights                                                           # DublinCore 15 - rights -        txt=meta_content_clean(@md.dc_rights) +      if @md.rights                                                           # DublinCore 15 - rights +        txt=meta_content_clean(@md.rights)          @oai_pmh << %{  <dc:rights>#{txt}</dc:rights>\n}        end        if @md.keywords @@ -200,7 +200,7 @@ see also http://dublincore.org/documents/dcmes-xml/      xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/      http://www.openarchives.org/OAI/2.0/oai_dc.xsd">    <dc:title xml:lang="en">Grassmann's space analysis</dc:title> -  <dc:creator>Hyde, E. W. (Edward Wyllys)</dc:creator> +  <dc:author>Hyde, E. W. (Edward Wyllys)</dc:author>    <dc:subject>LCSH:Ausdehnungslehre; LCCN QA205.H99</dc:subject>    <dc:publisher>J. Wiley & Sons</dc:publisher>    <dc:date>Created: 1906; Available: 1991</dc:date> | 
