Beispiel #1
0
    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')
Beispiel #2
0
for i in range(len(properties_t)):
    print(properties_t[i])

properties_d = Invoice.proper_properties(files_name, t, c, m, wordcount, dummy,
                                         title_bool, dummy_bool)
print('\n\nvalues with d')
for i in range(len(properties_d)):
    print(properties_d[i])

properties_td = Invoice.proper_properties(files_name, t, c, m, wordcount,
                                          dummy, title_bool, dummy_bool)
print('\n\nvalues with t and d')
for i in range(len(properties_td)):
    print(properties_td[i])

data = Invoice.dictionary(properties, title_bool, dummy_bool)
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)