Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 57D0C18325 for ; Wed, 30 Sep 2015 14:20:49 +0000 (UTC) Received: (qmail 76224 invoked by uid 500); 30 Sep 2015 14:20:49 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 76178 invoked by uid 500); 30 Sep 2015 14:20:49 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 76169 invoked by uid 99); 30 Sep 2015 14:20:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2015 14:20:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E7338E00B2; Wed, 30 Sep 2015 14:20:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robertkowalski@apache.org To: commits@couchdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: couchdb-nmo git commit: fix docs Date: Wed, 30 Sep 2015 14:20:48 +0000 (UTC) Repository: couchdb-nmo Updated Branches: refs/heads/master 22ca5e0c2 -> a8d0b23d7 fix docs - fix broken documentation for commands - back to 72 char limit for manpages / help in terminal PR: #4 PR-URL: https://github.com/apache/couchdb-nmo/pull/4 Reviewed-By: garren smith Project: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/commit/a8d0b23d Tree: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/tree/a8d0b23d Diff: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/diff/a8d0b23d Branch: refs/heads/master Commit: a8d0b23d70918945c622598622c3a3a78856df82 Parents: 22ca5e0 Author: Robert Kowalski Authored: Sat Sep 12 16:26:13 2015 +0200 Committer: Robert Kowalski Committed: Wed Sep 30 16:20:07 2015 +0200 ---------------------------------------------------------------------- doc/api/nmo-couch-config.md | 16 +++++++++------- doc/api/nmo-import-csv.md | 8 ++++---- doc/cli/nmo-couch-config.md | 9 +++++---- doc/cli/nmo-import-csv.md | 13 ++++++++----- src/import-csv.js | 4 +++- test/import-csv.js | 3 ++- 6 files changed, 31 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/api/nmo-couch-config.md ---------------------------------------------------------------------- diff --git a/doc/api/nmo-couch-config.md b/doc/api/nmo-couch-config.md index 45be4e2..69c3276 100644 --- a/doc/api/nmo-couch-config.md +++ b/doc/api/nmo-couch-config.md @@ -1,21 +1,23 @@ -nmo-config(3) -- configuration -============================== +nmo-couch-config(3) -- configuration of a CouchDB cluster +========================================================= ## SYNOPSIS - nmo.commands.couch-config.set(cluster, nodes, section, key, value) - nmo.commands.couch-config.get(cluster, nodes, [section]) + nmo.commands['couch-config'].set(cluster, nodes, section, key, value) + nmo.commands['couch-config'].get(cluster, nodes, [section]) ## DESCRIPTION -Manage the nmo configuration. +Manage the CouchDB configuration. - set: -Sets the value for a key of a CouchDB config section for each node in a cluster. +Sets the value for a key of a CouchDB config section for each node in +a cluster. - get: -Gets the config for each node in a cluster and displays it for easy viewing +Gets the config for each node in a cluster and displays it for easy +viewing http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/api/nmo-import-csv.md ---------------------------------------------------------------------- diff --git a/doc/api/nmo-import-csv.md b/doc/api/nmo-import-csv.md index a056ce6..8961bb9 100644 --- a/doc/api/nmo-import-csv.md +++ b/doc/api/nmo-import-csv.md @@ -1,9 +1,9 @@ -nmo-import-csv(3) -- configuration -============================== +nmo-import-csv(3) -- import csv +=============================== ## SYNOPSIS - nmo.commands.importcsv(file, url, [csvOptions]) + nmo.commands['import-csv'](file, url, [csvOptions]) @@ -11,7 +11,7 @@ nmo-import-csv(3) -- configuration Import csv file into CouchDB - - importcsv: + - import-csv: Accepts the file, url and csv options to import a file into CouchDB. It returns a promise. http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/cli/nmo-couch-config.md ---------------------------------------------------------------------- diff --git a/doc/cli/nmo-couch-config.md b/doc/cli/nmo-couch-config.md index a075084..19e473a 100644 --- a/doc/cli/nmo-couch-config.md +++ b/doc/cli/nmo-couch-config.md @@ -1,5 +1,5 @@ -nmo-couch-config(1) -- Set/Get couch configuration for a cluster -================================= +nmo-couch-config(1) -- Set/Get CouchDB configuration for a cluster +================================================================== ## SYNOPSIS @@ -15,8 +15,9 @@ If a key is specified it will only get the configuration for that section - set: -Set the value for a given key of a section of the config. This will update the config for all nodes in a cluster. -The cluster must be specified in the .nmorc file. +Set the value for a given key of a section of the config. This will update +the config for all nodes in a cluster. The cluster must be specified in the +.nmorc file. ## EXAMPLE http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/cli/nmo-import-csv.md ---------------------------------------------------------------------- diff --git a/doc/cli/nmo-import-csv.md b/doc/cli/nmo-import-csv.md index 498a1b4..fa8fd82 100644 --- a/doc/cli/nmo-import-csv.md +++ b/doc/cli/nmo-import-csv.md @@ -1,27 +1,30 @@ nmo-import-csv(1) -- Bulk import CSV files -================================= +========================================== ## SYNOPSIS - nmo import-csv , [delimiter=','] [columns=true] + nmo import-csv [--delimiter=','] [--columns=true] ## DESCRIPTION -Imports a csv file into CouchDB. +Imports a csv file into CouchDB. ## CONFIGURATION: delimiter * Default: ',' * Type: String + The csv delimiter columns * Default: true * Type: Boolean - Whether to use the first row of the csv to define the key fields for each document + + Whether to use the first row of the csv to define the key fields for + each document ## EXAMPLE - nmo import-csv /path/to/file.cvs http://couchdb-url:5984 --delimiter=',' --columns=true + nmo import-csv /path/to/csv http://couch-url --columns=true http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/src/import-csv.js ---------------------------------------------------------------------- diff --git a/src/import-csv.js b/src/import-csv.js index 5b72f1e..cad9039 100644 --- a/src/import-csv.js +++ b/src/import-csv.js @@ -28,7 +28,9 @@ export function cli (file, url, ...csvOptions) { return importcsv.apply(importcsv, [file, url, opts]); } -export function importcsv (file, url, {delimiter= ',', columns= true}) { + +export default importcsv; +function importcsv (file, url, {delimiter= ',', columns= true}) { return new Promise((resolve, reject) => { const input = fs.createReadStream(file) .on('error', (err) => { http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/test/import-csv.js ---------------------------------------------------------------------- diff --git a/test/import-csv.js b/test/import-csv.js index e1eac3c..c86eb18 100644 --- a/test/import-csv.js +++ b/test/import-csv.js @@ -4,7 +4,8 @@ import Lab from 'lab'; export const lab = Lab.script(); import nock from 'nock'; import nmo from '../src/nmo.js'; -import {cli, importcsv} from '../src/import-csv.js'; +import {cli} from '../src/import-csv.js'; +import importcsv from '../src/import-csv.js'; const docs = { "docs":[