Ejemplo n.º 1
0
 def __read_histogram_data(self, file_name):
     self.options.expense_file_name = read_file(file_name, 'Expense History File:',
                                                'STRING')
     self.options.histogram_directory = read_file(file_name, 'Histogram Directory:',
                                                  'STRING')
     self.options.histogram_end_date = read_file(file_name, 'Histogram End Date:',
                                                 'STRING')
     return
Ejemplo n.º 2
0
 def __read_account_log_file_name(self, file_name):
     self.options.expense_file_name = read_file(file_name, 'Expense History File:',
                                                'STRING')
     self.options.account_log_file_name = read_file(file_name, 'Account History:',
                                                    'STRING')
     self.options.checking_start_value = read_file(file_name, 'Checking Start:',
                                                   'FLOAT')
     self.options.savings_start_value = read_file(file_name, 'Savings Start:',
                                                  'FLOAT')
     self.options.log_end_date = read_file(file_name, 'Log End Date:',
                                           'STRING')
     if self.options.log_end_date.upper() == 'TODAY' and \
        self.options.log_end_date.upper() == 'FILE':
         sys.exit("FATAL ERROR: Log end day must be 'TODAY' or 'FILE'")
     return
Ejemplo n.º 3
0
    def __sum_vendors(self, file_name):
        self.options.expense_file_name = read_file(file_name, 'Expense History File:',
                                                   'STRING')
        self.options.vendor_start_date = read_file(file_name, 'Vendor Start Date:',
                                                   'STRING')
        self.options.vendor_end_date = read_file(file_name, 'Vendor End Date:',
                                                 'STRING')
        self.options.vendor_start_date = \
            self.__create_datetime(self.options.vendor_start_date)
        self.options.vendor_end_date = \
            self.__create_datetime(self.options.vendor_end_date)

        day = (self.options.vendor_end_date - self.options.vendor_start_date).days
        if day < 0:
            sys.exit('FATAL ERROR: expense end date is before expense start date')
Ejemplo n.º 4
0
    def __read_sum_expenses(self, file_name):
        self.options.expense_file_name = read_file(file_name, 'Expense History File:',
                                                   'STRING')
        self.options.sum_start_date = read_file(file_name, 'Sum Start Date:',
                                                'STRING')
        self.options.sum_end_date = read_file(file_name, 'Sum End Date:',
                                              'STRING')
        self.options.sum_start_date = \
            self.__create_datetime(self.options.sum_start_date)
        self.options.sum_end_date = \
            self.__create_datetime(self.options.sum_end_date)

        day = (self.options.sum_end_date - self.options.sum_start_date).days
        if day < 0:
            sys.exit('FATAL ERROR: sum end date is before sum start date')
        return
Ejemplo n.º 5
0
    def __read_plot_file_name(self, file_name):
        self.options.account_log_file_name = read_file(file_name, 'Account History:',
                                                       'STRING')
        self.options.history_plot_name = read_file(file_name, 'History Plot Name:',
                                                   'STRING')
        self.options.history_start_date = read_file(file_name, 'Plot Start Date:',
                                                    'STRING')
        self.options.history_end_date = read_file(file_name, 'Plot End Date:',
                                                  'STRING')
        self.options.history_start_date = \
            self.__create_datetime(self.options.history_start_date)
        self.options.history_end_date = \
            self.__create_datetime(self.options.history_end_date)

        day = (self.options.history_end_date - self.options.history_start_date).days
        if day < 0:
            sys.exit("FATAL ERROR: Plot end date is before plot start date")
        return
Ejemplo n.º 6
0
 def __read_file_options(self, file_name):
     self.options.organize_expense_file = read_file(file_name, 'Organize Expense File:',
                                                    'STRING').upper()
     self.options.draft_daily_history = read_file(file_name, 'Draft Daily History:',
                                                  'STRING').upper()
     self.options.plot_account_history = read_file(file_name, 'Plot Account History:',
                                                   'STRING').upper()
     self.options.sum_account_values = read_file(file_name, 'Sum Account Values:',
                                                 'STRING').upper()
     self.options.create_histogram_tables = read_file(file_name, 'Create Histogram Tables:',
                                                      'STRING').upper()
     self.options.tabulate_expense = read_file(file_name, 'Tabulate Expense:',
                                                'STRING')
     self.options.sum_vendors = read_file(file_name, 'Sum Vendors:',
                                          'STRING')
     self.options.plot_future = read_file(file_name, 'Plot Future:',
                                          'STRING')
     self.options.account_log_file_name = read_file(file_name, 'Account History:',
                                                    'STRING')
     return
Ejemplo n.º 7
0
    def __tabulate_expense(self, file_name):
        self.options.expense_file_name = read_file(file_name, 'Expense History File:',
                                                   'STRING')
        self.options.expense_type = read_file(file_name, 'Expense Type:',
                                              'STRING')
        self.options.expense_start_date = read_file(file_name, 'Expense Start Date:',
                                                    'STRING')
        self.options.expense_end_date = read_file(file_name, 'Expense End Date:',
                                                  'STRING')
        self.options.expense_keyword = read_file(file_name, 'Expense Keyword:',
                                                 'STRING')
        self.options.expense_start_date = \
            self.__create_datetime(self.options.expense_start_date)
        self.options.expense_end_date = \
            self.__create_datetime(self.options.expense_end_date)

        if self.options.expense_type.upper() != 'VENDOR' and \
           self.options.expense_type.upper() != 'EXPENSE_TYPE' and \
           self.options.expense_type.upper() != 'DESCRIPTION':
            sys.exit('FATAL ERROR: Expense type not properly entered in run options file')

        day = (self.options.expense_end_date - self.options.expense_start_date).days
        if day < 0:
            sys.exit('FATAL ERROR: expense end date is before expense start date')
Ejemplo n.º 8
0
 def __read_expense_file_name(self, file_name):
     self.options.expense_file_name = read_file(file_name, 'Expense History File:',
                                                'STRING')
     return