John Beppu > AnyEvent-CouchDB-1.31 > couchdb-push

Download:
AnyEvent-CouchDB-1.31.tar.gz

Annotate this POD

CPAN RT

New  3
Open  1
View/Report Bugs
Source  

NAME ^

couchdb-push - Push documents from the filesystem to CouchDB

SYNOPSIS ^

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

DESCRIPTION ^

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').

SEE ALSO ^

AnyEvent::CouchDB, AnyEvent::CouchDB::Database

AUTHOR ^

John Beppu <john.beppu@gmail.com>

syntax highlighting: