def run(self): #getting a list of documents file name and its respective paths documents, documents_path = Invoice.get_files(self.path) print('Fetched files') #getting a list of word counts of the document wordcount = Invoice.all_file_wordcount(documents_path) print('Fetched word counts') #list of rounded off word counts dummy_count = Invoice.dummy_wordcount(wordcount) print('Fetched dummy count') #list of properties property_create, property_modified, property_title = Invoice.getProperties( documents_path) print('Fetched properties') #getting list of values property_values = Invoice.proper_properties( documents, property_title, property_create, property_modified, wordcount, dummy_count, self.title_bool, self.dummy_bool) print('Fetched proper properties') #fetch dictionary of data of properties data = Invoice.dictionary(property_values, self.title_bool, self.dummy_bool) print('Fetched Data') #drawing table table = Invoice.table(data) print('Table Drawn') #exporting the table to an excel file Invoice.export(table, self.file_path, self.filename) print('Invoice Saved')
print('\n\ndata:') for k, y in data.items(): print(k, ':', y) data_t = Invoice.dictionary(properties_t, title_bool, dummy_bool) print('\n\ndata_t:') for k, y in data_t.items(): print(k, ':', y) data_d = Invoice.dictionary(properties_d, title_bool, dummy_bool) print('\n\ndata_d:') for k, y in data_d.items(): print(k, ':', y) data_td = Invoice.dictionary(properties_td, title_bool, dummy_bool) print('\n\ndata_td:') for k, y in data_td.items(): print(k, ':', y) table = Invoice.table(data) print(table) table_t = Invoice.table(data_t) print(table_t) table_td = Invoice.table(data_td) print(table_td) table_d = Invoice.table(data_d) print(table_d)