Exemplo n.º 1
0
Arquivo: osm.py Projeto: jfarrimo/sabx
    def __init__(self, template_file=None, man=None):
        """
        Add command-line option for input file.

        @param template_file: name of template file to process
        @type template_file: C{string}
        @param man: man page text
        @type man: C{string}
        """
        TemplateProcessor.__init__(self, template_file, man)

        self.parser.add_option("-i", "--infile", dest="in_file",
                               help="input sabx data from FILE", 
                               metavar="FILE")
Exemplo n.º 2
0
    def __init__(self, template_file=None, man=None):
        """
        Add C{optparse} options for the infile and the index.  Seed
        template_data with uuid.

        @param template_file: (optional) file name of template file
        @type template_file: C{string}
        @param man: (optional) extended program help
        @type man: C{string}
        """
        TemplateProcessor.__init__(self, template_file, man)

        self.parser.add_option("-i", "--infile", dest="in_file",
                               help="input tcx data from FILE", 
                               metavar="FILE")
        self.parser.add_option("-n", "--index", dest="start_index",
                               type="int", default=1, 
                               help="starting point index")

        self.template_data['uuid'] = uuid.uuid4()
Exemplo n.º 3
0
Arquivo: map.py Projeto: jfarrimo/sabx
    def __init__(self, template_file=None, man=None):
        """
        Add command-line options to set the input file and various directories
        the templates need to know about.

        @param template_file: name of template file to process
        @type template_file: C{string}
        @param man: man page text
        @type man: C{string}
        """
        TemplateProcessor.__init__(self, template_file, man)

        # input file
        self.parser.add_option("-i", "--infile", dest="in_file",
                               help="input sabx data from FILE", 
                               metavar="FILE")

        # directories
        self.parser.add_option("-r", "--marker-dir", dest="marker_dir",
                               help="relative web directory for marker files", 
                               metavar="MARKERDIR", default=".")
        self.parser.add_option("-g", "--image-dir", dest="image_dir",
                               help="relative web directory for image files", 
                               metavar="IMAGEDIR", default=".")
        self.parser.add_option("-c", "--css-dir", dest="css_dir",
                               help="relative web directory for css files", 
                               metavar="CSSDIR", default=".")
        self.parser.add_option("-j", "--js-dir", dest="js_dir",
                               help="relative web directory for javascript files", 
                               metavar="JSDIR", default=".")
        self.parser.add_option("-b", "--base-dir", dest="base_dir",
                               help="relative base web directory", 
                               metavar="BASEDIR", default=".")
        self.parser.add_option("-a", "--analytics-key", dest="analytics",
                               help="Google analytics key", 
                               metavar="ANALYTICS", default="")