-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
75 lines (57 loc) · 2.08 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),"Core"))
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),"Linux"))
import LinuxNoteManager
import LinuxFolderManager
import LinuxURLManager
from Core import ClipboardWatcher
from Core.ClipboardWatcher import ClipboardWatcher
from Linux import LinuxClipboardManager
import Global
class main:
def __init__(self):
self.__mrgfolder = LinuxFolderManager.LinuxFolderManager()
Global.mrgclipboard = LinuxClipboardManager.LinuxClipboardManager()
self.__mrgurl= LinuxURLManager.LinuxURLManager()
self.__mrgcode= LinuxNoteManager.LinuxNoteManager('Code')
self.__mrgnote= LinuxNoteManager.LinuxNoteManager('Note')
self._thread = ClipboardWatcher(Global.mrgclipboard)
self._thread.start()
def start(self):
run=True
while run:
os.system("clear")
print("Welcome to ffex console. What do you need?")
print("1 - Open favorite folder")
print("2 - Take a note")
print("3 - Take a link")
print("4 - Take a code")
print("5 - List of clipboard")
print("d - Debug command")
print("q - quit")
print("")
action = input("-> ")
os.system("clear")
if action == "1":
self.__mrgfolder.commandfolders()
self.__mrgfolder._saveFile()
elif action == "2":
self.__mrgnote.commandCode()
elif action =="3":
self.__mrgurl.commandURL()
self.__mrgurl._saveFile()
elif action=="4":
self.__mrgcode.commandCode()
elif action == "5":
Global.mrgclipboard.command()
elif action == "d":
print(self.__mrgfolder.getdict())
elif action=="q":
os.system("clear")
run=False
self._thread.stop()
m=main()
m.start()
#def Command(action):
# if action==1: