snipstax 2.0.2__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.
Potentially problematic release.
This version of snipstax might be problematic. Click here for more details.
- snipstax-2.0.2/LICENSE +21 -0
- snipstax-2.0.2/PKG-INFO +232 -0
- snipstax-2.0.2/README.md +184 -0
- snipstax-2.0.2/pyproject.toml +76 -0
- snipstax-2.0.2/setup.cfg +4 -0
- snipstax-2.0.2/src/snipstax/__init__.py +3 -0
- snipstax-2.0.2/src/snipstax/__main__.py +4 -0
- snipstax-2.0.2/src/snipstax/main.py +3625 -0
- snipstax-2.0.2/src/snipstax.egg-info/PKG-INFO +232 -0
- snipstax-2.0.2/src/snipstax.egg-info/SOURCES.txt +12 -0
- snipstax-2.0.2/src/snipstax.egg-info/dependency_links.txt +1 -0
- snipstax-2.0.2/src/snipstax.egg-info/entry_points.txt +5 -0
- snipstax-2.0.2/src/snipstax.egg-info/requires.txt +24 -0
- snipstax-2.0.2/src/snipstax.egg-info/top_level.txt +1 -0
snipstax-2.0.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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 (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, 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, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
snipstax-2.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: snipstax
|
|
3
|
+
Version: 2.0.2
|
|
4
|
+
Summary: Background Windows system tray screenshot, virtual paste-stack, and open-weight OCR tool
|
|
5
|
+
Author: johnjg75dev
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/johnjg75dev/SnipStax
|
|
8
|
+
Project-URL: Repository, https://github.com/johnjg75dev/SnipStax
|
|
9
|
+
Project-URL: Releases, https://github.com/johnjg75dev/SnipStax/releases
|
|
10
|
+
Project-URL: Issues, https://github.com/johnjg75dev/SnipStax/issues
|
|
11
|
+
Keywords: screenshot,clipboard,ocr,windows,tray,snipping-tool,stack
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Win32 (MS Windows)
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: pillow>=10.0.0
|
|
28
|
+
Requires-Dist: mss>=9.0.0
|
|
29
|
+
Requires-Dist: pystray>=0.19.5
|
|
30
|
+
Requires-Dist: pynput>=1.7.7
|
|
31
|
+
Provides-Extra: rapidocr
|
|
32
|
+
Requires-Dist: rapidocr>=2.0.0; extra == "rapidocr"
|
|
33
|
+
Requires-Dist: onnxruntime>=1.18.0; extra == "rapidocr"
|
|
34
|
+
Requires-Dist: numpy>=1.26.0; extra == "rapidocr"
|
|
35
|
+
Provides-Extra: vlm
|
|
36
|
+
Requires-Dist: torch>=2.4.0; extra == "vlm"
|
|
37
|
+
Requires-Dist: torchvision>=0.19.0; extra == "vlm"
|
|
38
|
+
Requires-Dist: transformers>=5.0.0; extra == "vlm"
|
|
39
|
+
Requires-Dist: accelerate>=1.0.0; extra == "vlm"
|
|
40
|
+
Requires-Dist: docling-core>=2.0.0; extra == "vlm"
|
|
41
|
+
Provides-Extra: all
|
|
42
|
+
Requires-Dist: snipstax[rapidocr,vlm]; extra == "all"
|
|
43
|
+
Provides-Extra: build
|
|
44
|
+
Requires-Dist: pyinstaller>=6.0.0; extra == "build"
|
|
45
|
+
Requires-Dist: build>=1.2.0; extra == "build"
|
|
46
|
+
Requires-Dist: twine>=6.0.0; extra == "build"
|
|
47
|
+
Dynamic: license-file
|
|
48
|
+
|
|
49
|
+
# SnipStax (SnipStack OCR)
|
|
50
|
+
|
|
51
|
+
[](https://pypi.org/project/snipstax/)
|
|
52
|
+
[](https://pypi.org/project/snipstax/)
|
|
53
|
+
[](https://github.com/johnjg75dev/SnipStax/actions/workflows/ci.yml)
|
|
54
|
+
[](https://github.com/johnjg75dev/SnipStax/actions/workflows/release.yml)
|
|
55
|
+
[](https://github.com/johnjg75dev/SnipStax/releases/latest)
|
|
56
|
+
[](https://github.com/johnjg75dev/SnipStax/releases)
|
|
57
|
+
[](https://github.com/johnjg75dev/SnipStax/releases)
|
|
58
|
+

|
|
59
|
+
[](https://github.com/johnjg75dev/SnipStax/blob/main/LICENSE)
|
|
60
|
+
|
|
61
|
+
**[PyPI Project](https://pypi.org/project/snipstax/)** • **[Latest Stable Release](https://github.com/johnjg75dev/SnipStax/releases/latest)** • **[All Releases & Alpha/Beta Builds](https://github.com/johnjg75dev/SnipStax/releases)** • **[Release Pipeline Runs](https://github.com/johnjg75dev/SnipStax/actions/workflows/release.yml)** • **[CI Preview Builds](https://github.com/johnjg75dev/SnipStax/actions/workflows/ci.yml)**
|
|
62
|
+
|
|
63
|
+
A lightweight, background Windows system tray screenshot, **virtual paste-stack**, and **open-weight OCR** utility—installable directly from **PyPI** (`pip install snipstax`) or via standalone Windows `.msi` / `.exe` packages.
|
|
64
|
+
|
|
65
|
+
Capture directly to the clipboard with zero disk writes, queue multiple screenshots onto a smart stack that advances automatically on `Ctrl+V`, rewind pasted captures, or drag-select any screen region for instant local or remote AI OCR.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Quick Start (Install via PyPI)
|
|
70
|
+
|
|
71
|
+
Requires **Windows 10 / 11** and **Python 3.10–3.13**:
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
# 1. Core Tray App + Remote OCR Endpoints (smallest install):
|
|
75
|
+
pip install snipstax
|
|
76
|
+
|
|
77
|
+
# 2. OR Core + Fast Offline CPU OCR (RapidOCR ONNX, no GPU needed):
|
|
78
|
+
pip install "snipstax[rapidocr]"
|
|
79
|
+
|
|
80
|
+
# 3. OR Core + Local Open-Weight Hugging Face OCR VLMs:
|
|
81
|
+
pip install "snipstax[vlm]"
|
|
82
|
+
```
|
|
83
|
+
*(Optional: For NVIDIA GPU acceleration with `snipstax[vlm]`, install the CUDA-enabled PyTorch wheel matching your driver from [pytorch.org](https://pytorch.org/get-started/locally/). Or use `pipx install "snipstax[rapidocr]"` to isolate it globally.)*
|
|
84
|
+
|
|
85
|
+
### Launching
|
|
86
|
+
```powershell
|
|
87
|
+
snipstax # Launches silently in the system tray (no console window)
|
|
88
|
+
snipstax-console # Launches with a console window attached for debugging
|
|
89
|
+
pythonw -m snipstax # Module invocation
|
|
90
|
+
```
|
|
91
|
+
To create a Windows Desktop shortcut: right-click the tray icon → **Settings → General & Folders → Create Desktop Shortcut**.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Standalone Windows Downloads (No Python Required)
|
|
96
|
+
|
|
97
|
+
Download prebuilt binaries from **[GitHub Releases](https://github.com/johnjg75dev/SnipStax/releases/latest)** *(or view Alpha/Beta builds on **[All Releases](https://github.com/johnjg75dev/SnipStax/releases)**)*. All release packages strip debug symbols (`*.pdb`), C++ headers, and non-runtime files and use maximum compression:
|
|
98
|
+
|
|
99
|
+
| Variant | Packages Provided | Included OCR Support | Best For |
|
|
100
|
+
|---|---|---|---|
|
|
101
|
+
| **`core-remote`** | Portable `.exe` + **`.msi` Installer** | **Remote Endpoints only** (Ollama, vLLM, LM Studio, OpenRouter, OpenAI) | Fastest startup, smallest footprint |
|
|
102
|
+
| **`rapidocr-cpu`** | Portable `.exe` + **`.msi` Installer** | **Offline RapidOCR (CPU ONNX)** + Remote Endpoints | Best standalone offline CPU OCR (no GPU needed) |
|
|
103
|
+
| **`vlm-cpu`** | Ultra-compressed `.7z` + **`.msi` Installer** *(if <2 GiB)* | **PyTorch CPU + All Local VLMs** + RapidOCR + Remote | Local HF OCR models without an NVIDIA GPU |
|
|
104
|
+
| **`vlm-cuda-cu128`** | Ultra-compressed `.7z` *(split `.7z.001` if >2 GiB)* | **PyTorch CUDA 12.8 + All Local VLMs** + RapidOCR + Remote | Full NVIDIA GPU acceleration *(extract with 7-Zip)* |
|
|
105
|
+
|
|
106
|
+
> **Notes:**
|
|
107
|
+
> - **`.msi` Installers** install to `C:\Program Files\SnipStack OCR\`, add Start Menu & Desktop shortcuts, and support in-place upgrades.
|
|
108
|
+
> - **Local Hugging Face VLM weights** download on first use to `%USERPROFILE%\.cache\huggingface\`.
|
|
109
|
+
> - **Checksums:** Every release includes `SHA256SUMS.txt` to verify downloads.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Features
|
|
114
|
+
|
|
115
|
+
- **Console-Free Tray Application:** Runs silently via `snipstax`, `pythonw -m snipstax`, portable `.exe`, or `.msi` with single-instance protection, dynamic tray stack counter badge, and focus-safe corner toast notifications (`WS_EX_NOACTIVATE`).
|
|
116
|
+
- **Direct-to-Clipboard Captures (No Disk Write):**
|
|
117
|
+
- **Fullscreen:** Capture the monitor under your cursor, primary monitor, or full virtual multi-monitor desktop straight to `CF_DIB`.
|
|
118
|
+
- **Active Application Window:** Captures clean DWM visible window bounds (without invisible Windows drop-shadow margins).
|
|
119
|
+
- **Drag Region Overlay:** Windows 11 Snipping Tool–style multi-monitor overlay with dimmed backdrop, live pixel dimensions, floating mode HUD (`1`–`4`), and optional post-drag action bar.
|
|
120
|
+
- **Virtual Screenshot Stack & Rewind:**
|
|
121
|
+
- Queue multiple Fullscreen, Window, or Region captures onto a stack (**LIFO** or **FIFO**).
|
|
122
|
+
- Automatically detects `Ctrl+V` / `Shift+Insert`, waits cleanly for the target app to finish reading, pops the pasted image, and loads the next screenshot onto the clipboard until the stack reaches `0`.
|
|
123
|
+
- Uses Windows `GetClipboardSequenceNumber()` so normal `Ctrl+C` / `Ctrl+V` text workflows won't accidentally pop your queued screenshots.
|
|
124
|
+
- Optionally saves every shot in the session into a timestamped `Session_YYYY-MM-DD_HH-MM-SS` folder until the stack hits `0`.
|
|
125
|
+
- **Rewind** popped screenshots back onto the stack/clipboard by hotkey, tray menu (`1`, `2`, `3`, `5`, `All`), or via the built-in **Stack & Session Viewer** with thumbnails.
|
|
126
|
+
- **Drag-to-OCR (6 Open-Weight Local Tiers + Custom HF + Remote APIs):**
|
|
127
|
+
- Supports CPU-instant ONNX OCR (`RapidOCR`), compact document/math VLMs (`Granite-Docling 258M`, `GOT-OCR 2.0`, `GLM-OCR 0.9B`, `LightOnOCR-2 1B`), generalist multilingual VLMs (`Qwen3-VL 2B`), any **Custom Hugging Face Repo ID**, and **Remote Endpoints** (Ollama, vLLM, LM Studio, OpenRouter, OpenAI, or custom JSON HTTP).
|
|
128
|
+
- Editable OCR Result popup with preview thumbnail, `.txt` export, clipboard sync, and one-click **Re-run with another model** on the same snip.
|
|
129
|
+
- **Live Settings & Hotkey Recorder:**
|
|
130
|
+
- Configure folders, formats (`PNG`/`JPEG`), stack order, paste delay, OCR models, and bind custom hotkeys with a point-and-press recorder.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Default Hotkeys
|
|
135
|
+
|
|
136
|
+
All shortcuts are customizable in **Tray Icon → Settings → Hotkeys** (or cleared if unused).
|
|
137
|
+
|
|
138
|
+
| Action | Default Hotkey |
|
|
139
|
+
|---|---|
|
|
140
|
+
| Fullscreen → Clipboard *(RAM only)* | `Ctrl + Alt + 1` |
|
|
141
|
+
| Fullscreen → Virtual Stack | `Ctrl + Alt + Shift + 1` |
|
|
142
|
+
| Active App Window → Clipboard *(RAM only)* | `Ctrl + Alt + 2` |
|
|
143
|
+
| Active App Window → Virtual Stack | `Ctrl + Alt + Shift + 2` |
|
|
144
|
+
| Drag Region → Clipboard *(RAM only)* | `Ctrl + Alt + 3` |
|
|
145
|
+
| Drag Region → Virtual Stack | `Ctrl + Alt + Shift + 3` |
|
|
146
|
+
| Drag Region → Save Folder | `Ctrl + Alt + 4` |
|
|
147
|
+
| Drag Region → Snip Action Menu | `Ctrl + Alt + S` |
|
|
148
|
+
| Drag Region → OCR | `Ctrl + Alt + O` |
|
|
149
|
+
| Rewind Stack *(configured N spots)* | `Ctrl + Alt + Z` |
|
|
150
|
+
| Pop / Advance Stack Manually | `Ctrl + Alt + X` |
|
|
151
|
+
|
|
152
|
+
### Inside the Drag-Region Overlay
|
|
153
|
+
- **Switch modes on the fly:** Press `1` (Clipboard), `2` (+Stack), `3` (Save Folder), `4` (OCR), or click the top-center floating HUD.
|
|
154
|
+
- **Cancel:** Press `Esc` or **Right-Click**.
|
|
155
|
+
- **Confirm selection (when action bar is visible):** Press `Enter` or click **Copy / +Stack / Save / OCR**.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## How the Virtual Stack Works
|
|
160
|
+
|
|
161
|
+
1. Capture multiple screenshots using any **`... -> Stack`** hotkey (`Fullscreen`, `Active Window`, or `Drag Region`).
|
|
162
|
+
2. If **Save stack screenshots into a timestamped Session folder** is enabled, every shot is saved to:
|
|
163
|
+
```text
|
|
164
|
+
<Base Save Folder>\Session_YYYY-MM-DD_HH-MM-SS\
|
|
165
|
+
```
|
|
166
|
+
3. The next screenshot in the stack (**top** in `LIFO`, **front** in `FIFO`) is automatically placed on your Windows clipboard.
|
|
167
|
+
4. Paste normally with `Ctrl+V` (or `Shift+Insert`). After a brief configurable delay (`250 ms` default), the pasted item moves to **Pasted History** and the next screenshot is loaded onto the clipboard.
|
|
168
|
+
5. When the stack reaches `0`, the clipboard is optionally cleared (and the next stack capture begins a fresh session).
|
|
169
|
+
6. **Need to re-paste something?** Press `Ctrl+Alt+Z` (or use **Tray → Rewind** / **View Stack & History...**) to push popped items back onto the active stack and clipboard.
|
|
170
|
+
7. **Copied normal text mid-session?** Because the stack tracks `GetClipboardSequenceNumber()`, pasting unrelated copied text will **not** pop your stack. Use **Tray → Restore Current Top to Clipboard** when you're ready to resume pasting screenshots.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Supported Open-Weight OCR Models & Endpoints
|
|
175
|
+
|
|
176
|
+
Configure your backend in **Settings → OCR & Open-Weight Models**:
|
|
177
|
+
|
|
178
|
+
| Tier / Model | Approx. Size | Hardware | Best For |
|
|
179
|
+
|---|---|---|---|
|
|
180
|
+
| **RapidOCR (PP-OCR ONNX)** | ~18 MB | CPU (<0.3s, Zero VRAM) | Clean UI text, code, quick everyday snippets |
|
|
181
|
+
| **`ibm-granite/granite-docling-258M`** | ~0.55 GB | CPU or 2 GB VRAM | Compact document layouts, tables, equations, code |
|
|
182
|
+
| **`stepfun-ai/GOT-OCR-2.0-hf`** | ~1.2 GB | 2–4 GB VRAM / CPU | Dense multi-line text, math formulas, documents |
|
|
183
|
+
| **`zai-org/GLM-OCR`** | ~1.8 GB | 4 GB VRAM | SOTA compact 0.9B OCR (tables, formulas, mixed layouts) |
|
|
184
|
+
| **`lightonai/LightOnOCR-2-1B`** | ~2.0 GB | 4–6 GB VRAM | Fast end-to-end Markdown & LaTeX transcription |
|
|
185
|
+
| **`Qwen/Qwen3-VL-2B-Instruct`** | ~4.5 GB | 6–8 GB VRAM | 32+ languages, blurry/tilted/noisy screenshots |
|
|
186
|
+
| **Custom Hugging Face Repo** | Varies | Varies | Any HF VLM (e.g., `PaddlePaddle/PaddleOCR-VL-1.6`, `Qwen/Qwen2.5-VL-3B-Instruct`) |
|
|
187
|
+
| **Remote Endpoint** | 0 MB local | Server / API | **OpenAI-compatible** (`/v1/chat/completions`), **Ollama** (`/api/chat`), **vLLM**, **LM Studio**, **OpenRouter**, or custom JSON |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Repository Structure
|
|
192
|
+
|
|
193
|
+
```text
|
|
194
|
+
.
|
|
195
|
+
├── .github/
|
|
196
|
+
│ └── workflows/
|
|
197
|
+
│ ├── ci.yml # Fast PR/commit compile check & preview EXEs
|
|
198
|
+
│ └── release.yml # Bitwise multi-variant builds, WiX MSI & GitHub Release
|
|
199
|
+
├── src/
|
|
200
|
+
│ └── snipstax/
|
|
201
|
+
│ ├── __init__.py # Package version (__version__)
|
|
202
|
+
│ ├── __main__.py # Module entry point (pythonw -m snipstax)
|
|
203
|
+
│ └── main.py # Main tray app, snip overlay, virtual stack & OCR engine
|
|
204
|
+
├── pyproject.toml # PEP 621 / PEP 639 package config & gui-scripts entry points
|
|
205
|
+
├── requirements.txt
|
|
206
|
+
├── requirements-rapidocr.txt
|
|
207
|
+
├── requirements-vlm.txt
|
|
208
|
+
├── .gitignore
|
|
209
|
+
├── LICENSE
|
|
210
|
+
└── README.md
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Development, Local Builds & Cutting Releases
|
|
216
|
+
|
|
217
|
+
### Develop from Source
|
|
218
|
+
```powershell
|
|
219
|
+
git clone https://github.com/johnjg75dev/SnipStax.git
|
|
220
|
+
cd SnipStax
|
|
221
|
+
pip install -e ".[rapidocr]"
|
|
222
|
+
snipstax
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Configuration, Logs & Troubleshooting
|
|
228
|
+
|
|
229
|
+
- **Settings File:** `%APPDATA%\SnipStackOCR\settings.json`
|
|
230
|
+
- **Log File:** `%LOCALAPPDATA%\SnipStackOCR\app.log` *(check here if running silently via `snipstax`, `pythonw.exe`, or `.exe`)*
|
|
231
|
+
- **Windows Defender False Positives:** Unsigned PyInstaller `--onefile` executables using global keyboard hooks (`pynput`) can occasionally trigger heuristic warnings. Use `pip install snipstax`, the `.msi` installer, or add a folder exclusion.
|
|
232
|
+
- **`PrintScreen` Hotkey:** Windows 11 reserves `PrintScreen` for the built-in Snipping Tool by default. Either keep the default `Ctrl+Alt+...` hotkeys or disable *"Use the Print screen key to open screen capture"* in **Windows Settings → Accessibility → Keyboard**.
|
snipstax-2.0.2/README.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# SnipStax (SnipStack OCR)
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/snipstax/)
|
|
4
|
+
[](https://pypi.org/project/snipstax/)
|
|
5
|
+
[](https://github.com/johnjg75dev/SnipStax/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/johnjg75dev/SnipStax/actions/workflows/release.yml)
|
|
7
|
+
[](https://github.com/johnjg75dev/SnipStax/releases/latest)
|
|
8
|
+
[](https://github.com/johnjg75dev/SnipStax/releases)
|
|
9
|
+
[](https://github.com/johnjg75dev/SnipStax/releases)
|
|
10
|
+

|
|
11
|
+
[](https://github.com/johnjg75dev/SnipStax/blob/main/LICENSE)
|
|
12
|
+
|
|
13
|
+
**[PyPI Project](https://pypi.org/project/snipstax/)** • **[Latest Stable Release](https://github.com/johnjg75dev/SnipStax/releases/latest)** • **[All Releases & Alpha/Beta Builds](https://github.com/johnjg75dev/SnipStax/releases)** • **[Release Pipeline Runs](https://github.com/johnjg75dev/SnipStax/actions/workflows/release.yml)** • **[CI Preview Builds](https://github.com/johnjg75dev/SnipStax/actions/workflows/ci.yml)**
|
|
14
|
+
|
|
15
|
+
A lightweight, background Windows system tray screenshot, **virtual paste-stack**, and **open-weight OCR** utility—installable directly from **PyPI** (`pip install snipstax`) or via standalone Windows `.msi` / `.exe` packages.
|
|
16
|
+
|
|
17
|
+
Capture directly to the clipboard with zero disk writes, queue multiple screenshots onto a smart stack that advances automatically on `Ctrl+V`, rewind pasted captures, or drag-select any screen region for instant local or remote AI OCR.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Quick Start (Install via PyPI)
|
|
22
|
+
|
|
23
|
+
Requires **Windows 10 / 11** and **Python 3.10–3.13**:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
# 1. Core Tray App + Remote OCR Endpoints (smallest install):
|
|
27
|
+
pip install snipstax
|
|
28
|
+
|
|
29
|
+
# 2. OR Core + Fast Offline CPU OCR (RapidOCR ONNX, no GPU needed):
|
|
30
|
+
pip install "snipstax[rapidocr]"
|
|
31
|
+
|
|
32
|
+
# 3. OR Core + Local Open-Weight Hugging Face OCR VLMs:
|
|
33
|
+
pip install "snipstax[vlm]"
|
|
34
|
+
```
|
|
35
|
+
*(Optional: For NVIDIA GPU acceleration with `snipstax[vlm]`, install the CUDA-enabled PyTorch wheel matching your driver from [pytorch.org](https://pytorch.org/get-started/locally/). Or use `pipx install "snipstax[rapidocr]"` to isolate it globally.)*
|
|
36
|
+
|
|
37
|
+
### Launching
|
|
38
|
+
```powershell
|
|
39
|
+
snipstax # Launches silently in the system tray (no console window)
|
|
40
|
+
snipstax-console # Launches with a console window attached for debugging
|
|
41
|
+
pythonw -m snipstax # Module invocation
|
|
42
|
+
```
|
|
43
|
+
To create a Windows Desktop shortcut: right-click the tray icon → **Settings → General & Folders → Create Desktop Shortcut**.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Standalone Windows Downloads (No Python Required)
|
|
48
|
+
|
|
49
|
+
Download prebuilt binaries from **[GitHub Releases](https://github.com/johnjg75dev/SnipStax/releases/latest)** *(or view Alpha/Beta builds on **[All Releases](https://github.com/johnjg75dev/SnipStax/releases)**)*. All release packages strip debug symbols (`*.pdb`), C++ headers, and non-runtime files and use maximum compression:
|
|
50
|
+
|
|
51
|
+
| Variant | Packages Provided | Included OCR Support | Best For |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| **`core-remote`** | Portable `.exe` + **`.msi` Installer** | **Remote Endpoints only** (Ollama, vLLM, LM Studio, OpenRouter, OpenAI) | Fastest startup, smallest footprint |
|
|
54
|
+
| **`rapidocr-cpu`** | Portable `.exe` + **`.msi` Installer** | **Offline RapidOCR (CPU ONNX)** + Remote Endpoints | Best standalone offline CPU OCR (no GPU needed) |
|
|
55
|
+
| **`vlm-cpu`** | Ultra-compressed `.7z` + **`.msi` Installer** *(if <2 GiB)* | **PyTorch CPU + All Local VLMs** + RapidOCR + Remote | Local HF OCR models without an NVIDIA GPU |
|
|
56
|
+
| **`vlm-cuda-cu128`** | Ultra-compressed `.7z` *(split `.7z.001` if >2 GiB)* | **PyTorch CUDA 12.8 + All Local VLMs** + RapidOCR + Remote | Full NVIDIA GPU acceleration *(extract with 7-Zip)* |
|
|
57
|
+
|
|
58
|
+
> **Notes:**
|
|
59
|
+
> - **`.msi` Installers** install to `C:\Program Files\SnipStack OCR\`, add Start Menu & Desktop shortcuts, and support in-place upgrades.
|
|
60
|
+
> - **Local Hugging Face VLM weights** download on first use to `%USERPROFILE%\.cache\huggingface\`.
|
|
61
|
+
> - **Checksums:** Every release includes `SHA256SUMS.txt` to verify downloads.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Features
|
|
66
|
+
|
|
67
|
+
- **Console-Free Tray Application:** Runs silently via `snipstax`, `pythonw -m snipstax`, portable `.exe`, or `.msi` with single-instance protection, dynamic tray stack counter badge, and focus-safe corner toast notifications (`WS_EX_NOACTIVATE`).
|
|
68
|
+
- **Direct-to-Clipboard Captures (No Disk Write):**
|
|
69
|
+
- **Fullscreen:** Capture the monitor under your cursor, primary monitor, or full virtual multi-monitor desktop straight to `CF_DIB`.
|
|
70
|
+
- **Active Application Window:** Captures clean DWM visible window bounds (without invisible Windows drop-shadow margins).
|
|
71
|
+
- **Drag Region Overlay:** Windows 11 Snipping Tool–style multi-monitor overlay with dimmed backdrop, live pixel dimensions, floating mode HUD (`1`–`4`), and optional post-drag action bar.
|
|
72
|
+
- **Virtual Screenshot Stack & Rewind:**
|
|
73
|
+
- Queue multiple Fullscreen, Window, or Region captures onto a stack (**LIFO** or **FIFO**).
|
|
74
|
+
- Automatically detects `Ctrl+V` / `Shift+Insert`, waits cleanly for the target app to finish reading, pops the pasted image, and loads the next screenshot onto the clipboard until the stack reaches `0`.
|
|
75
|
+
- Uses Windows `GetClipboardSequenceNumber()` so normal `Ctrl+C` / `Ctrl+V` text workflows won't accidentally pop your queued screenshots.
|
|
76
|
+
- Optionally saves every shot in the session into a timestamped `Session_YYYY-MM-DD_HH-MM-SS` folder until the stack hits `0`.
|
|
77
|
+
- **Rewind** popped screenshots back onto the stack/clipboard by hotkey, tray menu (`1`, `2`, `3`, `5`, `All`), or via the built-in **Stack & Session Viewer** with thumbnails.
|
|
78
|
+
- **Drag-to-OCR (6 Open-Weight Local Tiers + Custom HF + Remote APIs):**
|
|
79
|
+
- Supports CPU-instant ONNX OCR (`RapidOCR`), compact document/math VLMs (`Granite-Docling 258M`, `GOT-OCR 2.0`, `GLM-OCR 0.9B`, `LightOnOCR-2 1B`), generalist multilingual VLMs (`Qwen3-VL 2B`), any **Custom Hugging Face Repo ID**, and **Remote Endpoints** (Ollama, vLLM, LM Studio, OpenRouter, OpenAI, or custom JSON HTTP).
|
|
80
|
+
- Editable OCR Result popup with preview thumbnail, `.txt` export, clipboard sync, and one-click **Re-run with another model** on the same snip.
|
|
81
|
+
- **Live Settings & Hotkey Recorder:**
|
|
82
|
+
- Configure folders, formats (`PNG`/`JPEG`), stack order, paste delay, OCR models, and bind custom hotkeys with a point-and-press recorder.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Default Hotkeys
|
|
87
|
+
|
|
88
|
+
All shortcuts are customizable in **Tray Icon → Settings → Hotkeys** (or cleared if unused).
|
|
89
|
+
|
|
90
|
+
| Action | Default Hotkey |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Fullscreen → Clipboard *(RAM only)* | `Ctrl + Alt + 1` |
|
|
93
|
+
| Fullscreen → Virtual Stack | `Ctrl + Alt + Shift + 1` |
|
|
94
|
+
| Active App Window → Clipboard *(RAM only)* | `Ctrl + Alt + 2` |
|
|
95
|
+
| Active App Window → Virtual Stack | `Ctrl + Alt + Shift + 2` |
|
|
96
|
+
| Drag Region → Clipboard *(RAM only)* | `Ctrl + Alt + 3` |
|
|
97
|
+
| Drag Region → Virtual Stack | `Ctrl + Alt + Shift + 3` |
|
|
98
|
+
| Drag Region → Save Folder | `Ctrl + Alt + 4` |
|
|
99
|
+
| Drag Region → Snip Action Menu | `Ctrl + Alt + S` |
|
|
100
|
+
| Drag Region → OCR | `Ctrl + Alt + O` |
|
|
101
|
+
| Rewind Stack *(configured N spots)* | `Ctrl + Alt + Z` |
|
|
102
|
+
| Pop / Advance Stack Manually | `Ctrl + Alt + X` |
|
|
103
|
+
|
|
104
|
+
### Inside the Drag-Region Overlay
|
|
105
|
+
- **Switch modes on the fly:** Press `1` (Clipboard), `2` (+Stack), `3` (Save Folder), `4` (OCR), or click the top-center floating HUD.
|
|
106
|
+
- **Cancel:** Press `Esc` or **Right-Click**.
|
|
107
|
+
- **Confirm selection (when action bar is visible):** Press `Enter` or click **Copy / +Stack / Save / OCR**.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## How the Virtual Stack Works
|
|
112
|
+
|
|
113
|
+
1. Capture multiple screenshots using any **`... -> Stack`** hotkey (`Fullscreen`, `Active Window`, or `Drag Region`).
|
|
114
|
+
2. If **Save stack screenshots into a timestamped Session folder** is enabled, every shot is saved to:
|
|
115
|
+
```text
|
|
116
|
+
<Base Save Folder>\Session_YYYY-MM-DD_HH-MM-SS\
|
|
117
|
+
```
|
|
118
|
+
3. The next screenshot in the stack (**top** in `LIFO`, **front** in `FIFO`) is automatically placed on your Windows clipboard.
|
|
119
|
+
4. Paste normally with `Ctrl+V` (or `Shift+Insert`). After a brief configurable delay (`250 ms` default), the pasted item moves to **Pasted History** and the next screenshot is loaded onto the clipboard.
|
|
120
|
+
5. When the stack reaches `0`, the clipboard is optionally cleared (and the next stack capture begins a fresh session).
|
|
121
|
+
6. **Need to re-paste something?** Press `Ctrl+Alt+Z` (or use **Tray → Rewind** / **View Stack & History...**) to push popped items back onto the active stack and clipboard.
|
|
122
|
+
7. **Copied normal text mid-session?** Because the stack tracks `GetClipboardSequenceNumber()`, pasting unrelated copied text will **not** pop your stack. Use **Tray → Restore Current Top to Clipboard** when you're ready to resume pasting screenshots.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Supported Open-Weight OCR Models & Endpoints
|
|
127
|
+
|
|
128
|
+
Configure your backend in **Settings → OCR & Open-Weight Models**:
|
|
129
|
+
|
|
130
|
+
| Tier / Model | Approx. Size | Hardware | Best For |
|
|
131
|
+
|---|---|---|---|
|
|
132
|
+
| **RapidOCR (PP-OCR ONNX)** | ~18 MB | CPU (<0.3s, Zero VRAM) | Clean UI text, code, quick everyday snippets |
|
|
133
|
+
| **`ibm-granite/granite-docling-258M`** | ~0.55 GB | CPU or 2 GB VRAM | Compact document layouts, tables, equations, code |
|
|
134
|
+
| **`stepfun-ai/GOT-OCR-2.0-hf`** | ~1.2 GB | 2–4 GB VRAM / CPU | Dense multi-line text, math formulas, documents |
|
|
135
|
+
| **`zai-org/GLM-OCR`** | ~1.8 GB | 4 GB VRAM | SOTA compact 0.9B OCR (tables, formulas, mixed layouts) |
|
|
136
|
+
| **`lightonai/LightOnOCR-2-1B`** | ~2.0 GB | 4–6 GB VRAM | Fast end-to-end Markdown & LaTeX transcription |
|
|
137
|
+
| **`Qwen/Qwen3-VL-2B-Instruct`** | ~4.5 GB | 6–8 GB VRAM | 32+ languages, blurry/tilted/noisy screenshots |
|
|
138
|
+
| **Custom Hugging Face Repo** | Varies | Varies | Any HF VLM (e.g., `PaddlePaddle/PaddleOCR-VL-1.6`, `Qwen/Qwen2.5-VL-3B-Instruct`) |
|
|
139
|
+
| **Remote Endpoint** | 0 MB local | Server / API | **OpenAI-compatible** (`/v1/chat/completions`), **Ollama** (`/api/chat`), **vLLM**, **LM Studio**, **OpenRouter**, or custom JSON |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Repository Structure
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
.
|
|
147
|
+
├── .github/
|
|
148
|
+
│ └── workflows/
|
|
149
|
+
│ ├── ci.yml # Fast PR/commit compile check & preview EXEs
|
|
150
|
+
│ └── release.yml # Bitwise multi-variant builds, WiX MSI & GitHub Release
|
|
151
|
+
├── src/
|
|
152
|
+
│ └── snipstax/
|
|
153
|
+
│ ├── __init__.py # Package version (__version__)
|
|
154
|
+
│ ├── __main__.py # Module entry point (pythonw -m snipstax)
|
|
155
|
+
│ └── main.py # Main tray app, snip overlay, virtual stack & OCR engine
|
|
156
|
+
├── pyproject.toml # PEP 621 / PEP 639 package config & gui-scripts entry points
|
|
157
|
+
├── requirements.txt
|
|
158
|
+
├── requirements-rapidocr.txt
|
|
159
|
+
├── requirements-vlm.txt
|
|
160
|
+
├── .gitignore
|
|
161
|
+
├── LICENSE
|
|
162
|
+
└── README.md
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Development, Local Builds & Cutting Releases
|
|
168
|
+
|
|
169
|
+
### Develop from Source
|
|
170
|
+
```powershell
|
|
171
|
+
git clone https://github.com/johnjg75dev/SnipStax.git
|
|
172
|
+
cd SnipStax
|
|
173
|
+
pip install -e ".[rapidocr]"
|
|
174
|
+
snipstax
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Configuration, Logs & Troubleshooting
|
|
180
|
+
|
|
181
|
+
- **Settings File:** `%APPDATA%\SnipStackOCR\settings.json`
|
|
182
|
+
- **Log File:** `%LOCALAPPDATA%\SnipStackOCR\app.log` *(check here if running silently via `snipstax`, `pythonw.exe`, or `.exe`)*
|
|
183
|
+
- **Windows Defender False Positives:** Unsigned PyInstaller `--onefile` executables using global keyboard hooks (`pynput`) can occasionally trigger heuristic warnings. Use `pip install snipstax`, the `.msi` installer, or add a folder exclusion.
|
|
184
|
+
- **`PrintScreen` Hotkey:** Windows 11 reserves `PrintScreen` for the built-in Snipping Tool by default. Either keep the default `Ctrl+Alt+...` hotkeys or disable *"Use the Print screen key to open screen capture"* in **Windows Settings → Accessibility → Keyboard**.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "snipstax"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Background Windows system tray screenshot, virtual paste-stack, and open-weight OCR tool"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "johnjg75dev" },
|
|
15
|
+
]
|
|
16
|
+
keywords = ["screenshot", "clipboard", "ocr", "windows", "tray", "snipping-tool", "stack"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Environment :: Win32 (MS Windows)",
|
|
20
|
+
"Intended Audience :: End Users/Desktop",
|
|
21
|
+
"Operating System :: Microsoft :: Windows :: Windows 10",
|
|
22
|
+
"Operating System :: Microsoft :: Windows :: Windows 11",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture",
|
|
29
|
+
"Topic :: Utilities",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"pillow>=10.0.0",
|
|
33
|
+
"mss>=9.0.0",
|
|
34
|
+
"pystray>=0.19.5",
|
|
35
|
+
"pynput>=1.7.7",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
rapidocr = [
|
|
40
|
+
"rapidocr>=2.0.0",
|
|
41
|
+
"onnxruntime>=1.18.0",
|
|
42
|
+
"numpy>=1.26.0",
|
|
43
|
+
]
|
|
44
|
+
vlm = [
|
|
45
|
+
"torch>=2.4.0",
|
|
46
|
+
"torchvision>=0.19.0",
|
|
47
|
+
"transformers>=5.0.0",
|
|
48
|
+
"accelerate>=1.0.0",
|
|
49
|
+
"docling-core>=2.0.0",
|
|
50
|
+
]
|
|
51
|
+
all = [
|
|
52
|
+
"snipstax[rapidocr,vlm]",
|
|
53
|
+
]
|
|
54
|
+
build = [
|
|
55
|
+
"pyinstaller>=6.0.0",
|
|
56
|
+
"build>=1.2.0",
|
|
57
|
+
"twine>=6.0.0",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[project.urls]
|
|
61
|
+
Homepage = "https://github.com/johnjg75dev/SnipStax"
|
|
62
|
+
Repository = "https://github.com/johnjg75dev/SnipStax"
|
|
63
|
+
Releases = "https://github.com/johnjg75dev/SnipStax/releases"
|
|
64
|
+
Issues = "https://github.com/johnjg75dev/SnipStax/issues"
|
|
65
|
+
|
|
66
|
+
[project.gui-scripts]
|
|
67
|
+
snipstax = "snipstax.main:main"
|
|
68
|
+
|
|
69
|
+
[project.scripts]
|
|
70
|
+
snipstax-console = "snipstax.main:main"
|
|
71
|
+
|
|
72
|
+
[tool.setuptools.packages.find]
|
|
73
|
+
where = ["src"]
|
|
74
|
+
|
|
75
|
+
[tool.setuptools.dynamic]
|
|
76
|
+
version = { attr = "snipstax.__version__" }
|
snipstax-2.0.2/setup.cfg
ADDED