README.md 3.4 KB
Newer Older
PTSEFTON's avatar
PTSEFTON committed
1
# CalcyteJS - DEPRECATED --- DO NOT USE IT
PTSEFTON's avatar
PTSEFTON committed
2

PTSEFTON's avatar
PTSEFTON committed
3
4
5
THIS CODE IS DEPRECATED - DO NOT USE IT

This  WAS a work-in-progress port of the python-based [Calcyte tool](https://codeine.research.uts.edu.au/eresearch/calcyte).
PTSEFTON's avatar
PTSEFTON committed
6
7
8

## Status

9
This is Alpha code.
PTSEFTON's avatar
PTSEFTON committed
10
11
12

## About

13
Calcyte is a toolkit to implement the [RO-Crate] specification:
PTSEFTON's avatar
PTSEFTON committed
14
15


16
1.  Generating HTML from RO-Crate `ro-crate-metadata.jsonld` files.
PTSEFTON's avatar
PTSEFTON committed
17
2.  Managing metadata for collections of content via automatically generated
18
    spreadsheets (CATALOG.xlsx), to create `ro-crate-metadata.jsonld` files
PTSEFTON's avatar
PTSEFTON committed
19
20
3.  Packaging data in BagIt format, and optionally zipping it.

PTSEFTON's avatar
PTSEFTON committed
21
This version of Calcyte targets the [R0-Crate Spec, v1.0](https://researchobject.github.io/ro-crate/1.0/).
PTSEFTON's avatar
PTSEFTON committed
22
23
24

## Installation

PTSEFTON's avatar
PTSEFTON committed
25
26
27
NOTE: These instructions are for MacOs - adapt as necessary.

NOTE: Bagit is no longer required!
PTSEFTON's avatar
PTSEFTON committed
28

PTSEFTON's avatar
PTSEFTON committed
29
- Install [node.js](https://nodejs.org/en/)
PTSEFTON's avatar
PTSEFTON committed
30
31
32
33

- Install Siegfreid using the [instructions](https://github.com/richardlehane/siegfried/wiki/Getting-started).

- Get the code:
34
35
36
 
  git clone --single-branch --branch <branchname> https://code.research.uts.edu.au/eresearch/CalcyteJS.git

PTSEFTON's avatar
PTSEFTON committed
37
38
39
40
41

- Link the binary for development use:

  npm link

PTSEFTON's avatar
PTSEFTON committed
42
43
44



PTSEFTON's avatar
PTSEFTON committed
45
46
## Usage / instructions

47
48
49



PTSEFTON's avatar
PTSEFTON committed
50
51
### Usage

PTSEFTON's avatar
PTSEFTON committed
52
Calcyfy creates RO-Crates with an HTML entry-point in ro-crate-preview.html file.
53

PTSEFTON's avatar
PTSEFTON committed
54
55
56
Usage:

```
PTSEFTON's avatar
PTSEFTON committed
57
58
>  ./calcyfy
   Usage: calcyfy [options] <directories...>
PTSEFTON's avatar
PTSEFTON committed
59

PTSEFTON's avatar
PTSEFTON committed
60
  Generates [RO-Crate] HTML for ro-crate-metadata.jsonld files. Pass a list of directories. To create Spreadsheet files for entering metadata use -d or -r.
PTSEFTON's avatar
PTSEFTON committed
61
62
63
64


  Options:

PTSEFTON's avatar
PTSEFTON committed
65
66
67
68
69
70
71
72
73
    -V, --version                    output the version number
    -b,  --bag [bag-dir]             Create Bagit Bag(s) under [bag-dir])
    -n,  --no                        No Citation - only applies ith --bag
    -z,  --zip                       Create a zipped version of the bag - only applies with --bag
    -d,  --depth [depth]             Maximum depth to recurse into directories
    -r,  --recurse                   Recurse into directories looking for CATALOG_.xslx files
    -c,  --cratescript [cratesript]  URL of "crate.js" rendering script from the ro-crate-js library
    -u, --url [distro]               Distribution URL
    -h, --help                       output usage information
PTSEFTON's avatar
PTSEFTON committed
74
75
76
77
```

To run Calcyte on a group of directories pass it a list of directories

78
To generate an HTML file for an `ro-crate-metadata.jsonld` file in ./dir
79
80
81
82
83

```
calcyfy dir
```

PTSEFTON's avatar
PTSEFTON committed
84
85
86
One directory:

```
87
88

calcyfy -r test_data/sample/ 
PTSEFTON's avatar
PTSEFTON committed
89
calcyfy test_data/Glop_Pot -r -c https://data.research.uts.edu.au/examples/ro-crate/examples/src/crate.js
PTSEFTON's avatar
PTSEFTON committed
90
91
92
93
```

This will:
- Traverse the entire Glop_Pot directory, and generate or update CATALOG_name.xlsx files.
94
- Create or update the `test_data/Glop_Pot/`ro-crate-metadata.jsonld`` file
PTSEFTON's avatar
PTSEFTON committed
95
- Create a *[RO-Crate] Website* with entry-point `test_data/Glop_Pot/ro-crate-metadata.html`
PTSEFTON's avatar
PTSEFTON committed
96
97
98
99

All the sample directories:

```
PTSEFTON's avatar
PTSEFTON committed
100
calcyfy -r test_data/* -c https://data.research.uts.edu.au/examples/ro-crate/examples/src/crate.js
PTSEFTON's avatar
PTSEFTON committed
101
102
103
104
105
106
107
```

Calcyte will generate:

- a CATALOG\_$dir.xlsx file in each directory (this is for humans to fill in with
  metadata about the data)

108
- An `ro-crate-preview.html` file summarizing the data using metadata from CATALOG\_$dir.xlsx
PTSEFTON's avatar
PTSEFTON committed
109

110
- An `ro-crate-metadata.jsonld` file containing JSON-LD metadata derived from the CATALOG\* files plus some basic file-format information.
PTSEFTON's avatar
PTSEFTON committed
111
112
113
114
115

See the examples in `test_data`.

TODO: Instructions for filling in the CATALOG files.

116
[RO-Crate]: https://github.com/UTS-eResearch/RO-Crate