-
Notifications
You must be signed in to change notification settings - Fork 0
/
main-ui.py
51 lines (42 loc) · 1.07 KB
/
main-ui.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
from tkinter.constants import LEFT
import wikipediaapi
import datetime
import tkinter
window = tkinter.Tk()
window.title("Wooh")
day_now = datetime.datetime.now().day
month_now = datetime.datetime.now().month
if month_now == 1:
month = 'January'
if month_now == 2:
month = 'February'
if month_now == 3:
month = 'March'
if month_now == 4:
month = 'April'
if month_now == 5:
month = 'May'
if month_now == 6:
month = 'June'
if month_now == 7:
month = 'July'
if month_now == 8:
month = 'August'
if month_now == 9:
month = 'September'
if month_now == 10:
month = 'October'
if month_now == 11:
month = 'November'
if month_now == 12:
month = 'December'
day_now = str(day_now)
title_page = str(month+'_'+day_now)
wikipedia = wikipediaapi.Wikipedia('en')
page = wikipedia.page(title_page)
h = page.section_by_title('Holidays and observances')
sm = page.summary[0:60]
tkinter.Label(window, text="Wooh").pack()
tkinter.Label(window, text=sm).pack()
tkinter.Label(window, text=h).pack()
window.mainloop()