ai-screenshooter 1.3.0__tar.gz → 1.5.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.
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/PKG-INFO +2 -1
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/PKG-INFO +2 -1
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/requires.txt +1 -0
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshot.py +34 -0
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/setup.py +3 -2
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/README.md +0 -0
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/SOURCES.txt +0 -0
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/dependency_links.txt +0 -0
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/entry_points.txt +0 -0
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/top_level.txt +0 -0
- {ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-screenshooter
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: A CLI tool to capture and send AI-powered screenshots
|
|
5
5
|
Home-page: https://github.com/tech4vision/ai-screenshoter
|
|
6
6
|
Author: Last Shot AI
|
|
@@ -13,6 +13,7 @@ Requires-Dist: pynput
|
|
|
13
13
|
Requires-Dist: requests
|
|
14
14
|
Requires-Dist: Pillow
|
|
15
15
|
Requires-Dist: pygetwindow
|
|
16
|
+
Requires-Dist: pyperclip
|
|
16
17
|
Dynamic: author
|
|
17
18
|
Dynamic: author-email
|
|
18
19
|
Dynamic: classifier
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-screenshooter
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: A CLI tool to capture and send AI-powered screenshots
|
|
5
5
|
Home-page: https://github.com/tech4vision/ai-screenshoter
|
|
6
6
|
Author: Last Shot AI
|
|
@@ -13,6 +13,7 @@ Requires-Dist: pynput
|
|
|
13
13
|
Requires-Dist: requests
|
|
14
14
|
Requires-Dist: Pillow
|
|
15
15
|
Requires-Dist: pygetwindow
|
|
16
|
+
Requires-Dist: pyperclip
|
|
16
17
|
Dynamic: author
|
|
17
18
|
Dynamic: author-email
|
|
18
19
|
Dynamic: classifier
|
|
@@ -8,6 +8,7 @@ import time
|
|
|
8
8
|
import subprocess
|
|
9
9
|
import requests
|
|
10
10
|
import pygetwindow as gw
|
|
11
|
+
import pyperclip
|
|
11
12
|
from pathlib import Path
|
|
12
13
|
from PIL import ImageGrab
|
|
13
14
|
from pynput import keyboard
|
|
@@ -269,6 +270,35 @@ def send_screenshots():
|
|
|
269
270
|
logger.error(f"Error uploading screenshots: {e}")
|
|
270
271
|
|
|
271
272
|
|
|
273
|
+
def send_clipboard_text():
|
|
274
|
+
"""Send clipboard content to Code tab API."""
|
|
275
|
+
if not API_TOKEN:
|
|
276
|
+
logger.error("No API token provided!")
|
|
277
|
+
return
|
|
278
|
+
|
|
279
|
+
try:
|
|
280
|
+
text = pyperclip.paste()
|
|
281
|
+
if not text or not text.strip():
|
|
282
|
+
logger.warning("Clipboard is empty.")
|
|
283
|
+
return
|
|
284
|
+
|
|
285
|
+
response = requests.post(
|
|
286
|
+
f"{API_URL}/chat",
|
|
287
|
+
headers={
|
|
288
|
+
"Authorization": f"Bearer {API_TOKEN}",
|
|
289
|
+
"Content-Type": "application/json"
|
|
290
|
+
},
|
|
291
|
+
json={"message": text}
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
if response.status_code == 200:
|
|
295
|
+
logger.info("Text sent to Code tab successfully.")
|
|
296
|
+
else:
|
|
297
|
+
logger.error(f"Failed to send text: {response.text}")
|
|
298
|
+
except Exception as e:
|
|
299
|
+
logger.error(f"Error sending clipboard text: {e}")
|
|
300
|
+
|
|
301
|
+
|
|
272
302
|
# ============ Keyboard Handlers ============
|
|
273
303
|
|
|
274
304
|
def on_press(key):
|
|
@@ -280,6 +310,9 @@ def on_press(key):
|
|
|
280
310
|
elif key == keyboard.Key.up and keyboard.Key.esc in current_keys:
|
|
281
311
|
logger.info("Sending all screenshots...")
|
|
282
312
|
send_screenshots()
|
|
313
|
+
elif key == keyboard.Key.right and keyboard.Key.esc in current_keys:
|
|
314
|
+
logger.info("Sending clipboard text to Code tab...")
|
|
315
|
+
send_clipboard_text()
|
|
283
316
|
except AttributeError:
|
|
284
317
|
pass
|
|
285
318
|
|
|
@@ -336,6 +369,7 @@ def cmd_start(args):
|
|
|
336
369
|
logger.info(f"Server: {server_mode} ({API_URL})")
|
|
337
370
|
logger.info("Press ESC + Down to capture a screenshot.")
|
|
338
371
|
logger.info("Press ESC + Up to send all stored screenshots.")
|
|
372
|
+
logger.info("Press ESC + Right to send clipboard text to Code tab.")
|
|
339
373
|
if not is_daemon:
|
|
340
374
|
logger.info("Running... (Press Ctrl + C to exit)")
|
|
341
375
|
|
|
@@ -2,14 +2,15 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="ai-screenshooter",
|
|
5
|
-
version="1.
|
|
5
|
+
version="1.5.0",
|
|
6
6
|
packages=find_packages(),
|
|
7
7
|
py_modules=["ai_screenshot"],
|
|
8
8
|
install_requires=[
|
|
9
9
|
"pynput",
|
|
10
10
|
"requests",
|
|
11
11
|
"Pillow",
|
|
12
|
-
"pygetwindow"
|
|
12
|
+
"pygetwindow",
|
|
13
|
+
"pyperclip"
|
|
13
14
|
],
|
|
14
15
|
entry_points={
|
|
15
16
|
"console_scripts": [
|
|
File without changes
|
|
File without changes
|
{ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{ai_screenshooter-1.3.0 → ai_screenshooter-1.5.0}/ai_screenshooter.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|