Skip to content

Instantly share code, notes, and snippets.

@jglee72
Created September 6, 2018 22:52
Show Gist options
  • Save jglee72/6d4d304ed1b3b32706c7003e34b384b9 to your computer and use it in GitHub Desktop.
Save jglee72/6d4d304ed1b3b32706c7003e34b384b9 to your computer and use it in GitHub Desktop.
moneist.py
# coding: utf-8
import datetime as dt
from calView3 import *
from textField import *
import console, time
import sys
def main():
'''Moneist: Money Atheist: monitor your daily balance based on instantaneous and sliding days. Balances are 'real', 'theoretical extended', and 'real extended'
'''
# month advance bill theoretical. static across all accounts
extend_month = 3
console.clear()
cv = ui.View(name='Moniest')
cv.hidden
# cv.frame = (0,10,375,280)
cv.background_color = .85, .93, 1.0,0.1
# cv.border_color = '#1b1b00'
# cv.border_width = 2
# Date picker Class Call for entry or ?
def calendar_call():
vw = CalendarView('Calendar',dt.datetime.today(), frame = (0,0, 600, 500))
vw.view.present('sheet')
while (vw.datePushed=='init'):
time.sleep(0.2)
print('Date Pushed: ',vw.datePushed)
# store local slide date (and reset to 'hello'?) and close view
slide_date = vw.datePushed
vw.close()
# vw.view.close()
# calendar_call()
ac = accountField(frame_loc=(20,380))
# ac.add_subview(cv)
# ac.bring_to_front
# ac.present('sheet')
cv.add_subview(ac)
# cv.bring_to_front
cv.present('sheet')
if __name__=='__main__':
main()
# coding: utf-8
import ui
class accountField (ui.View):
'''Each account display of current balance. associated button for adding transactions. editable field for balance update
'''
def __init__ (self,frame_loc=(0,0)):
self.acc_field= ui.TextView(frame=frame_loc+(150,64),bg_color=(1.0, .0, .0,0.5),text_color=('white'),font=('AmericanTypewriter-Bold',17), text=('text'),border_color=('#412190'),border_width=3,border_radius=20,alignment=ui.ALIGN_LEFT,alpha=0.5,selected=(False),editable=False)
#add items to the View
# self.add_subview(self.acc_field)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment