This repository has been archived on 2022-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
ztm/ztm.py
2018-02-16 07:31:30 +02:00

76 lines
1.8 KiB
Python

import sys
from pyfzf.pyfzf import FzfPrompt
from model import Model
from task import Task
from bcolors import bcolors
class Main:
def __init__(self):
self.model = Model()
self.task = Task()
self.fzf = FzfPrompt()
def run(self):
print(bcolors.HEADER + '''
GEEEEEEEL .. :
,##############Wf.,;;L#K;;. ,W, .Et
........jW##Wt t#E t##, ,W#t
tW##Kt t#E L###, j###t
tW##E; t#E .E#j##, G#fE#t
tW##E; t#E ;WW; ##,:K#i E#t
.fW##D, t#E j#E. ##f#W, E#t
.f###D, t#E .D#L ###K: E#t
.f####Gfffffffffff; t#E :K#t ##D. E#t
.fLLLLLLLLLLLLLLLLLi fE ... #G ..
: j
Task manager from Zordsdavini (2018)
''' + bcolors.ENDC)
self.menu()
def menu(self):
menu = input(bcolors.OKGREEN + 'What you want to do? (?+/tcq) ' + bcolors.ENDC)
if menu == '?':
self.about()
elif menu == '+':
self.task.add()
self.menu()
elif menu == '/':
self.task.search()
self.menu()
elif menu == 'q':
self.bye()
else:
print(bcolors.FAIL + 'This is not implemented...\n' + bcolors.ENDC)
self.menu()
def about(self):
print(bcolors.WARNING + '''
Short instruction
-----------------
? - help (this dialog)
+ - add
/ - search
t - tag manager
c - configuration
q - exit
''' + bcolors.ENDC)
self.menu()
def bye(self):
print(bcolors.FAIL + 'bye o/' + bcolors.ENDC)
sys.exit(0)
if __name__ == '__main__':
a = Main()
a.run()