Exemple #1
0
    def SetupOptions(self):
        """ Initialise and return optparse OptionParser object,
        suitable for parsing the command line options to this
        application. """

        parser = pykPlayer.SetupOptions(self, usage="%prog [options]")

        parser.add_option('',
                          '--scan',
                          dest='scan',
                          action='store_true',
                          help='rescan song directories for new files')
        parser.add_option(
            '',
            '--set-scan-dir',
            dest='scan_dir',
            action='store',
            help=
            'sets the named directory as the only directory to be scanned for karaoke files.'
        )
        parser.add_option(
            '',
            '--add-scan-dir',
            dest='scan_dirs',
            action='append',
            help=
            'adds the named directory to the list of directories to be scanned for karaoke files.'
        )

        return parser
Exemple #2
0
    def SetupOptions(self):
        """ Initialise and return optparse OptionParser object,
        suitable for parsing the command line options to this
        application. """

        parser = pykPlayer.SetupOptions(self, usage = "%prog [options] <mpg filename>")

        # Remove irrelevant options.
        parser.remove_option('--font-scale')
        
        return parser