5e6b4428bb
Windows has no base64 command; certutil is file-only, adds PEM markers and cannot be piped. This is a real base64.exe matching GNU coreutils: same flags (-d, -i, -w), stdin/stdout streaming, exit codes and error messages, so existing muscle memory and scripts carry over. Verified against coreutils 9.7 with a 153-case differential test. The subtle behaviours are reproduced: bytes are emitted incrementally so a stream that goes bad still writes its valid prefix, unpadded tails are accepted only when canonically encoded, concatenated streams decode as one, and -w0 suppresses the trailing newline. Deliberate deviation: '\r' is skipped when decoding alongside '\n', as CRLF base64 files are routine on Windows and GNU rejects them. Zero dependencies, so the build works offline.
65 lines
3.3 KiB
Markdown
65 lines
3.3 KiB
Markdown
# JWTF Tools
|
|
|
|
A collection of utility tools for development and testing.
|
|
|
|
## Tools
|
|
|
|
### [Base64 → File](./base64-decoder/)
|
|
|
|
A single-file web tool that decodes a base64 string and saves it back out as a real file. Handles data URIs, URL-safe base64, missing padding and line-wrapped input; detects the file type from magic bytes and previews images, audio, video, PDFs and text before you download. Runs entirely in the browser — no server, no dependencies, nothing uploaded.
|
|
|
|
```bash
|
|
xdg-open base64-decoder/base64-decoder.html
|
|
```
|
|
|
|
### [base64 for Windows](./base64-rs/)
|
|
|
|
A real `base64.exe` for Windows, which otherwise has no `base64` command — only `certutil`, which is file-only, adds PEM markers and can't be piped. Matches GNU coreutils flag for flag (`-d`, `-i`, `-w`, stdin/stdout, exit codes, error messages), verified against coreutils 9.7 with a 153-case differential test. Zero dependencies, single static binary, streams its input.
|
|
|
|
```powershell
|
|
cargo build --release # then put target\release\base64.exe on your PATH
|
|
base64 image.png > image.b64
|
|
base64 -d image.b64 > image.png
|
|
```
|
|
|
|
### [Fake Media](./fake-media/)
|
|
|
|
Generates large collections of placeholder PNG images for testing without downloading real files. Supports a terminal UI and a non-interactive CLI mode. Configurable image sizes, folder structure, file counts, and naming prefixes — uses only Python's standard library.
|
|
|
|
```bash
|
|
python3 fake-media/generate_fake_media.py
|
|
```
|
|
|
|
### [Fake Wheel](./fake-wheel/)
|
|
|
|
Emulates a Logitech G29 Racing Wheel as a virtual Linux input device via `/dev/uinput`. Useful for testing applications that consume gamepad/wheel input without needing physical hardware. Simulates steering, throttle, brake, and button events automatically.
|
|
|
|
```bash
|
|
sudo python3 fake-wheel/fake_wheel_uinput.py
|
|
```
|
|
|
|
Requires Linux with the `uinput` kernel module and either root access or a user in the `input` group.
|
|
|
|
### [RemoveBG Studio](./rembg/)
|
|
|
|
AI background removal for images and video, with lossless FFmpeg frame extraction/reassembly. Ships as a native Windows app (C++ host embedding WebView2, driving a Python/rembg sidecar over JSON-stdio) with a live before/after preview, plus a scriptable CLI and a legacy Tkinter GUI fallback. See [rembg/README.md](./rembg/README.md) for build/usage details.
|
|
|
|
### [VidBoard Setup](./vidboard-setup-rs/)
|
|
|
|
A Rust TUI installer that copies VidBoard AI model files into existing ComfyUI and Ollama installations on Windows. Automatically detects both applications via open ports, running process command lines, environment variables, and known install locations — pre-filling the paths so you only need to confirm and press Enter.
|
|
|
|
The installer expects a `models/` directory next to the binary containing the ComfyUI and Ollama payload. It copies the following files:
|
|
|
|
- **ComfyUI** (`models/comfyui/`) — Flux 2 Klein 4b fp8, Flux 2 Klein 9b fp8, Qwen 3 4b text encoder, Qwen 3 8b fp8 text encoder, Flux 2 VAE
|
|
- **Ollama** (`models/ollama/`) — gemma3:12b, gemma4:e4b manifests and blobs
|
|
|
|
Files already present at the destination with a matching size are skipped. A live progress gauge shows per-file and overall transfer speed.
|
|
|
|
```bash
|
|
cargo build --release
|
|
# Place the binary alongside the models/ directory, then run:
|
|
./vidboard-setup.exe
|
|
```
|
|
|
|
Requires Windows (uses PowerShell for process/port detection).
|