summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2015-05-13 10:34:22 -0300
committerdrebs <drebs@leap.se>2015-05-20 10:16:46 -0300
commit93717f50c9e8fc6295f74b6117268ba595f13ce9 (patch)
tree13fa053c0a790396b8b827e5bb2d96acb1687191 /scripts
parentd1c39d389737ee844f42c5ed3dfc97c8ddf24250 (diff)
[feature] add --create-doc to client db script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/db_access/client_side_db.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/db_access/client_side_db.py b/scripts/db_access/client_side_db.py
index a047b522..5dd2bd95 100644
--- a/scripts/db_access/client_side_db.py
+++ b/scripts/db_access/client_side_db.py
@@ -151,6 +151,9 @@ def _parse_args():
'--get-all-docs', '-a', action='store_true',
help='get all documents from the local database')
parser.add_argument(
+ '--create-doc', '-c', default=None,
+ help='create a document with give content')
+ parser.add_argument(
'--sync', '-s', action='store_true',
help='synchronize with the server replica')
parser.add_argument(
@@ -211,6 +214,8 @@ def _get_all_docs(soledad):
@inlineCallbacks
def _main(soledad, km, args):
+ if args.create_doc:
+ yield soledad.create_doc({'content': args.create_doc})
if args.sync:
yield soledad.sync()
if args.get_all_docs: