couchdb-push - Push documents from the filesystem to CouchDB
Usage:
couchdb-push [OPTION]... <FILE>... <COUCHDB_DATABASE>
Pushing a directory of JSON documents to http://localhost:5984/mydb :
couchdb-push * http://localhost:5984/mydb couchdb-push * mydb # same as above # Note that the filenames will be used as document ids
Pushing one design document to mydb:
# The file "_design/comments" must exist in the filesystem. couchdb-push _design/comments mydb
Overwrite existing documents when pushing to mydb:
couchdb-push --force * mydb
This script will take a list of JSON-encoded files and publish them to a CouchDB database. The paths of the filenames will be used as document ids in CouchDB, and slashes in the path will be escaped properly. This will let you upload documents that have ids with '/'s in them (like '_design/docs').
AnyEvent::CouchDB, AnyEvent::CouchDB::Database
John Beppu <john.beppu@gmail.com>
To install AnyEvent::CouchDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::CouchDB
CPAN shell
perl -MCPAN -e shell install AnyEvent::CouchDB
For more information on module installation, please visit the detailed CPAN module installation guide.