}
@sisu << %{#{y['title']} } if y['title']
@sisu << %{#{y['subtitle']} } if y['subtitle']
@sisu << %{#{y['creator'] }} if y['creator']
#@sisu << %{#{y['subject']}} if y['subject']
@sisu << %{#{y['description'] }} if y['description']
#@sisu << %{#{y['publisher']}} if y['publisher']
#@sisu << %{#{y['contributor']}} if y['contributor']
@sisu << %{#{y['date']} } if y['date']
#@sisu << %{#{y['date_created']}} if y['date_created']
#@sisu << %{#{y['date_issued']}} if y['date_issued']
#@sisu << %{#{y['date_available']}} if y['date_available']
#@sisu << %{#{y['date_valid']}} if y['date_valid']
#@sisu << %{#{y['date_modified']}} if y['date_modified']
#@sisu << %{#{y['type']}} if y['type']
#@sisu << %{#{y['format']}} if y['format']
#@sisu << %{#{y['identifier']}} if y['identifier']
#@sisu << %{#{y['source']}} if y['source']
#@sisu << %{#{y['language']}} if y['language']
#@sisu << %{#{y['coverage']}} if y['coverage']
#@sisu << %{#{y['relation']}} if y['relation']
#@sisu << %{#{y['rights']}} if y['rights']
#@sisu << %{#{y['copyright']}} if y['copyright']
#@sisu << %{#{y['keyword']}} if y['keyword']
@sisu << %{}
@sisu << %{}
end
end
@sisu << %{\n}
#@sisu.each {|para| @@rss.puts para} #KEEP does all
if "united nations"[match]
@sisu.each {|para| @@rss_un.puts para}
@sisu=[]
end
if "unidroit"[match]
@sisu.each {|para| @@rss_unidroit.puts para}
@sisu=[]
end
if "hcpil"[match]
@sisu.each {|para| @@rss_hcpil.puts para}
@sisu=[]
end
if "contract"[match]
@sisu.each {|para| @@rss_contracts.puts para}
@sisu=[]
end
if "navigate"[match]
@sisu.each {|para| @@rss_nav.puts para}
@sisu=[]
end
end
def rss_un
match=/united\s+nations|uncitral/i
rss(match, 'Lex Mercatoria Pages on the United Nations')
end
def rss_unidroit
match=/unidroit/i
rss(match, 'Lex Mercatoria pages on UNIDROIT')
end
def rss_hcpil
match=/hague\s+conference|hcpil/i
rss(match, 'Lex Mercatoria pages on the Hague Conference on Private International Law')
end
def rss_contracts
match=/contracts?/i
rss(match, 'Lex Mercatoria Contract Law pages')
end
def rss_nav
match=/navigate(\s|$)/i
rss(match, 'Lex Mercatoria Navigation pages')
end
def dummy
@sisu << %{}
@yaml.each do |y|
@sisu << %{}
@sisu << %{#{y['title']}} if y['title']
@sisu << %{#{y['subtitle']}} if y['subtitle']
@sisu << %{#{y['creator']}} if y['creator']
@sisu << %{#{y['subject']}} if y['subject']
@sisu << %{#{y['description']}} if y['description']
@sisu << %{#{y['publisher']}} if y['publisher']
@sisu << %{#{y['contributor']}} if y['contributor']
@sisu << %{#{y['date']}} if y['date']
@sisu << %{#{y['date_created']}} if y['date_created']
@sisu << %{#{y['date_issued']}} if y['date_issued']
@sisu << %{#{y['date_available']}} if y['date_available']
@sisu << %{#{y['date_valid']}} if y['date_valid']
@sisu << %{#{y['date_modified']}} if y['date_modified']
@sisu << %{#{y['type']}} if y['type']
@sisu << %{#{y['format']}} if y['format']
@sisu << %{#{y['identifier']}} if y['identifier']
@sisu << %{#{y['source']}} if y['source']
@sisu << %{#{y['language']}} if y['language']
@sisu << %{#{y['coverage']}} if y['coverage']
@sisu << %{#{y['relation']}} if y['relation']
@sisu << %{#{y['rights']}} if y['rights']
@sisu << %{#{y['copyright']}} if y['copyright']
@sisu << %{#{y['keyword']}} if y['keyword']
@sisu << %{}
end
@sisu << %{}
@sisu.each {|para| @@rss.puts para}
end
def debris
outputdir=SiSU_Env::Info_env.new.path.feed
x=Dir.new(outputdir).entries
x.each do |y|
#unless FileTest.file?("#{outputdir}/#{y}") and File.size?("#{outputdir}/#{y}") == 0
if File.size("#{outputdir}/#{y}") == 0
#File.unlink("#{outputdir}/#{y}")
puts "#{outputdir}/#{y}"
puts File.size("#{outputdir}/#{y}")
end
end
end
end
class RDF < Yaml_info_read
def songsheet
loadfile
rdf
rdf_un
rdf_unidroit
rdf_hcpil
rdf_contracts
rdf_nav
debris
end
def rdf
end
def rdf_un
end
def rdf_unidroit
end
def rdf_hcpil
end
def rdf_contracts
end
def rdf_nav
end
def debris
end
end
end
#% start
require "#{SiSU_lib}/param"
require "#{SiSU_lib}/defaults"
require "#{SiSU_lib}/sysenv"
include SiSU_Param
include SiSU_Env
include SiSU_Viz
outputdir=SiSU_Env::Info_env.new.path.feed
pwd=Dir.pwd
@argv=[]
argv=$*
p argv
my_make=SiSU_Env::Create_file.new('','')
if argv.to_s =~/yaml/
my_make.file_semantic
files=Dir["*.sst,*._sst,*-sst"]
end
files.each {|f| @argv << f[/(.+?)\.[_-]?sst$/,1] if f =~/.+?\.[_-]?sst$/}
#########
files.each do |filename|
Semantic::YamlInfoCreate.new(filename).songsheet
end
elsif argv.to_s =~/rss/
#rss=%{#{outputdir}/semantic.xml}
#@@rss=File.new(rss, "w+")
rss_nav=%{#{outputdir}/navigate.xml}
@@rss_nav=File.new(rss_nav, "w+")
#
#rss_un=%{#{outputdir}/un.xml}
#@@rss_un=File.new(rss_un, "w+")
#rss_unidroit=%{#{outputdir}/unidroit.xml}
#@@rss_unidroit=File.new(rss_unidroit, "w+")
#rss_hcpil=%{#{outputdir}/hcpil.xml}
#@@rss_hcpil=File.new(rss_hcpil, "w+")
#rss_contracts=%{#{outputdir}/contracts.xml}
#@@rss_contracts=File.new(rss_contracts, "w+")
##my_make.file_rss
Semantic::RSS.new.songsheet
elsif argv.to_s =~/rdf/
#rdf=%{#{outputdir}/semantic.rdf}
#@@rdf=File.new(rdf, "w+")
#rdf_un=%{#{outputdir}/un.rdf}
#@@rdf_un=File.new(rdf_un, "w+")
#rdf_unidroit=%{#{outputdir}/unidroit.rdf}
#@@rdf_unidroit=File.new(rdf_unidroit, "w+")
#rdf_hcpil=%{#{outputdir}/hcpil.rdf}
#@@rdf_hcpil=File.new(rdf_hcpil, "w+")
#rdf_contracts=%{#{outputdir}/contracts.rdf}
#@@rdf_contracts=File.new(rdf_contracts, "w+")
#rdf_nav=%{#{outputdir}/navigate.rdf}
#@@rdf_nav=File.new(rdf_nav, "w+")
##my_make.file_rdf
#Semantic::RDF.new.songsheet
end
__END__