gemini-thonny 0.1.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.
- gemini_thonny-0.1.0/LICENSE +15 -0
- gemini_thonny-0.1.0/PKG-INFO +30 -0
- gemini_thonny-0.1.0/README.md +18 -0
- gemini_thonny-0.1.0/pyproject.toml +21 -0
- gemini_thonny-0.1.0/setup.cfg +4 -0
- gemini_thonny-0.1.0/src/gemini_thonny/__init__.py +1 -0
- gemini_thonny-0.1.0/src/gemini_thonny/installer.py +85 -0
- gemini_thonny-0.1.0/src/gemini_thonny.egg-info/PKG-INFO +30 -0
- gemini_thonny-0.1.0/src/gemini_thonny.egg-info/SOURCES.txt +10 -0
- gemini_thonny-0.1.0/src/gemini_thonny.egg-info/dependency_links.txt +1 -0
- gemini_thonny-0.1.0/src/gemini_thonny.egg-info/entry_points.txt +2 -0
- gemini_thonny-0.1.0/src/gemini_thonny.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files, to deal in the Software
|
|
7
|
+
without restriction, including without limitation the rights to use, copy,
|
|
8
|
+
modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
9
|
+
Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gemini-thonny
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Gemini AI typing assistant installer for Thonny
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/glaceonmonette1809-lgtm/gemini-thonny
|
|
7
|
+
Project-URL: Repository, https://github.com/glaceonmonette1809-lgtm/gemini-thonny
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# Gemini Thonny
|
|
14
|
+
|
|
15
|
+
Installer package for the Gemini Thonny plugin.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Put `thonnycontrib.zip` next to this README, then run:
|
|
20
|
+
|
|
21
|
+
```cmd
|
|
22
|
+
py -m build
|
|
23
|
+
py -m twine upload dist/*
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After installation from PyPI:
|
|
27
|
+
|
|
28
|
+
```cmd
|
|
29
|
+
gemini-thonny
|
|
30
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Gemini Thonny
|
|
2
|
+
|
|
3
|
+
Installer package for the Gemini Thonny plugin.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Put `thonnycontrib.zip` next to this README, then run:
|
|
8
|
+
|
|
9
|
+
```cmd
|
|
10
|
+
py -m build
|
|
11
|
+
py -m twine upload dist/*
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
After installation from PyPI:
|
|
15
|
+
|
|
16
|
+
```cmd
|
|
17
|
+
gemini-thonny
|
|
18
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "gemini-thonny"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Gemini AI typing assistant installer for Thonny"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
|
|
13
|
+
[project.urls]
|
|
14
|
+
Homepage = "https://github.com/glaceonmonette1809-lgtm/gemini-thonny"
|
|
15
|
+
Repository = "https://github.com/glaceonmonette1809-lgtm/gemini-thonny"
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
gemini-thonny = "gemini_thonny.installer:main"
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
where = ["src"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import platform
|
|
3
|
+
import shutil
|
|
4
|
+
import tempfile
|
|
5
|
+
import urllib.request
|
|
6
|
+
import zipfile
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
PROJECT_ZIP = (
|
|
10
|
+
"https://github.com/glaceonmonette1809-lgtm/"
|
|
11
|
+
"gemini-thonny/archive/refs/heads/main.zip"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def find_thonny_site_packages():
|
|
15
|
+
home = Path.home()
|
|
16
|
+
|
|
17
|
+
if platform.system() == "Windows":
|
|
18
|
+
appdata = Path(os.environ.get(
|
|
19
|
+
"APPDATA", home / "AppData" / "Roaming"
|
|
20
|
+
))
|
|
21
|
+
thonny = appdata / "Thonny"
|
|
22
|
+
candidates = list(thonny.glob("plugins/Python*/site-packages"))
|
|
23
|
+
if candidates:
|
|
24
|
+
candidates.sort(key=lambda p: p.stat().st_mtime, reverse=True)
|
|
25
|
+
return candidates[0]
|
|
26
|
+
raise RuntimeError(
|
|
27
|
+
f"Không tìm thấy Thonny Python site-packages tại {thonny / 'plugins'}"
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
if platform.system() == "Darwin":
|
|
31
|
+
return home / "Library" / "Thonny" / "plugins"
|
|
32
|
+
|
|
33
|
+
return home / ".config" / "Thonny" / "plugins"
|
|
34
|
+
|
|
35
|
+
def main():
|
|
36
|
+
print("=== Gemini Thonny Installer ===")
|
|
37
|
+
|
|
38
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
39
|
+
temp = Path(temp_dir)
|
|
40
|
+
project_zip = temp / "project.zip"
|
|
41
|
+
|
|
42
|
+
print("[1/4] Downloading...")
|
|
43
|
+
urllib.request.urlretrieve(PROJECT_ZIP, project_zip)
|
|
44
|
+
|
|
45
|
+
print("[2/4] Extracting project...")
|
|
46
|
+
project_extract = temp / "project"
|
|
47
|
+
with zipfile.ZipFile(project_zip) as z:
|
|
48
|
+
z.extractall(project_extract)
|
|
49
|
+
|
|
50
|
+
project_dirs = list(project_extract.glob("gemini-thonny-*"))
|
|
51
|
+
if not project_dirs:
|
|
52
|
+
raise RuntimeError("Không tìm thấy project sau khi giải nén.")
|
|
53
|
+
|
|
54
|
+
plugin_zip = project_dirs[0] / "thonnycontrib.zip"
|
|
55
|
+
if not plugin_zip.exists():
|
|
56
|
+
raise RuntimeError("Không tìm thấy thonnycontrib.zip.")
|
|
57
|
+
|
|
58
|
+
print("[3/4] Extracting plugin...")
|
|
59
|
+
plugin_extract = temp / "plugin"
|
|
60
|
+
with zipfile.ZipFile(plugin_zip) as z:
|
|
61
|
+
z.extractall(plugin_extract)
|
|
62
|
+
|
|
63
|
+
source = plugin_extract / "thonnycontrib"
|
|
64
|
+
if not source.exists():
|
|
65
|
+
source = next(plugin_extract.rglob("thonnycontrib"), None)
|
|
66
|
+
|
|
67
|
+
if source is None or not source.is_dir():
|
|
68
|
+
raise RuntimeError("Không tìm thấy thư mục thonnycontrib trong ZIP.")
|
|
69
|
+
|
|
70
|
+
print("[4/4] Installing...")
|
|
71
|
+
destination_dir = find_thonny_site_packages()
|
|
72
|
+
destination_dir.mkdir(parents=True, exist_ok=True)
|
|
73
|
+
|
|
74
|
+
destination = destination_dir / "thonnycontrib"
|
|
75
|
+
if destination.exists():
|
|
76
|
+
shutil.rmtree(destination)
|
|
77
|
+
|
|
78
|
+
shutil.copytree(source, destination)
|
|
79
|
+
|
|
80
|
+
print("\nCÀI ĐẶT THÀNH CÔNG!")
|
|
81
|
+
print(f"Đã cài vào: {destination}")
|
|
82
|
+
print("Hãy khởi động lại Thonny.")
|
|
83
|
+
|
|
84
|
+
if __name__ == "__main__":
|
|
85
|
+
main()
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gemini-thonny
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Gemini AI typing assistant installer for Thonny
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/glaceonmonette1809-lgtm/gemini-thonny
|
|
7
|
+
Project-URL: Repository, https://github.com/glaceonmonette1809-lgtm/gemini-thonny
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# Gemini Thonny
|
|
14
|
+
|
|
15
|
+
Installer package for the Gemini Thonny plugin.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Put `thonnycontrib.zip` next to this README, then run:
|
|
20
|
+
|
|
21
|
+
```cmd
|
|
22
|
+
py -m build
|
|
23
|
+
py -m twine upload dist/*
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After installation from PyPI:
|
|
27
|
+
|
|
28
|
+
```cmd
|
|
29
|
+
gemini-thonny
|
|
30
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/gemini_thonny/__init__.py
|
|
5
|
+
src/gemini_thonny/installer.py
|
|
6
|
+
src/gemini_thonny.egg-info/PKG-INFO
|
|
7
|
+
src/gemini_thonny.egg-info/SOURCES.txt
|
|
8
|
+
src/gemini_thonny.egg-info/dependency_links.txt
|
|
9
|
+
src/gemini_thonny.egg-info/entry_points.txt
|
|
10
|
+
src/gemini_thonny.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gemini_thonny
|