-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from MalayPalace/ui
Added UI module in front of the backend cli commands
- Loading branch information
Showing
26 changed files
with
804 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
import os | ||
import platform | ||
|
||
bank_names = ['HDFC', 'KOTAK', 'SBI', 'BOB', 'IDBI', 'SVC'] | ||
account_type = ['Saving', 'Current', 'Creditcard'] | ||
BANK_NAMES = ['HDFC', 'KOTAK', 'SBI', 'BOB', 'IDBI', 'SVC'] | ||
ACCOUNT_TYPE = ['Saving', 'Current', 'Creditcard'] | ||
|
||
COMMA = "," | ||
SPACE = " " | ||
TAB = "\t" | ||
CREDIT_CARD_SUFFIX = "_Creditcard" | ||
|
||
#################################### | ||
# For Release | ||
APP_CONFIG_PATH = os.path.expanduser("~") + "/.local/share/bank-statement-app/" | ||
# APP_CONFIG_PATH = "./config/" # For local Testing | ||
if platform.system() == 'Windows': | ||
APP_CONFIG_PATH = os.path.expanduser("~") + "/AppData/Local/bank-statement-app/" | ||
|
||
DB_TABLE_NAME = "bank_statement.statement" | ||
|
||
# For Local Test run | ||
# APP_CONFIG_PATH = "./config/" | ||
# DB_TABLE_NAME = "bank_statement.statement_test" | ||
#################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
import bank_statement_utility.main as main_app | ||
import bank_statement_utility.main_ui as main_ui_app | ||
|
||
|
||
def main(): | ||
""" | ||
Entry point through installed module | ||
Console script Entry point through installed module | ||
""" | ||
main_app.main() | ||
|
||
|
||
def main_ui(): | ||
""" | ||
UI Entry point through installed module | ||
""" | ||
main_ui_app.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#! /usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Support module generated by PAGE version 8.0 | ||
# in conjunction with Tcl version 8.6 | ||
# Mar 25, 2024 05:08:39 PM IST platform: Linux | ||
|
||
import tkinter as tk | ||
from inspect import getsourcefile | ||
from os.path import dirname | ||
|
||
from tkinterdnd2 import TkinterDnD | ||
|
||
import bank_statement_utility.ui.bankstatementutility as bankstatementutility | ||
from bank_statement_utility.config import config | ||
from bank_statement_utility.logger import log | ||
from bank_statement_utility.version import __version__ | ||
|
||
_debug = True # False to eliminate debug printing from callback functions. | ||
|
||
|
||
def main(*args): | ||
""" | ||
Main entry point for the application. | ||
""" | ||
global root | ||
root = TkinterDnD.Tk() | ||
root.protocol('WM_DELETE_WINDOW', root.destroy) | ||
|
||
# Setting icon of master window | ||
execution_path = dirname(getsourcefile(lambda: 0)) | ||
p1 = tk.PhotoImage(file=execution_path + '/icon.png') | ||
root.iconphoto(False, p1) | ||
|
||
log.info(config['Basic']['appname'] + " version: " + __version__) | ||
|
||
# Creates a toplevel widget. | ||
global _top1, _w1 | ||
_top1 = root | ||
_w1 = bankstatementutility.MainScreenView(_top1) | ||
root.mainloop() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.