Scripts of various kinds (but also other scripts)
| deno | ||
| python | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Scripts! just scripts!
A collection of utility scripts in various languages (Deno/TypeScript, Python), managed with Nix Flakes for easy installation and execution.
Installation
The recommended way to use these scripts is via Nix Flakes and nix profile. This adds them to your PATH automatically.
# Clone the repo (if you want to install from local source)
git clone https://github.com/JulianNymark/scripts.git
cd scripts
# Install all scripts at once
nix profile add .
# Or install specific scripts by their alias
nix profile add .#nxs
nix profile add .#yttranscript
Once installed, you can run the scripts using their short aliases:
nxs, tdc, img2gbar, dyp, yttranscript, imr, ffr, ffc.
Available Aliases
| Alias | Full Name | Description |
|---|---|---|
nxs |
nix-search-formatter |
Formats nix search output to be more readable. |
tdc |
thumbnailify_cwd |
Generates thumbnails for images and videos in CWD. |
img2gbar |
image_to_uint16_array_4bpc_GBAR |
Converts images to 16-bit 4bpc GBAR arrays (for C++). |
dyp |
download_youtube_playlist |
Downloads audio from a YouTube playlist using yt-dlp. |
yttranscript |
yttranscript |
Fetches transcripts for YouTube videos. |
imr |
image_resize |
Resizes images using Sharp. |
ffr |
ffmpeg_resize |
Resizes videos using FFmpeg. |
ffc |
ffmpeg_count_frames |
Counts frames in a video file quickly. |
Running Without Installing
You can also run any script directly without cloning or installing:
nix run github:JulianNymark/scripts#nxs -- "search terms"
Adding New Scripts
- Add your script to the
deno/orpython/directory. - Update
flake.nixto include a new package definition in theoutputs. - (Optional) Keep the
nix-shellshebang for standalone execution.
Nix-shell Shebang (Legacy/Standalone)
Each script still contains a nix-shell shebang, allowing it to be run as a standalone file:
./deno/nix-search-formatter.ts <search-term>
This will automatically fetch dependencies and run the script, but it won't be in your PATH unless you manually symlink it.