ttl2html 0.2.3 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/xlsx2shape +2 -1
- data/lib/ttl2html.rb +3 -1
- data/lib/ttl2html/template.rb +1 -1
- data/lib/ttl2html/version.rb +1 -1
- data/lib/xlsx2shape.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f3895e8f7c7544e6ef6bcb0cf966787d51a49de0db77a6a0a0b72a70a54b9cb
|
4
|
+
data.tar.gz: 7f33f34c40179683953a920a516712051c7a2e3078c4220cdbf21e7df14dbdbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86c6e71196827df531740ecb603889b99bbc44118ed106e4831472ccde702f162648cdcafd3eb43d19ebb9cf9dd6c3ec379cb68b55d78eca585d17fbe605ebe7
|
7
|
+
data.tar.gz: a708b14927d1a8332aa48004f7f61f8ba379623556d3348e356f9dd72c0c8641b9e14f7ccf33c29be51f121d8c300da0e7cce780585ed0fd9a15d75de4b66fc6
|
data/bin/xlsx2shape
CHANGED
data/lib/ttl2html.rb
CHANGED
@@ -126,6 +126,8 @@ module TTL2HTML
|
|
126
126
|
param[:title] = template.get_title(v)
|
127
127
|
if @data.keys.find{|e| e.start_with?(uri + "/") }
|
128
128
|
file = uri + "/index.html"
|
129
|
+
elsif uri.end_with?("/")
|
130
|
+
file = uri + "index.html"
|
129
131
|
else
|
130
132
|
file = uri + ".html"
|
131
133
|
end
|
@@ -150,7 +152,7 @@ module TTL2HTML
|
|
150
152
|
template = Template.new("index.html.erb", @config)
|
151
153
|
param = @config.dup
|
152
154
|
param[:data_global] = @data
|
153
|
-
subjects.each do |subject|
|
155
|
+
subjects.sort.each do |subject|
|
154
156
|
param[:index_data] ||= []
|
155
157
|
param[:index_data] << subject.to_s
|
156
158
|
end
|
data/lib/ttl2html/template.rb
CHANGED
@@ -128,7 +128,7 @@ module TTL2HTML
|
|
128
128
|
return get_language_literal(data[@param[:title_property]])
|
129
129
|
end
|
130
130
|
%w(
|
131
|
-
|
131
|
+
http://www.w3.org/2000/01/rdf-schema#label
|
132
132
|
http://purl.org/dc/terms/title
|
133
133
|
http://purl.org/dc/elements/1.1/title
|
134
134
|
http://schema.org/name
|
data/lib/ttl2html/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
TTL2HTML::VERSION = "0.2.
|
1
|
+
TTL2HTML::VERSION = "0.2.8"
|
data/lib/xlsx2shape.rb
CHANGED
@@ -5,12 +5,12 @@ require "roo"
|
|
5
5
|
module XLSX2Shape
|
6
6
|
def xlsx2shape(filename)
|
7
7
|
shapes = {}
|
8
|
-
prefix = {
|
8
|
+
prefix = { sh: "http://www.w3.org/ns/shacl#" }
|
9
9
|
xlsx = Roo::Excelx.new(filename)
|
10
10
|
xlsx.each_with_pagename do |name, sheet|
|
11
11
|
if name =~ /\Aprefix\z/i
|
12
12
|
sheet.each do |row|
|
13
|
-
prefix[row[0]] = row[1] if not row[1].empty?
|
13
|
+
prefix[row[0].to_s.intern] = row[1] if not row[1].empty?
|
14
14
|
end
|
15
15
|
else
|
16
16
|
headers = sheet.row(1)
|
@@ -59,8 +59,8 @@ module XLSX2Shape
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
result = ""
|
62
|
-
prefix.
|
63
|
-
result << "@prefix #{prefix} <#{val}>.\n"
|
62
|
+
prefix.sort_by{|k,v| [k,v] }.each do |prefix, val|
|
63
|
+
result << "@prefix #{prefix}: <#{val}>.\n"
|
64
64
|
end
|
65
65
|
shapes.sort_by{|uri, val| uri }.each do |uri, val|
|
66
66
|
result << "\n"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttl2html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masao Takaku
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|