Esempio n. 1
0
 def get_creating_string(self, indent=8):
     """
     docstring
     """
     return (get_str_indent(indent) +
             '{0}creating{1}').format(self.colors['GREEN'],
                                      self.colors['ENDC'])
Esempio n. 2
0
    def run(self):
        """
        docstring
        """
        sep_scripts_dir = self.meta['sdir']

        for sepdir in sorted(listdir(sep_scripts_dir)):
            self.count_scripts += 1
            d_path = path.join(sep_scripts_dir, sepdir, '')
            if path.isdir(d_path):
                self.meta['dname'] = sepdir
                self.meta['sname'] = (sepdir[:1].lower() +
                                      sepdir[1:] + '.user.js')
                self.meta['mname'] = get_mname(self.meta['sname'])
                self.meta['zname'] = get_zname(self.meta['sname'])

                print('\n./{0}'.format(d_path))

                if not path.isfile(d_path + self.meta['sname']):
                    print((get_str_indent(8) +
                           '{0}Script {1}{2}{0} does not '
                           'exist{3}').format(self.colors['RED'],
                                              self.colors['GREY'],
                                              self.meta['sname'],
                                              self.colors['ENDC']), end='\n\n')
                    raise SystemExit

                chdir(d_path)
                self.set_str_actions(self.meta['zname'], self.colors['YELLOW'])
                self.create_zip()
                self.set_str_actions(self.meta['mname'], self.colors['CYAN'])
                self.create_meta()
                self.set_str_actions(self.meta['readme'], self.colors['BLUE'])
                self.create_readme()
                self.list_all_scripts.append({
                    'dname': self.meta['dname'],
                    'sdwnld': self.meta['sdwnld'],
                    'zdwnld': self.meta['zdwnld'],
                    'ver': self.meta['ver']
                })

                chdir(self.root)

        self.meta['sname'] = self.meta['namemainscript']
        self.meta['mname'] = get_mname(self.meta['sname'])
        self.meta['zname'] = get_zname(self.meta['sname'])
        self.csf_main_script()
Esempio n. 3
0
    def run(self):
        """
        docstring
        """
        sep_scripts_dir = self.meta['sdir']

        for sepdir in sorted(listdir(sep_scripts_dir)):
            self.count_scripts += 1
            d_path = path.join(sep_scripts_dir, sepdir, '')
            if path.isdir(d_path):
                self.meta['dname'] = sepdir
                self.meta['sname'] = (sepdir[:1].lower() + sepdir[1:] +
                                      '.user.js')
                self.meta['mname'] = get_mname(self.meta['sname'])
                self.meta['zname'] = get_zname(self.meta['sname'])

                print('\n./{0}'.format(d_path))

                if not path.isfile(d_path + self.meta['sname']):
                    print((get_str_indent(8) + '{0}Script {1}{2}{0} does not '
                           'exist{3}').format(self.colors['RED'],
                                              self.colors['GREY'],
                                              self.meta['sname'],
                                              self.colors['ENDC']),
                          end='\n\n')
                    raise SystemExit

                chdir(d_path)
                self.set_str_actions(self.meta['zname'], self.colors['YELLOW'])
                self.create_zip()
                self.set_str_actions(self.meta['mname'], self.colors['CYAN'])
                self.create_meta()
                self.set_str_actions(self.meta['readme'], self.colors['BLUE'])
                self.create_readme()
                self.list_all_scripts.append({
                    'dname': self.meta['dname'],
                    'sdwnld': self.meta['sdwnld'],
                    'zdwnld': self.meta['zdwnld'],
                    'ver': self.meta['ver']
                })

                chdir(self.root)

        self.meta['sname'] = self.meta['namemainscript']
        self.meta['mname'] = get_mname(self.meta['sname'])
        self.meta['zname'] = get_zname(self.meta['sname'])
        self.csf_main_script()
Esempio n. 4
0
 def get_creating_string(self, indent=8):
     """
     docstring
     """
     return (get_str_indent(indent) + '{0}creating{1}').format(
         self.colors['GREEN'], self.colors['ENDC'])