Example #1
0
 def __init__(self):
     ZfCLI.__init__(self, "create-gallery")
     
     self._parser.add_argument("-p", "--parents", action="store_true",
                         help="Create parent groups as needed.",
                         required=False)
     self._parser.add_argument("-c", "--caption", action="store",
                         help="Caption to add to the newly created gallery.")
     self._parser.add_argument("-k", "--keyword", "--keywords", \
                         action="append", dest="keywords", \
                         help="Keyword to be associated with the gallery. "+\
                             "May be specified multiple times.")
     self._parser.add_argument("-g", "--category", "--categories", \
                         action="append",dest="categories", \
                         help="Category to be associated with the gallery."+\
                             " May be specified multiple times.")
     self._parser.add_argument("-f", "--friendly-url", "--url", \
                              "--access-code", \
                              action="store", dest="url", \
                              help="Friendly URL/Access Code to " + \
                                  "associate with the gallery.")
     self._parser.add_argument("-a", "--auto-url", \
                              action="store_true",
                              help="Automatically create a friendly URL " + \
                                  "from the gallery path.  The " + \
                                  "last two entries in the gallery " + \
                                  "path will be converted to lower case, " +\
                                  "and spaces replaced with dashes.")
     self._parser.add_argument("gallery_path", action="store", \
                         help="Destination gallery to create, specified " + \
                             "as a path delimited with slashes " + \
                             "(\"/\") For example: " + \
                             "\"/All Photographs/Soccer/Earthquakes\".")
Example #2
0
 def __init__(self):
     ZfCLI.__init__(self, "test")
     
     self._parser.add_argument("gallery_path", action="store", \
                         help="Gallery to query, specified " + \
                             "as a path delimited with slashes " + \
                             "(\"/\") For example: " + \
                             "\"/All Photographs/Soccer/Earthquakes\".")
Example #3
0
 def __init__(self):
     ZfCLI.__init__(self, "upload")
     self._parser.add_argument("-c", "--create", action="store_true", \
                               help="Create gallery if it doesn't exist.")
     self._parser.add_argument("-p", "--parents", action="store_true",
                               help="Create parent groups as needed.",
                               required=False)
     self._parser.add_argument("images", metavar="file", nargs="+", 
                               help="Path(s) to image file(s) to upload.")
     self._parser.add_argument("gallery", action="store", \
                               help="Destination gallery, specified " + \
                                   "as a path delimited with slashes "+ \
                                   "(\"/\"). For example: " + \
                                   "\"/All Photographs/Soccer/Earthquakes\".")
Example #4
0
    def __init__(self):
        ZfCLI.__init__(self, "backup")
        self._parser.add_argument("local_path", action="store", \
                                   help="Path to back up")
        self._parser.add_argument("group_path", action="store", \
                                   help="Group to back up to, specified " + \
                                   "as a path delimited with slashes " + \
                                   "(\"/\") For example: " + \
                                   "\"/All Photographs/Soccer/Earthquakes\".")

        mimetypes.init()
        self.max_socket_retries = 3

        self._add_files = 0
        self._skip_files = 0
        self._old_files = 0
        self._new_files = 0
        self._new_galleries = 0
        self._new_groups = 0
        self._total_retries = 0
Example #5
0
 def __init__(self):
     ZfCLI.__init__(self, "create-group")
     
     self._parser.add_argument("-p", "--parents", action="store_true",
                               help="Create parent groups as needed.",
                               required=False)
     self._parser.add_argument("-c", "--caption", action="store",
                              help="Caption to add to the group.")
     self._parser.add_argument("-f","--friendly-url",
                               "--url","--access-code", 
                              action="store", dest="url",
                              help="Friendly URL/Access Code for the group.")
     self._parser.add_argument("-a", "--auto-url", \
                               action="store_true",
                               help="Automatically create a friendly " + \
                                  "URL from the group path.  The " + \
                                  "last entry in the group " + \
                                  "path will be converted to lower case, " +\
                                  "and spaces replaced with dashes.")
     self._parser.add_argument("group_path", action="store",
                               help="Destination group to create, " + \
                                   "specified as a slash(\"/\")-"+ \
                                   "delimited path. For example: " + \
                                   "\"/All Photographs/Soccer/Earthquakes\".")