Ejemplo n.º 1
0
    def __init__(self, template_file=None, man=None):
        """
        Add C{optparse} options for the usage.

        @param template_file: (optional) file name of template file
        @type template_file: C{string}
        @param man: (optional) extended program help
        @type man: C{string}
        """
        SabxProcessor.__init__(self, template_file, man)
        self.parser.usage = "%s seg_id" % self.parser.usage
Ejemplo n.º 2
0
    def __init__(self, template_file=None, man=None):
        """
        Add C{optparse} options for the index.

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

        self.parser.add_option("-n", "--index", dest="ride_index",
                               default="1", 
                               help="ride index")
Ejemplo n.º 3
0
    def __init__(self, template_file=None, man=None):
        """
        Adds the "start" and "unique" options to the command-line options.

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

        self.parser.add_option("-s", "--start", dest="start",
                               help="number to start at", 
                               type="int", default=1, metavar="START")
        self.parser.add_option("-u", "--unique", dest="unique",
                               action="store_true",
                               help="all unique ids?", 
                               default=False, metavar="UNIQUE")
Ejemplo n.º 4
0
    def __init__(self, template_file=None, man=None):
        """
        Add support for an OSM data file and a logo directory.

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

        self.parser.add_option("-d", "--datafile", dest="data_file",
                               help="osm data FILE name", 
                               metavar="FILE")
        self.parser.add_option("-l", "--logodir", dest="logo_dir",
                               help="osm logo directory", 
                               metavar="LOGO")

        self.template_data['PIX_SCALE_FACTOR'] = PIX_SCALE_FACTOR
Ejemplo n.º 5
0
    def __init__(self, template_file=None, man=None):
        """
        Adds the id, csv, and generate options to the standard SABX 1.0
        template processor.

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

        self.parser.usage = "%s csv_file" % self.parser.usage
        self.parser.add_option("-d", "--id", dest="id",
                               help="id of segment to merge into", 
                               default="1", metavar="ID")
        self.parser.add_option("-b", "--blank", dest="blank",
                               action="store_true",
                               help="generate a blank CSV file", 
                               default=False, metavar="BLANK")