Avdump GUI: Difference between revisions

Jump to navigation Jump to search
v1.01 fixing problems with \ at the end of the scanpath
(New page: <pre> import wx,os,subprocess class stuff: def read_file(self,filepath): """reads a file and returns the containing text""" f = open(filepath,"r") config = f.r...)
 
(v1.01 fixing problems with \ at the end of the scanpath)
Line 38: Line 38:
             newconfig += ('%s=%s\n') %(elem,self.__options[elem])
             newconfig += ('%s=%s\n') %(elem,self.__options[elem])
         glob.create_file(self.__configfile,newconfig)
         glob.create_file(self.__configfile,newconfig)
    def avdump(self):
        self.__options['param'] = ''
        if self.__options['misc'].lstrip(',') > 0:
            for elem in self.__options['misc'].split(','):
                if elem not in ['retries','']:
                    if elem in self.__simple:
                        self.__options['param'] += ' -' + elem
                    elif elem == 'tout':
                        self.__options['param'] += ' -' + elem + ':' + self.__options[elem] + ':' + self.__options['retries']
                    else:
                        self.__options['param'] += ' -' + elem + ':' + self.__options[elem]
        return ('"%s" -ac:%s:%s%s %s') %(self.__options['avdump'], self.__options['user'], self.__options['pass'], self.__options['param'], self.__options['scanpath'])


     def __init__(self, parent, title):
     def __init__(self, parent, title):
Line 79: Line 65:
                         path += '"' + elem + '" '
                         path += '"' + elem + '" '
                 else:
                 else:
                     path = '"' + temp[0] + '"'
                     path = '"' + temp[0].rstrip("\\") + '"'
         else:
         else:
             dialog = wx.DirDialog ( None, message = 'Pick a directory.' )
             dialog = wx.DirDialog ( None, message = 'Pick a directory.' )
             if dialog.ShowModal() == wx.ID_OK:
             if dialog.ShowModal() == wx.ID_OK:
                 path = '"' + dialog.GetPath() + '"'
                 path = '"' + dialog.GetPath().rstrip("\\") + '"'


         self.filepath.Clear()
         self.filepath.Clear()
Line 91: Line 77:


     def startClick(self, event):
     def startClick(self, event):
        self.__options['param'] = ''
         if self.filepath.GetValue() != '':
         if self.filepath.GetValue() != '':
             self.read_config()
             self.read_config()
             subprocess.call(str(self.avdump()))
            if self.__options['misc'].lstrip(',') > 0:
                for elem in self.__options['misc'].split(','):
                    if elem not in ['retries','']:
                        if elem in self.__simple:
                            self.__options['param'] += ' -' + elem
                        elif elem == 'tout':
                            self.__options['param'] += ' -' + elem + ':' + self.__options[elem] + ':' + self.__options['retries']
                        else:
                            self.__options['param'] += ' -' + elem + ':' + self.__options[elem]
             subprocess.call(('"%s" -ac:%s:%s%s %s') %(self.__options['avdump'], self.__options['user'], self.__options['pass'], self.__options['param'], self.__options['scanpath']))


     def optionsClick(self, event):
     def optionsClick(self, event):

Navigation menu

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.