Screenshot capture → edit → crop → publish. One command: xen
Project description
xen
Screenshot capture → edit → crop → publish. One command.
pip install -e .
xen
Problem
Chcesz szybko stworzyć krótki film ze screenshotów — demo produktu, tutorial, changelog.
Ale Canva to za dużo kroków. xen robi to w terminalu + przeglądarce.
Jak działa
┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Capture │ ──→ │ Select │ ──→ │ Center │ ──→ │ Crop │ ──→ │ Publish │
│ xen c │ │ Tab 1 │ │ Tab 2 │ │ Tab 3-4 │ │ Tab 5 │
└─────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
screenshoty wybór klatek środek uwagi przycinanie eksport
+ metadane grid view click = center presety SM MP4/GIF/ZIP
kursor/kb max 15 auto z kursora multi-wersje social links
Instalacja
# Z repozytorium
git clone https://github.com/softreck/xen.git
cd xen
pip install -e .
# Wymagania systemowe
# Linux/Mac: ffmpeg
sudo apt install ffmpeg # Ubuntu/Debian
brew install ffmpeg # macOS
Użycie
1. Nagrywanie
# Domyślne (10s, co 1s, max 15 klatek)
xen capture
# Krótkie demo (5s)
xen capture -d 5
# Gęstsze klatki
xen capture -d 10 -i 0.5
# Nazwana sesja
xen capture -n "ksefin-demo-v2"
# Konkretny monitor
xen capture --monitor 1
Co zbiera xen capture:
- Screenshoty z inteligentnym interwałem (pomija identyczne klatki)
- Pozycja myszy co 100ms — używana jako sugestia "środka uwagi"
- Klawisze — log co zostało wciśnięte (kontekst)
- % zmiany ekranu — między klatkami
2. Edycja w przeglądarce
# Uruchom serwer (otwiera przeglądarkę)
xen
# Lub jawnie
xen server -p 8080
xen server --no-browser
5 zakładek:
| Tab | Funkcja |
|---|---|
| 1. Wybór klatek | Grid wszystkich klatek, kliknij aby wybrać/odrzucić |
| 2. Środek | Kliknij na obrazie = punkt centralny. Auto-sugestia z pozycji kursora |
| 3. Przycinanie | Wybierz preset (Instagram, Twitter, LinkedIn...) → podgląd przycięcia wg środka |
| 4. Wersje | Generuj kilka formatów naraz, porównaj obok siebie |
| 5. Publikacja | Eksport MP4/GIF/ZIP + linki do social media |
3. Upload zewnętrznych screenshotów
Możesz też przeciągnąć pliki PNG/JPG bezpośrednio do przeglądarki (Tab 1) — bez xen capture.
4. Lista sesji
xen list
Presety przycinania
| Preset | Rozmiar | Użycie |
|---|---|---|
instagram_post |
1080×1080 | Post IG (kwadrat) |
instagram_story |
1080×1920 | Story IG (9:16) |
twitter_post |
1200×675 | Post Twitter/X |
linkedin_post |
1200×627 | Post LinkedIn |
facebook_post |
1200×630 | Post Facebook |
youtube_thumb |
1280×720 | Miniatura YT |
widescreen |
1920×1080 | 16:9 |
Deploy na VPS (Docker + TLS)
# 1. Sklonuj na VPS
git clone https://github.com/softreck/xen.git
cd xen
# 2. Deploy z domeną
make deploy DOMAIN=xen.twoja-domena.pl
# Lub ręcznie:
bash deploy.sh xen.twoja-domena.pl
Skrypt automatycznie:
- Instaluje Docker + certbot
- Generuje cert TLS (Let's Encrypt lub self-signed)
- Buduje i uruchamia kontenery
- Konfiguruje auto-renewal
Docker ręcznie
# Dev z self-signed cert
make dev-certs
docker-compose up -d
# Logi
docker-compose logs -f
# Stop
docker-compose down
Struktura Docker
┌─────────────┐ ┌───────────┐
│ nginx │────→│ xen app │
│ :80/:443 │ │ :7600 │
│ TLS term. │ │ FastAPI │
└─────────────┘ └───────────┘
│ │
│ ┌────┴────┐
│ │ /data │
│ │ volume │
└──────────────┴─────────┘
Metadane
Każda sesja zapisuje session.json z:
{
"name": "20250219_143022",
"frames": [
{
"index": 0,
"timestamp": 0.0,
"filename": "frame_0000.png",
"change_pct": 100.0,
"mouse_x": 960,
"mouse_y": 540,
"suggested_center_x": 960,
"suggested_center_y": 540,
"input_events": [
{"ts": 0.1, "kind": "mouse_move", "x": 955, "y": 538},
{"ts": 0.2, "kind": "key_press", "key": "a", "x": 955, "y": 538},
{"ts": 0.3, "kind": "mouse_click", "x": 960, "y": 540, "button": "Button.left"}
]
}
],
"input_log": [ ... ]
}
API
| Endpoint | Metoda | Opis |
|---|---|---|
/api/sessions |
GET | Lista sesji |
/api/sessions/{name} |
GET | Szczegóły sesji |
/api/sessions/upload |
POST | Upload screenshotów |
/api/sessions/{name}/select |
POST | Zapisz wybór klatek |
/api/sessions/{name}/centers |
POST | Zapisz środki |
/api/sessions/{name}/crop-preview |
POST | Podgląd przycinania |
/api/sessions/{name}/generate-versions |
POST | Multi-format |
/api/sessions/{name}/export |
POST | Eksport MP4/GIF/ZIP |
/api/presets |
GET | Presety formatów |
/api/social-links |
GET | Linki social media |
Licencja
MIT — Softreck
License
Apache License 2.0 - see LICENSE for details.
Author
Created by Tom Sapletta - tom@sapletta.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xeen-0.1.5.tar.gz.
File metadata
- Download URL: xeen-0.1.5.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c4ee975e4d7c5848af24a230439966daef86f29ad27e9ae192c40aab845caf6
|
|
| MD5 |
8cebb982964f94560feec4135006091d
|
|
| BLAKE2b-256 |
125f010f64e71ef8c74967e6131e567297b244b5062d17a3e1f7388853faba75
|
File details
Details for the file xeen-0.1.5-py3-none-any.whl.
File metadata
- Download URL: xeen-0.1.5-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1866385110396e2d740c8f133aad3dcaefe81ebf076ae0074575fa140ca3e798
|
|
| MD5 |
de50acb7763edded031192c674768878
|
|
| BLAKE2b-256 |
18523689660ba736da8139717f23de83f0cd3e1107d6376454313c68ef8d4284
|