Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
eResearch
CalcyteJS
Commits
8d1b7740
Commit
8d1b7740
authored
Sep 02, 2019
by
PTSEFTON
Browse files
Updating for new ro-crate
parent
8d574a2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
defaults/CATALOG.xlsx
View file @
8d1b7740
No preview for this file type
lib/property.js
View file @
8d1b7740
...
...
@@ -57,6 +57,9 @@ module.exports = function() {
parse
:
function
parse
(
name
,
data
=
""
,
links_to
=
null
)
{
this
.
data
=
data
;
if
(
Array
.
isArray
(
data
))
{
data
=
data
[
0
];
}
this
.
links_to
=
links_to
;
this
.
is_relational
=
this
.
links_to
?
true
:
false
;
this
.
is_repeating
=
false
;
...
...
@@ -104,13 +107,11 @@ module.exports = function() {
//console.log("Nesting, this is the name", this.name)
var
nested_type
=
nest
[
2
];
var
nested_json
=
{
"
TYPE:
"
:
nested_type
};
var
parts
=
data
.
replace
(
/ *, +/
,
"
,
"
).
split
(
"
,
"
);
//console.log(parts)
for
(
var
i
=
0
;
i
<
parts
.
length
;
i
++
)
{
var
part
=
parts
[
i
];
var
pair
=
part
.
match
(
/
(
.*
?)
*: *
(
.*
)
/
);
nested_json
[
lowercase_first
(
pair
[
1
]).
trim
()]
=
pair
[
2
].
trim
();
}
if
(
!
nested_json
[
"
name
"
])
{
...
...
package.json
View file @
8d1b7740
...
...
@@ -31,7 +31,7 @@
"
json
"
:
"
^9.0.6
"
,
"
jsonld
"
:
"
^1.6.2
"
,
"
node-json2html
"
:
"
^1.1.1
"
,
"
ro-crate
"
:
"
^1.2.
7
"
,
"
ro-crate
"
:
"
^1.2.
11
"
,
"
sha1
"
:
"
^1.1.1
"
,
"
shelljs
"
:
"
^0.8.1
"
,
"
tmp
"
:
"
0.0.33
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment