ai-screenshooter 1.0.1__tar.gz → 1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-screenshooter
3
- Version: 1.0.1
3
+ Version: 1.1.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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-screenshooter
3
- Version: 1.0.1
3
+ Version: 1.1.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
@@ -56,7 +56,7 @@ def get_active_window_bounds():
56
56
 
57
57
  def capture_screenshot():
58
58
  global screenshot_list
59
- screenshot_path = f"/tmp/screenshot_{len(screenshot_list)}.jpg"
59
+ screenshot_path = f"screenshot_{len(screenshot_list)}.jpg"
60
60
 
61
61
  try:
62
62
  print("🔄 Refreshing active window detection...")
@@ -113,25 +113,22 @@ def send_screenshots():
113
113
  print(f"❌ Upload failed: {response.text}")
114
114
 
115
115
  def on_press(key):
116
+ current_keys.add(key)
116
117
  try:
117
- name = key.char.lower() if hasattr(key, 'char') and key.char else str(key).lower()
118
- except Exception:
119
- name = str(key).lower()
120
- current_keys.add(name)
121
-
122
- if any("ctrl" in k for k in current_keys) and any("shift" in k for k in current_keys) and 's' in current_keys:
123
- print("📸 Capturing screenshot...")
124
- capture_screenshot()
125
- elif any("ctrl" in k for k in current_keys) and any("shift" in k for k in current_keys) and 't' in current_keys:
126
- print("📤 Sending all screenshots...")
127
- send_screenshots()
118
+ if key == keyboard.KeyCode.from_char('c') and keyboard.Key.esc in current_keys:
119
+ print("📸 Capturing screenshot...")
120
+ capture_screenshot()
121
+ elif key == keyboard.KeyCode.from_char('v') and keyboard.Key.esc in current_keys:
122
+ print("📤 Sending all screenshots...")
123
+ send_screenshots()
124
+ except AttributeError:
125
+ pass
128
126
 
129
127
  def on_release(key):
130
128
  try:
131
- name = key.char.lower() if hasattr(key, 'char') and key.char else str(key).lower()
132
- except Exception:
133
- name = str(key).lower()
134
- current_keys.discard(name)
129
+ current_keys.remove(key)
130
+ except KeyError:
131
+ pass
135
132
 
136
133
  def main():
137
134
  parser = argparse.ArgumentParser(description="AI Screenshot CLI")
@@ -143,8 +140,8 @@ def main():
143
140
  API_TOKEN = args.token
144
141
 
145
142
  print("📸 AI Screenshot CLI started.")
146
- print("✅ Press Ctrl + Shift + S to capture a screenshot.")
147
- print("✅ Press Ctrl + Shift + T to send all stored screenshots.")
143
+ print("✅ Press ESC + C to capture a screenshot.")
144
+ print("✅ Press ESC + V to send all stored screenshots.")
148
145
  print("📌 Running... (Press Ctrl + C to exit)")
149
146
 
150
147
  # Listen for hotkeys using pynput
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="ai-screenshooter",
5
- version="1.0.1",
5
+ version="1.1.0",
6
6
  packages=find_packages(),
7
7
  py_modules=["ai_screenshot"],
8
8
  install_requires=[