aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands
diff options
context:
space:
mode:
authorStéphane Péchard <stephanepechard@gmail.com>2014-07-13 19:01:09 +0200
committerStéphane Péchard <stephanepechard@gmail.com>2014-07-13 19:01:09 +0200
commita3c480248f8dbe649ced86d80b038e80cc77e9cd (patch)
tree767ae671bb1c189de84234f91ab9a4242850f8a6 /mediagoblin/gmg_commands
parente99431cc05dd6282f55d1e4cf18248e9d282455c (diff)
downloadmediagoblin-a3c480248f8dbe649ced86d80b038e80cc77e9cd.tar.lz
mediagoblin-a3c480248f8dbe649ced86d80b038e80cc77e9cd.tar.xz
mediagoblin-a3c480248f8dbe649ced86d80b038e80cc77e9cd.zip
Add collection option to 'addmedia' cli uploading
Diffstat (limited to 'mediagoblin/gmg_commands')
-rw-r--r--mediagoblin/gmg_commands/addmedia.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mediagoblin/gmg_commands/addmedia.py b/mediagoblin/gmg_commands/addmedia.py
index c33a8c56..2f095760 100644
--- a/mediagoblin/gmg_commands/addmedia.py
+++ b/mediagoblin/gmg_commands/addmedia.py
@@ -51,6 +51,11 @@ def parser_setup(subparser):
help=(
"Slug for this media entry. "
"Will be autogenerated if unspecified."))
+ subparser.add_argument(
+ "-c", "--collection-slug",
+ help=(
+ "Slug of the collection for this media entry."
+ "Should already exits."))
subparser.add_argument(
'--celery',
@@ -94,6 +99,7 @@ def addmedia(args):
submitted_file=file(abs_filename, 'r'), filename=filename,
title=maybe_unicodeify(args.title),
description=maybe_unicodeify(args.description),
+ collection_slug=args.collection_slug,
license=maybe_unicodeify(args.license),
tags_string=maybe_unicodeify(args.tags) or u"",
upload_limit=upload_limit, max_file_size=max_file_size)