scripts/get_traffic.py
def write_json(self, date=(datetime.date.today()),
        organization='llnl',dict_to_write={}, path_ending_type=''):
        """
        Writes all traffic data to file in JSON form.
        """
        for repo in dict_to_write:
            if len(dict_to_write[repo]) != 0:#don't need to write out empty lists
                path = ('../github-data/' + organization + '/' + repo + '/' +
                     path_ending_type + '/' + str(date) + '.json')
                self.checkDir(path)
                with open(path, 'w') as out:
                    out.write(json.dumps(dict_to_write[repo], sort_keys=True,
                        indent=4, separators=(',', ': ')))
                out.close()
def write_json(self, date=(datetime.date.today()),
        organization='llnl',dict_to_write={}, path_ending_type=''):
        """
        Writes all traffic data to file in JSON form.
        """
        for repo in dict_to_write:
            if len(dict_to_write[repo]) != 0:#don't need to write out empty lists
                path = ('../github-data/' + organization + '/' + repo + '/' +
                     path_ending_type + '/' + str(date) + '.json')
                self.checkDir(path)
                with open(path, 'w') as out:
                    out.write(json.dumps(dict_to_write[repo], sort_keys=True,
                        indent=4, separators=(',', ': ')))
                out.close()
def write_json ( self , date = ( datetime . date . today ( ) ) , organization = 'llnl' , dict_to_write = { } , path_ending_type = '' ) : for repo in dict_to_write : if len ( dict_to_write [ repo ] ) != 0 : #don't need to write out empty lists path = ( '../github-data/' + organization + '/' + repo + '/' + path_ending_type + '/' + str ( date ) + '.json' ) self . checkDir ( path ) with open ( path , 'w' ) as out : out . write ( json . dumps ( dict_to_write [ repo ] , sort_keys = True , indent = 4 , separators = ( ',' , ': ' ) ) ) out . close ( )
Writes all traffic data to file in JSON form.
Writes all traffic data to file in JSON form .