Commit a35d5ecd authored by PTSEFTON's avatar PTSEFTON
Browse files

Added usage and proper argument handling

parent 17102cc8
......@@ -24,21 +24,34 @@ At this stage Calcyte does not Bag content, it jsut creates *Working DataCrates*
git clone https://code.research.uts.edu.au/eresearch/CalcyteJS.git
- Link the binary for development use:
npm link
npm link
## Usage / instructions
This version Calcyte doesn't have any options or proper argument handling or help.
Usage:
```
> calcyfy --help
Usage: calcyfy [options] <directories...>
Options:
-h, --help output usage information
```
To run Calcyte on a group of directories pass it a list of directories
One:
One directory:
```
calcyte test_data/sample
```
More:
All the sample directories:
```
calcyte test_data/*
......
#!/usr/bin/env node
const Collection = require("./collection.js");
const args = require('minimist')(process.argv.slice(2));
const shell = require('shelljs')
const program = require('commander');
var dirs = args._
var dirs;
program
.arguments('<directories...>')
.action(function(directories) {
console.log(directories);
dirs = directories;
})
.parse(process.argv);
console.log(dirs);
console.log(args.b);
dirs.forEach(function(dir) {
......
......@@ -73,7 +73,7 @@
"name": "EPL1 Camera"
},
{
"@id": "e36c39ef-cc40-4489-a2a6-3aff855a2434",
"@id": "c16af678-e3d0-47f2-93ca-d9fcd6581613",
"@type": "GeoCoordinates",
"latitude": "-33.7152",
"longitude": "150.30119"
......@@ -163,7 +163,7 @@
"@type": "Place",
"description": "Catalina Park is a disused motor racing venue, located at Katoomba, in the Blue Mountains, New South Wales, Australia, and is recognised as an Aboriginal Place due to the long association of the local Gundungarra and Darug clans to the area.",
"geo": {
"@id": "e36c39ef-cc40-4489-a2a6-3aff855a2434"
"@id": "c16af678-e3d0-47f2-93ca-d9fcd6581613"
},
"identifier": "http://www.geonames.org/8152662/catalina-park.html",
"name": "Catalina Park"
......
......@@ -143,8 +143,8 @@ A machine-readable version of this page is available:
<th>Latitude</th>
<th>Longitude</th>
</tr>
<tr id="e36c39ef-cc40-4489-a2a6-3aff855a2434">
<td>e36c39ef-cc40-4489-a2a6-3aff855a2434</td>
<tr id="c16af678-e3d0-47f2-93ca-d9fcd6581613">
<td>c16af678-e3d0-47f2-93ca-d9fcd6581613</td>
<td>-33.7152</td>
<td>150.30119</td>
</tr>
......@@ -202,10 +202,10 @@ A machine-readable version of this page is available:
<td>http://www.geonames.org/8152662/catalina-park.html</td>
<td>Catalina Park is a disused motor racing venue, located at Katoomba, in the Blue Mountains, New South Wales, Australia, and is recognised as an Aboriginal Place due to the long association of the local Gundungarra and Darug clans to the area.</td>
<td>
<table id="e36c39ef-cc40-4489-a2a6-3aff855a2434">
<table id="c16af678-e3d0-47f2-93ca-d9fcd6581613">
<tr>
<th>@id</th>
<td>e36c39ef-cc40-4489-a2a6-3aff855a2434</td>
<td>c16af678-e3d0-47f2-93ca-d9fcd6581613</td>
</tr>
<tr>
<th>@type</th>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment