Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

add upload.md to README. Update docs for ssh keys. Update docs for optional vs required. Add npm run upload

Mike McGannc639a8262d82
diff --git a/README.md b/README.md
index 8594ef860..609a9122b 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ View the [Configuration](doc/configuration.md) section for information on how to
The following are required to install and run Worldview:
-- [Node v8.8.1 or Later](https://nodejs.org/en/download/)
+- [Node v8.8.1 or Later](https://nodejs.org/en/download/)
- **Note:** Ubuntu users may run into issues with the `node` command not being available. See [this question on StackOverflow](https://stackoverflow.com/q/18130164/417629) for possible solutions.
- [Python v2.7.14 or Later](https://www.python.org/)
- **Note:** It is recommended that Windows users install Python with [Windows Build Tools](https://www.npmjs.com/package/windows-build-tools).
@@ -83,6 +83,7 @@ To update Worldview, pull down any branch or tag from GitHub. From the `master`
* [Optional Features](doc/features.md)
* [Deployment](doc/deployment.md)
* [Using Apache (deprecated)](doc/apache_setup.md)
+* [Uploading](doc/upload.md)
## Contact
diff --git a/doc/upload.md b/doc/upload.md
index 2ed0c21a0..1436903e2 100644
--- a/doc/upload.md
+++ b/doc/upload.md
@@ -16,8 +16,18 @@ Options:
-u, --user login to remote host using this user name [string]
```
-Defaults for `host`, `key`, `root`, and `user` can be placed in a JSON
-file found at `~/.worldview/upload.config`. Example configuration:
+Files are uploaded using ssh and expect `key` to be listed in the remote's
+`authorized_keys` file.
+
+Defaults for `host`, `key`, `root`, and `user` should be placed in a JSON
+file found at `~/.worldview/upload.config`.
+
+Values on the command line override those found in the configuration file.
+
+If `host` or `root` is not found in the configuration file, it must
+appear on the command line.
+
+Example configuration:
```json
{
diff --git a/package-lock.json b/package-lock.json
index 34c15f126..88a91f58d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4302,7 +4302,8 @@
"multimatch": "^2.0.0",
"postcss": "^5.0.8",
"source-map": "^0.4.2",
- "through2": "^0.6.3"
+ "through2": "^0.6.3",
+ "yargs": "^3.5.4"
},
"dependencies": {
"browserslist": {
@@ -4315,6 +4316,35 @@
"electron-to-chromium": "^1.2.7"
}
},
+ "cliui": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wrap-ansi": "^2.0.0"
+ }
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "dev": true,
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "os-locale": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
+ "dev": true,
+ "requires": {
+ "lcid": "^1.0.0"
+ }
+ },
"postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz",
@@ -4356,6 +4386,17 @@
"amdefine": ">=0.0.4"
}
},
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
"supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
@@ -4374,6 +4415,21 @@
"readable-stream": ">=1.0.33-1 <1.1.0-0",
"xtend": ">=4.0.0 <4.1.0-0"
}
+ },
+ "yargs": {
+ "version": "3.32.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz",
+ "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^2.0.1",
+ "cliui": "^3.0.3",
+ "decamelize": "^1.1.1",
+ "os-locale": "^1.4.0",
+ "string-width": "^1.0.1",
+ "window-size": "^0.1.4",
+ "y18n": "^3.2.0"
+ }
}
}
},
@@ -18843,6 +18899,12 @@
"string-width": "^2.1.1"
}
},
+ "window-size": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
+ "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=",
+ "dev": true
+ },
"wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
diff --git a/package.json b/package.json
index 82bda4f96..a5bc4e25a 100644
--- a/package.json
+++ b/package.json
@@ -55,7 +55,8 @@
"test:end:darwin:linux": "pkill -f run-p",
"test:end:win32": "tskill node",
"updateconfig": "run-s getcapabilities build:config",
- "watch": "bash -c 'WORLDVIEW_WATCH='active' npm-watch'"
+ "watch": "bash -c 'WORLDVIEW_WATCH='active' npm-watch'",
+ "upload": "node tasks/upload.js"
},
"watch": {
"build:css": {
diff --git a/tasks/upload.js b/tasks/upload.js
index 2b36d7830..1d899f20b 100755
--- a/tasks/upload.js
+++ b/tasks/upload.js
@@ -51,6 +51,14 @@ var argv = yargs
requiresArg: true,
type: 'string'
})
+ .epilog(`
+Defaults for "host", "key", "root", and "user" should be placed in a JSON
+file found at "${os.homedir()}/.worldview/upload.config".
+
+Values on the command line override those found in the configuration file.
+
+If "host" or "root" is not found in the configuration file, it must
+appear on the command line.`)
.argv;
if (argv.help) {