-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgui.py
35 lines (25 loc) · 887 Bytes
/
gui.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
from tkinter import *
import main
import seratorx
from time import sleep
__author__ = "Sotirios Soulantikas <[email protected]>"
__licence__ = "Open source"
__version__ = "0.0.1"
__license__ = __licence__
window = Tk()
window.title('Seratorx')
window.geometry('640x400')
lbl = Label(window, text='Serato library tools', font=('Times New Roman', 18))
lbl.grid(column=0, row=0)
def archive_lib():
"""
Archives Serato library.
:return: True (if successful) or False
"""
archive_status = seratorx.archive_srt_lib() # True: OK. False: Error, not archived
lbl_bup_lib.configure(text=f'Most recent backup: {archive_status[1]}')
btn = Button(window, text='Archive', command=archive_lib)
btn.grid(column=0, row=25)
lbl_bup_lib = Label(window, text='Most recent backup: ', font=('Times New Roman', 18))
lbl_bup_lib.grid(column=0, row=300)
window.mainloop()