Skip to content

Commit 3cd57c1

Browse files
committed
ititial commit
0 parents  commit 3cd57c1

File tree

5 files changed

+116
-0
lines changed

5 files changed

+116
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

LICENSE

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Copyright © 2015, Regents of the University of California
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions
7+
are met:
8+
9+
* Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
* Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in
13+
the documentation and/or other materials provided with the
14+
distribution.
15+
* Neither the name of the University of California nor the names
16+
of its contributors may be used to endorse or promote products
17+
derived from this software without specific prior written
18+
permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24+
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+
POSSIBILITY OF SUCH DAMAGE.

README

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
quick utility to upload files to Nuxeo

index.js

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
var fs = require('fs');
5+
var nuxeo = require('nuxeo');
6+
7+
var ArgumentParser = require('argparse').ArgumentParser;
8+
var parser = new ArgumentParser({
9+
version: '0.0.1',
10+
addHelp: true,
11+
description: 'nuxeo command line helper',
12+
});
13+
14+
var subparsers = parser.addSubparsers({
15+
title:'subcommands',
16+
dest:"subcommand_name"
17+
});
18+
19+
var cp = subparsers.addParser('cp', {addHelp: true});
20+
cp.addArgument(
21+
[ '-R', '-r', '--recursive' ],
22+
{
23+
action: 'storeTrue',
24+
help: 'copy directories recursively'
25+
}
26+
);
27+
cp.addArgument( [ 'source_file' ], { nargs: '+' });
28+
cp.addArgument( [ 'dest_file' ], { nargs: '1' });
29+
30+
var args = parser.parseArgs();
31+
console.dir(args);
32+
33+
/* Copyright © 2015, Regents of the University of California
34+
35+
All rights reserved.
36+
37+
Redistribution and use in source and binary forms, with or without
38+
modification, are permitted provided that the following conditions
39+
are met:
40+
41+
* Redistributions of source code must retain the above copyright
42+
notice, this list of conditions and the following disclaimer.
43+
* Redistributions in binary form must reproduce the above copyright
44+
notice, this list of conditions and the following disclaimer in
45+
the documentation and/or other materials provided with the
46+
distribution.
47+
* Neither the name of the University of California nor the names
48+
of its contributors may be used to endorse or promote products
49+
derived from this software without specific prior written
50+
permission.
51+
52+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
53+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
54+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
55+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
56+
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
57+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
58+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
59+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
60+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
62+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
63+
POSSIBILITY OF SUCH DAMAGE.
64+
65+
*/

package.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "nx",
3+
"version": "0.0.1",
4+
"description": "nuxeo command line helper",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "Regents of the University of California",
10+
"license": "BSD",
11+
"bin": {
12+
"nx": "index.js"
13+
},
14+
"dependencies": {
15+
"argparse": "^1.0.2",
16+
"nuxeo": "^0.4.2"
17+
}
18+
}

0 commit comments

Comments
 (0)