added a parser for the image media_type reprocessing
authorRodney Ewing <ewing.rj@gmail.com>
Fri, 2 Aug 2013 14:44:03 +0000 (07:44 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:14 +0000 (15:30 -0700)
mediagoblin/media_types/image/__init__.py

index 9e2d4ad7f98eb406a173f6a03fad932bdd25cc5d..2ad7611194cb4109e6870bf781ba67d098056ada 100644 (file)
@@ -13,6 +13,7 @@
 #
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+import argparse
 import datetime
 
 from mediagoblin.media_types import MediaManagerBase
@@ -74,7 +75,24 @@ def reprocess_action(args):
         return True
 
 
+def _parser(args):
+    parser = argparse.ArgumentParser()
+    parser.add_argument(
+        '--resize',
+    action='store_true')
+    parser.add_argument(
+        '--size',
+        nargs=2)
+    parser.add_argument(
+        '--initial_processing',
+        action='store_true')
+
+    return parser.parse_args(args[1])
+
+
 def media_reprocess(args):
+    reprocess_args = _parser(args)
+    args = args[0]
     import ipdb
     ipdb.set_trace()