Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hhhrrrttt222111
GitHub Repository: hhhrrrttt222111/Dorkify
Path: blob/master/Modules/information.py
810 views
1
import sys
2
3
import core.search_url as search_url
4
import core.logo as logo
5
import core.colors as colors
6
import core.mods as mods
7
8
def information():
9
def information_menu():
10
global ch5
11
mods.clear_screen()
12
logo.dorkify_logo()
13
print(f'''
14
CHOOSE OPTION :
15
16
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Definition [1]
17
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Information [2]
18
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Stocks [3]
19
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Maps [4]
20
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Weather [5]
21
22
''')
23
24
ch5 = int(input(" --> "))
25
print('\n\n')
26
27
information_menu()
28
29
if ch5 == 1:
30
s = input('SEARCH DEFINITION: ')
31
q = str('define:' + s)
32
print('\nSearching... \n')
33
search_url.url_search(q)
34
35
elif ch5 == 2:
36
s = input('SEARCH : ')
37
q = str('info:' + s)
38
print('\nGathering Info... \n')
39
search_url.url_search(q)
40
41
elif ch5 == 3:
42
s = input('SEARCH COMPANY WITH TICKER CODE: ')
43
q = str('stocks:' + s)
44
print('\nSearching Stocks \n')
45
search_url.url_search(q)
46
47
elif ch5 == 4:
48
s = input('SEARCH CITY: ')
49
q = str('maps:' + s)
50
print('\nFinding Maps \n')
51
search_url.url_search(q)
52
53
elif ch5 == 5:
54
s = input('ENTER CITY NAME: ')
55
q = str('weather:' + s)
56
print('\nChecking Weather \n')
57
search_url.url_search(q)
58
59
else:
60
print('INVALID OPTION \n TRY AGAIN')
61
sys.exit()
62
63