Metadata-Version: 2.5
Name: shot2url
Version: 0.1.0
Summary: Take a screenshot or record your screen, get a URL on your clipboard.
Project-URL: Homepage, https://github.com/shashank123r/shot2url
Project-URL: Repository, https://github.com/shashank123r/shot2url
Author-email: Shashank R <shashank.r2005@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,clipboard,linux,screen-recording,screenshot,upload
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# shot2url

Take a screenshot or record your screen, get a URL on your clipboard.

- **Screenshots**: watches the clipboard; as soon as a *new* screenshot image lands there, it's uploaded and the clipboard is replaced with its URL.
- **Recordings**: watches your screen-recording folder(s); once a new video file stops growing, it's uploaded and its URL is copied to the clipboard.

Default upload host is [catbox.moe](https://catbox.moe) (permanent links), falling back to [uguu.se](https://uguu.se). `qu.ax` and `tmpfiles.org` (48h expiry) are also available.

Linux only. Auto-detects Wayland (`wl-clipboard`) vs X11 (`xclip`). Requires `curl`.

## Install

```bash
pip install shot2url
```

Or with [pipx](https://pypa.github.io/pipx/) (recommended for CLI tools):

```bash
pipx install shot2url
```

### System dependencies

- `curl` (required)
- `wl-clipboard` (Wayland) or `xclip` (X11) — for reading/writing the clipboard
- `notify-send` (optional) — for desktop notifications

Debian/Ubuntu:

```bash
sudo apt install curl wl-clipboard xclip libnotify-bin
```

## Usage

Run it and leave it running in a terminal or as a background service:

```bash
shot2url
```

Take a screenshot (e.g. with your desktop's screenshot tool so it lands on the clipboard) — the URL is printed, copied to your clipboard, and a desktop notification is shown.

### One-shot mode

Upload whatever image is currently on the clipboard and exit:

```bash
shot2url --once
```

### Options

```
--poll SECONDS       clipboard/directory poll interval (default: 1.0)
--hosts HOST,HOST     upload host order, comma-separated (default: catbox.moe,uguu.se)
                      available: qu.ax, uguu.se, tmpfiles.org, catbox.moe
--once                upload the current clipboard image once, then exit
--watch-dir DIR       directory to watch for new recordings (repeatable;
                      default: ~/Videos/Screencasts, ~/Videos)
--no-video            disable recording-file watching
```

### Examples

```bash
# Only use catbox.moe
shot2url --hosts catbox.moe

# Watch a custom recordings folder, poll every 2s
shot2url --watch-dir ~/Recordings --poll 2

# Screenshots only, no video watching
shot2url --no-video
```

## How it works

`shot2url` polls the system clipboard for a new PNG image and diffs it (via SHA-256) against the last upload, so it never re-uploads the same screenshot twice. For recordings, it watches the given directories for new video files and waits until a file's size stops changing between polls before uploading it (a simple "still being written" check).

## License

MIT
