-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenvironment.py
56 lines (39 loc) · 1.43 KB
/
environment.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
from os import path, getenv, chdir
from platform import system
from pyres.gpgfuncs import credenzialiapi
def gethomedir():
if system() == "Linux":
return getenv("HOME")
elif system() == "Windows":
return getenv("USERPROFILE")
else:
return ""
habiticadir = path.join(gethomedir(), "scripts", "habitica")
cachedir = path.join(gethomedir(), "scripts", "habitica", "cache")
X = 0
Y = 1
api_user, api_key = credenzialiapi(
path.join(
habiticadir
, "credenzialihabitica"
)
)
userdata_url = "https://habitica.com/export/userdata.json"
user_url = "https://habitica.com/api/v3/user"
headers = {
"x-api-user": api_user
, "x-api-key": api_key
, "x-client": api_user
, "Content-Type": "application/json"
,
}
intfile = path.join( cachedir
, "timec"
)
def chabitica():
chdir(habiticadir)
gold_symbol = chr(0xe26b)
gold_nerd_font = ["18pt", "italic", "bold", "#B3831D", "VictorMono Nerd Font Propo"]
gold_text_font = ["18pt", "italic", "", "#B3831D", "Operator Mono Light Italic"]
time_text_font = ["16pt", "italic", "", "#4C752F", "Operator Mono Italic"]
timeout_text_font = ["16pt", "italic", "", "#AA2217", "Operator Mono Italic"]