-
Notifications
You must be signed in to change notification settings - Fork 1
/
__init__.py
91 lines (81 loc) · 3.57 KB
/
__init__.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
'''
MIT License | Copyright (C) 2023 Osamah Awadh (https://github.com/oaokm)
/$$$$$$$$ /$$$$$$$ /$$ /$$ /$$
| $$_____/ | $$__ $$ | $$ | $$ |__/
| $$ /$$$$$$ /$$$$$$ /$$$$$$ | $$ \ $$ /$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$$$$$$ /$$$$$$
| $$$$$ /$$__ $$ /$$__ $$ /$$__ $$ | $$$$$$$/ |____ $$| $$ /$$__ $$ /$$_____/|_ $$_/ | $$| $$__ $$ /$$__ $$
| $$__/ | $$ \__/| $$$$$$$$| $$$$$$$$ | $$____/ /$$$$$$$| $$| $$$$$$$$| $$$$$$ | $$ | $$| $$ \ $$| $$$$$$$$
| $$ | $$ | $$_____/| $$_____/ | $$ /$$__ $$| $$| $$_____/ \____ $$ | $$ /$$| $$| $$ | $$| $$_____/
| $$ | $$ | $$$$$$$| $$$$$$$ | $$ | $$$$$$$| $$| $$$$$$$ /$$$$$$$/ | $$$$/| $$| $$ | $$| $$$$$$$
|__/ |__/ \_______/ \_______/ |__/ \_______/|__/ \_______/|_______/ \___/ |__/|__/ |__/ \_______/
// An entire people is being ethnically cleansed by Zionist Gangs.
#palestine
#gaza
#genocide
#gazaUnderAttack
#freePalestine
#GazaGenocide
#speakUpForGaza
'''
import os
from .log import log
from .cheak import cheak
import json
import platform
#! لا تقم بتغير رقم الإصدار
#! Do not change the version
__version__ = '2.0.2'
__main_path__ = os.path.dirname(__file__)
class json_edit:
def __init__(self, name_file:str, refresh=False):
self.name_file = name_file
self.refresh = refresh
def info_file(self):
if not os.path.exists(path=f"{__main_path__}/DATA/info.json") or self.refresh:
INFO = {
"API_name": "AL-Khatma",
"Version": __version__,
"Is_a_new": "True",
"License": "MIT",
"Progjet_page": "https://github.com/oaokm/AL-Khatma",
"Author": "Osamah Awadh",
"system_tpye": platform.system(),
"version_system": platform.version(),
"platform": platform.platform(),
"refresh": "True"
}
with open(f"{__main_path__}/DATA/info.json", 'w') as info :
info.write(json.dumps(INFO, indent=4, ensure_ascii=False))
else:
pass
def edit(self, arge:str ,value):
with open(self.name_file, 'r+') as f:
data = json.load(f)
data[arge] = value
f.seek(0)
json.dump(data, f, indent=4)
f.truncate()
def Download_DATA():
log(
f'{__file__} | Download DATA Request ',
f'The user to been request the cheak and download files form Github'
).write_message()
json_edit(f'{__main_path__}/DATA/info.json', refresh=True).info_file()
down = cheak()
list_files = down.find_DATA_folder()
if list_files != []:
down.download()
else:
print("[Download_DATA | Status Scan] All files are uploaded")
def where_me():
log(
f'{__file__} | Where Me Request ',
f'The user to been request the path program'
).write_message()
return __main_path__
def show_me_log():
log(
f'{__file__} | Show Me Log Request ',
f'The user to been request the path log file'
).write_message()
return f"{__main_path__}/DATA/loging.log"