feat: add combined arty.sh and update documentation

- Add arty.sh: combined repository and release management system
  - Repository management (install, deps, list, remove, init, source, exec)
  - Release cycle management (release, version, bump, changelog, tag)
  - Git hooks support (install, uninstall, create)
  - Monorepo management (list, version, bump, status, exec)
- Update README.md: add arty.sh documentation and remove GIF references
- Remove docs/img directory containing animated GIF demos

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-12 17:08:48 +01:00
parent 54c4bef7f2
commit 3c456698e1
10 changed files with 2262 additions and 505 deletions

764
README.md
View File

@@ -1,71 +1,112 @@
# Utility Scripts Collection # Utility Scripts Collection
> Comprehensive documentation with usage examples and demos > Comprehensive collection of bash utility scripts for various tasks
This documentation was auto-generated using [`doc_bash_generate.sh`](https://github.com/yourusername/yourrepo). This repository contains a curated collection of bash scripts for repository management, color manipulation, documentation generation, artifact handling, and more.
## Table of Contents ## Table of Contents
- [`artifact_github_download.sh`](#artifact-github-download-sh) - [`arty.sh`](#artysh) - Repository and Release Management
- [`artifact_postgres_export.sh`](#artifact-postgres-export-sh) - [`artifact_github_download.sh`](#artifact_github_downloadsh) - GitHub Artifact Downloader
- [`css_color_filter.sh`](#css-color-filter-sh) - [`artifact_postgres_export.sh`](#artifact_postgres_exportsh) - PostgreSQL Code Export
- [`css_color_palette.sh`](#css-color-palette-sh) - [`css_color_filter.sh`](#css_color_filtersh) - CSS Filter Generator
- [`css_json_convert.sh`](#css-json-convert-sh) - [`css_color_palette.sh`](#css_color_palettesh) - Color Palette Generator
- [`doc_bash_generate.sh`](#doc-bash-generate-sh) - [`css_json_convert.sh`](#css_json_convertsh) - CSS Variable Converter
- [`doc_rust_generate.sh`](#doc-rust-generate-sh) - [`doc_bash_generate.sh`](#doc_bash_generatesh) - Bash Documentation Generator
- [`jinja_template_render.sh`](#jinja-template-render-sh) - [`doc_rust_generate.sh`](#doc_rust_generatesh) - Rust Documentation Generator
- [`mime_mp4_gif.sh`](#mime-mp4-gif-sh) - [`jinja_template_render.sh`](#jinja_template_rendersh) - Jinja2 Template Renderer
- [`mime_mp4_gif.sh`](#mime_mp4_gifsh) - MP4 to GIF Converter
---
## `arty.sh`
**A bash library repository and release management system**
Combined functionality from arty.sh (repository management) and whip.sh (release cycle management).
### Usage
```bash
arty <command> [arguments] [--dry-run] [-v|--verbose]
```
### Commands
#### Repository Commands
- `install <repo-url> [name]` - Install a library from git repository
- `deps [--dry-run]` - Install all dependencies from arty.yml
- `list` - List installed libraries with dependency tree
- `remove <name>` - Remove an installed library
- `init [name]` - Initialize a new arty.yml project
- `source <name> [file]` - Source a library (for use in scripts)
- `exec <lib-name> [args]` - Execute a library's main script with arguments
- `<script-name>` - Execute a script defined in arty.yml
#### Release Commands
- `release [major|minor|patch]` - Full release workflow (default: patch)
- Bumps version in arty.yml
- Updates CHANGELOG.md from git history
- Creates git commit
- Creates and pushes git tag
- `version` - Show current version from arty.yml
- `bump <major|minor|patch>` - Bump version in arty.yml (no commit/tag)
- `changelog` - Generate changelog from git history
- `tag <version>` - Create and push git tag
#### Hook Commands
- `hooks install` - Install git commit hooks (includes shellcheck validation)
- `hooks uninstall` - Remove git commit hooks
- `hooks create` - Create default hook templates
#### Monorepo Commands
- `mono list [root] [pattern]` - List arty.yml projects
- `mono version [root] [pattern]` - Show versions of all projects
- `mono bump <type> [root] [pattern]` - Bump version for all projects
- `mono status [root] [pattern]` - Show git status for all projects
- `mono exec <cmd> [root] [pattern]` - Execute bash command on all projects
- `mono help` - Show detailed mono help
### Examples
```bash
# Repository Management
arty install https://github.com/user/bash-utils.git
arty deps
arty list
# Release Cycle
arty release # Patch release
arty release major # Major version release
arty bump minor # Just bump version
arty hooks install # Install commit hooks
# Monorepo Management
arty mono list # List all projects
arty mono version # Show all project versions
arty mono exec "git status" # Run command on all projects
```
--- ---
## `artifact_github_download.sh` ## `artifact_github_download.sh`
GitHub Artifact Downloader **GitHub Artifact Downloader**
### Demo Download artifacts from GitHub Actions workflows with interactive selection or automatic matching.
![Demo of artifact_github_download.sh](docs/img/artifact_github_download.gif)
### Usage ### Usage
```bash ```bash
artifact_github_download.sh [OPTIONS] [ARGUMENTS] artifact_github_download.sh <REPO> [OPTIONS]
``` ```
### Arguments
- `REPO` - GitHub repository (owner/repo)
### Options ### Options
- `-n, --name NAME` - Artifact name to download (preselect)
<details> - `-o, --output DIR` - Output directory (default: current directory)
<summary>Click to expand full help output</summary> - `-h, --help` - Show help message
```
GitHub Artifact Downloader
USAGE:
artifact_github_download.sh <REPO> [OPTIONS]
ARGUMENTS:
REPO GitHub repository (owner/repo)
OPTIONS:
-n, --name NAME Artifact name to download (preselect)
-o, --output DIR Output directory (default: current directory)
-h, --help Show this help message
EXAMPLES:
# Interactive mode - list and select artifacts
artifact_github_download.sh valknarness/awesome
# Preselect artifact by name
artifact_github_download.sh valknarness/awesome -n awesome-database-latest
# Download to specific directory
artifact_github_download.sh valknarness/awesome -o ~/downloads
# Combine options
artifact_github_download.sh valknarness/awesome -n awesome-database-latest -o ~/downloads
```
</details>
### Examples ### Examples
@@ -78,16 +119,15 @@ artifact_github_download.sh valknarness/awesome -n awesome-database-latest
# Download to specific directory # Download to specific directory
artifact_github_download.sh valknarness/awesome -o ~/downloads artifact_github_download.sh valknarness/awesome -o ~/downloads
# Combine options
artifact_github_download.sh valknarness/awesome -n awesome-database-latest -o ~/downloads
``` ```
--- ---
## `artifact_postgres_export.sh` ## `artifact_postgres_export.sh`
Export code artifacts from Open WebUI PostgreSQL database **Export code artifacts from Open WebUI PostgreSQL database**
Extract code artifacts from chat conversations stored in PostgreSQL, preserving directory structure and file names.
### Usage ### Usage
@@ -96,39 +136,24 @@ artifact_postgres_export.sh [OPTIONS] <chat_id> <output_dir>
``` ```
### Arguments ### Arguments
- `chat_id` - Chat ID from Open WebUI URL (UUID format) - `chat_id` - Chat ID from Open WebUI URL (UUID format)
- `output_dir` - Directory to save extracted code files (optional, defaults to current directory) - `output_dir` - Directory to save extracted code files
### Options ### Options
- `-H, --host HOST` - PostgreSQL host (default: ai_postgres via Docker)
- `-u, --user USER` - PostgreSQL user (default: ai)
- `-d, --db DATABASE` - PostgreSQL database (default: openwebui)
- `-v, --verbose` - Verbose output
- `--remote HOST` - SSH remote host for Docker access (default: vps)
- `-f, --force` - Force export even if output directory is not empty
<details> ### Features
<summary>Click to expand full help output</summary> - **Direct PostgreSQL access** via Docker exec (SSH-enabled for remote servers)
- **Automatic filename detection** from markdown headers
``` - **Directory structure preservation** - maintains original paths
artifact_postgres_export.sh - Export code artifacts from Open WebUI PostgreSQL database - **Safety checks** - validates chat ID format and checks for empty output directory
- **Smart code extraction** - parses markdown code blocks with language detection
Usage: artifact_postgres_export.sh [OPTIONS] <chat_id> <output_dir> - **File extension mapping** - supports 20+ file types
Arguments:
chat_id Chat ID from Open WebUI URL (e.g., e135d74e-5b43-4b24-a651-e999f103942b)
output_dir Directory to save extracted code files
Options:
-h, --help Show this help message
-H, --host HOST PostgreSQL host (default: ai_postgres via Docker)
-u, --user USER PostgreSQL user (default: ai)
-d, --db DATABASE PostgreSQL database (default: openwebui)
-v, --verbose Verbose output
--remote HOST SSH remote host for Docker access (default: vps)
-f, --force Force export even if output directory is not empty
Examples:
artifact_postgres_export.sh e135d74e-5b43-4b24-a651-e999f103942b ~/Projects/rust/piglet
artifact_postgres_export.sh --remote vps abc123def456 ./output
```
</details>
### Examples ### Examples
@@ -141,79 +166,30 @@ artifact_postgres_export.sh --remote vps abc123def456 ./output
# Force export to non-empty directory # Force export to non-empty directory
artifact_postgres_export.sh -f e135d74e-5b43-4b24-a651-e999f103942b ./output artifact_postgres_export.sh -f e135d74e-5b43-4b24-a651-e999f103942b ./output
# Verbose output with custom database
artifact_postgres_export.sh -v -d custom_db abc123def456 ./output
``` ```
### Features
- **Direct PostgreSQL access** via Docker exec (SSH-enabled for remote servers)
- **Automatic filename detection** from markdown headers (e.g., `### src/main.rs`)
- **Directory structure preservation** - maintains original paths like `src/parser/duration.rs`
- **Safety checks** - validates chat ID format and checks for empty output directory
- **Colored output** - uses ANSI colors for better readability
- **Smart code extraction** - parses markdown code blocks with language detection
- **File extension mapping** - supports 20+ file types (Rust, Python, JavaScript, etc.)
--- ---
## `css_color_filter.sh` ## `css_color_filter.sh`
CSS Color Filter Generator **CSS Color Filter Generator**
### Demo Generate CSS filter values to transform black elements into any target color using SPSA optimization.
![Demo of css_color_filter.sh](docs/img/css_color_filter.gif)
### Usage ### Usage
```bash ```bash
css_color_filter.sh [OPTIONS] [ARGUMENTS] css_color_filter.sh [OPTIONS] [COLOR]
``` ```
### Arguments
- `COLOR` - Hex color (e.g., #FF0000, ff0000) or RGB (e.g., 255,0,0)
### Options ### Options
- `-i, --interactive` - Interactive mode with colored preview
<details> - `-r, --raw` - Output only the CSS filter (for piping)
<summary>Click to expand full help output</summary> - `-c, --copy` - Copy result to clipboard automatically
- `-h, --help` - Show help message
```
CSS Color Filter Generator
Generate CSS filter values to transform black elements into any target color.
USAGE:
css_color_filter.sh [OPTIONS] [COLOR]
ARGUMENTS:
COLOR Hex color (e.g., #FF0000, ff0000) or RGB (e.g., 255,0,0)
OPTIONS:
-i, --interactive Interactive mode with colored preview
-r, --raw Output only the CSS filter (for piping)
-c, --copy Copy result to clipboard automatically
-h, --help Show this help message
EXAMPLES:
css_color_filter.sh "#FF5733"
css_color_filter.sh ff5733
css_color_filter.sh "255,87,51"
css_color_filter.sh -i
NOTE:
This tool generates filters that work on black elements.
To use with non-black elements, prepend: brightness(0) saturate(100%)
ALGORITHM:
Uses SPSA (Simultaneous Perturbation Stochastic Approximation) to find
optimal filter combinations that minimize color difference in RGB and HSL.
DEPENDENCIES:
bc For floating-point arithmetic
jq For JSON formatting (optional)
```
</details>
### Examples ### Examples
@@ -224,60 +200,39 @@ css_color_filter.sh "255,87,51"
css_color_filter.sh -i css_color_filter.sh -i
``` ```
### Algorithm
Uses SPSA (Simultaneous Perturbation Stochastic Approximation) to find optimal filter combinations that minimize color difference in RGB and HSL color spaces.
### Dependencies
- `bc` - For floating-point arithmetic
- `jq` - For JSON formatting (optional)
--- ---
## `css_color_palette.sh` ## `css_color_palette.sh`
CSS Color Palette Generator (Pure Bash) **CSS Color Palette Generator (Pure Bash)**
### Demo Generate comprehensive color palettes without Node.js dependencies. Supports multiple harmony types and color scales.
![Demo of css_color_palette.sh](docs/img/css_color_palette.gif)
### Usage ### Usage
```bash ```bash
css_color_palette.sh [OPTIONS] [ARGUMENTS] css_color_palette.sh COLOR [OPTIONS]
``` ```
### Arguments
- `COLOR` - Base hex color (e.g., #3498db, 3498db)
### Options ### Options
- `-p, --palette TYPE` - Palette type: monochromatic, analogous, complementary, split-complementary, triadic, tetradic
<details> - `-o, --output FILE` - Output file (default: ./colors.yaml)
<summary>Click to expand full help output</summary> - `-m, --mode MODE` - Color mode: light, dark (default: light)
- `-s, --style STYLE` - Style: shades, tints, tones, all (default: all)
``` - `-n, --name NAME` - Palette name (default: auto-generated)
CSS Color Palette Generator (Pure Bash) - `--scales N` - Number of scale steps (default: 11)
- `-i, --interactive` - Interactive mode
Generate comprehensive color palettes without Node.js dependencies. - `-v, --verbose` - Verbose output with color preview
USAGE:
css_color_palette.sh COLOR [OPTIONS]
ARGUMENTS:
COLOR Base hex color (e.g., #3498db, 3498db)
OPTIONS:
-p, --palette TYPE Palette type: monochromatic, analogous, complementary,
split-complementary, triadic, tetradic
-o, --output FILE Output file (default: ./colors.yaml)
-m, --mode MODE Color mode: light, dark (default: light)
-s, --style STYLE Style: shades, tints, tones, all (default: all)
-n, --name NAME Palette name (default: auto-generated)
--scales N Number of scale steps (default: 11)
-i, --interactive Interactive mode
-v, --verbose Verbose output with color preview
-h, --help Show this help message
DEPENDENCIES:
bc For floating-point arithmetic
EXAMPLES:
css_color_palette.sh "#3498db"
css_color_palette.sh "#3498db" -p triadic -o palette.json
css_color_palette.sh "ff5733" -p analogous -m dark
```
</details>
### Examples ### Examples
@@ -287,81 +242,31 @@ css_color_palette.sh "#3498db" -p triadic -o palette.json
css_color_palette.sh "ff5733" -p analogous -m dark css_color_palette.sh "ff5733" -p analogous -m dark
``` ```
### Dependencies
- `bc` - For floating-point arithmetic
--- ---
## `css_json_convert.sh` ## `css_json_convert.sh`
USAGE: **CSS Variable to JSON/YAML Converter**
### Demo Extract CSS custom properties (variables) from a CSS file and convert them to JSON or YAML format.
![Demo of css_json_convert.sh](docs/img/css_json_convert.gif)
### Usage ### Usage
```bash ```bash
css_json_convert.sh [OPTIONS] [ARGUMENTS] css_json_convert.sh [OPTIONS] <input.css>
``` ```
### Arguments
- `<input.css>` - Input CSS file containing CSS variables
### Options ### Options
- `-o, --output FILE` - Output file path (default: ./output.yaml)
<details> - `-c, --camel-case` - Convert variable names to camelCase
<summary>Click to expand full help output</summary> - `-v, --verbose` - Enable verbose output
- `-h, --help` - Show help message
```
================================================================
CSS Variable to JSON/YAML Converter
Extract CSS custom properties with ease
================================================================
USAGE:
css_json_convert.sh [OPTIONS] <input.css>
DESCRIPTION:
Extracts CSS custom properties (variables) from a CSS file and converts
them to JSON or YAML format. Automatically detects output format from
file extension.
ARGUMENTS:
<input.css> Input CSS file containing CSS variables
OPTIONS:
-o, --output FILE Output file path (default: ./output.yaml)
Format auto-detected from extension (.json/.yaml/.yml)
-c, --camel-case Convert variable names to camelCase
(e.g., --main-color -> mainColor)
-v, --verbose Enable verbose output
-h, --help Show this help message
EXAMPLES:
# Extract CSS vars to YAML (default)
css_json_convert.sh styles.css
# Extract to JSON with custom output
css_json_convert.sh styles.css -o theme.json
# Convert variable names to camelCase
css_json_convert.sh styles.css -o vars.json --camel-case
CSS VARIABLE FORMAT:
The script extracts CSS custom properties in the format:
--variable-name: value;
Example input:
:root {
--main-color: #e8eaed;
--font-size: 16px;
}
Example JSON output:
{
"main-color": "#e8eaed",
"font-size": "16px"
}
```
</details>
### Examples ### Examples
@@ -380,61 +285,25 @@ css_json_convert.sh styles.css -o vars.json --camel-case
## `doc_bash_generate.sh` ## `doc_bash_generate.sh`
Bash Documentation Generator with Animated GIFs **Bash Documentation Generator with Animated GIFs**
### Demo Generate comprehensive README.md files with embedded asciinema GIFs for bash scripts.
![Demo of doc_bash_generate.sh](docs/img/doc_bash_generate.gif)
### Usage ### Usage
```bash ```bash
doc_bash_generate.sh [OPTIONS] [ARGUMENTS] doc_bash_generate.sh [OPTIONS] <executable> [executable...]
``` ```
### Arguments
- `executable` - One or more executables or glob patterns
### Options ### Options
- `-o, --output FILE` - Output README.md path (default: ./README.md)
<details> - `-t, --title TITLE` - Documentation title (default: auto-generated)
<summary>Click to expand full help output</summary> - `--no-gif` - Skip GIF generation (faster, text only)
- `--gif-only` - Only generate GIFs, don't update README
``` - `-h, --help` - Show help message
================================================================
Bash Documentation Generator
================================================================
Bash Documentation Generator with Animated GIFs
Generate sexy, comprehensive README.md files with embedded asciinema GIFs.
USAGE:
doc_bash_generate.sh [OPTIONS] <executable> [executable...]
ARGUMENTS:
executable One or more executables or glob patterns
OPTIONS:
-o, --output FILE Output README.md path (default: ./README.md)
-t, --title TITLE Documentation title (default: auto-generated)
--no-gif Skip GIF generation (faster, text only)
--gif-only Only generate GIFs, don't update README
-h, --help Show this help message
EXAMPLES:
doc_bash_generate.sh css_*.sh
doc_bash_generate.sh -o docs/README.md *.sh
doc_bash_generate.sh --title "My Awesome Tools" script1.sh script2.sh
DEPENDENCIES:
asciinema Terminal session recorder
agg Asciinema to GIF converter (cargo install agg)
NOTES:
Demos are automatically generated by running --help on each command.
GIF recordings are created in a temporary directory and cleaned up after.
```
</details>
### Examples ### Examples
@@ -444,88 +313,43 @@ doc_bash_generate.sh -o docs/README.md *.sh
doc_bash_generate.sh --title "My Awesome Tools" script1.sh script2.sh doc_bash_generate.sh --title "My Awesome Tools" script1.sh script2.sh
``` ```
### Dependencies
- `asciinema` - Terminal session recorder
- `agg` - Asciinema to GIF converter (cargo install agg)
--- ---
## `doc_rust_generate.sh` ## `doc_rust_generate.sh`
Rust Documentation Generator with Custom Themes **Rust Documentation Generator with Custom Themes**
### Demo Generate beautiful Rust documentation with custom color schemes and styling.
![Demo of doc_rust_generate.sh](docs/img/doc_rust_generate.gif)
### Usage ### Usage
```bash ```bash
doc_rust_generate.sh [OPTIONS] [ARGUMENTS] doc_rust_generate.sh [OPTIONS] <inputs...>
``` ```
### Arguments
- `<inputs>` - Input file(s) or pattern(s) to document:
- Rust project directories (containing Cargo.toml)
- Individual .rs files
- Markdown files (.md)
- JSON/TOML configuration files
- Glob patterns (e.g., src/**/*.rs)
### Options ### Options
- `-o, --output DIR` - Output directory for generated docs (default: $PWD/output)
<details> - `-c, --color COLOR` - Primary accent color (hex format, default: #ff69b4)
<summary>Click to expand full help output</summary> - `-s, --style STYLE` - Background style theme: slate, zinc, neutral, stone, gray (default: slate)
- `--font-sans FONT` - Google Font for body text (default: Inter)
``` - `--font-mono FONT` - Google Font for code blocks (default: JetBrains Mono)
Rust Documentation Generator with Custom Themes - `--serve` - Start HTTP server after generation
- `--open` - Open documentation in browser (implies --serve)
USAGE: - `-p, --port PORT` - Port for HTTP server (default: 8000)
doc_rust_generate.sh [OPTIONS] <inputs...> - `-v, --verbose` - Enable verbose output
- `-d, --dry-run` - Show what would be done without executing
DESCRIPTION:
Generate beautiful Rust documentation with custom color schemes and styling.
Supports various input types including Rust projects, individual files, and more.
ARGUMENTS:
<inputs> Input file(s) or pattern(s) to document:
- Rust project directories (containing Cargo.toml)
- Individual .rs files
- Markdown files (.md)
- JSON/TOML configuration files
- Glob patterns (e.g., src/**/*.rs)
OPTIONS:
-o, --output DIR Output directory for generated docs
(default: $PWD/output)
-c, --color COLOR Primary accent color (hex format)
(default: #ff69b4)
Examples: #3498db, #10b981, #8b5cf6
-s, --style STYLE Background style theme
Options: slate, zinc, neutral, stone, gray
(default: slate)
--font-sans FONT Google Font for body text (default: Inter)
--font-mono FONT Google Font for code blocks
(default: JetBrains Mono)
--serve Start HTTP server after generation
--open Open documentation in browser (implies --serve)
-p, --port PORT Port for HTTP server (default: 8000)
-v, --verbose Enable verbose output
-d, --dry-run Show what would be done without executing
-h, --help Show this help message
EXAMPLES:
# Generate docs for current Rust project
doc_rust_generate.sh .
# Custom color scheme
doc_rust_generate.sh . -c "#3498db" -s zinc -o ./docs
# Document specific files
doc_rust_generate.sh src/lib.rs src/main.rs -o ./api-docs
# Use custom fonts
doc_rust_generate.sh . --font-sans "Roboto" --font-mono "Fira Code"
# Generate and open in browser
doc_rust_generate.sh . --open
NOTES:
- Requires: cargo, rustdoc, bc, yq, jq, python3 with jinja2
- Colors are automatically generated in light and dark variants
- Google Fonts are automatically imported
- Mermaid.js diagrams are automatically rendered
```
</details>
### Examples ### Examples
@@ -546,93 +370,35 @@ doc_rust_generate.sh . --font-sans "Roboto" --font-mono "Fira Code"
doc_rust_generate.sh . --open doc_rust_generate.sh . --open
``` ```
### Dependencies
- cargo, rustdoc, bc, yq, jq, python3 with jinja2
--- ---
## `jinja_template_render.sh` ## `jinja_template_render.sh`
JINJA2 TEMPLATE RENDERER - NINJA EDITION **Jinja2 Template Renderer - Ninja Edition**
### Demo A sophisticated Jinja2 template rendering engine with support for multiple variable sources, glob patterns, and ninja-style operations.
![Demo of jinja_template_render.sh](docs/img/jinja_template_render.gif)
### Usage ### Usage
```bash ```bash
jinja_template_render.sh [OPTIONS] [ARGUMENTS] jinja_template_render.sh [OPTIONS] <template> [template...]
``` ```
### Arguments
- `<template>` - Template file(s) to render (glob patterns supported)
### Options ### Options
- `-o, --output DIR` - Output directory (default: ./output)
<details> - `-v, --var KEY=VALUE` - Define template variable (can be used multiple times)
<summary>Click to expand full help output</summary> - `-f, --file FILE` - Load variables from JSON/YAML file (repeatable)
- `-V, --verbose` - Enable verbose ninja commentary
``` - `-p, --preview` - Preview rendered output without saving
JINJA2 TEMPLATE RENDERER - NINJA EDITION - `-s, --strict` - Enable strict mode (fail on undefined variables)
- `-d, --dry-run` - Perform dry run without writing files
USAGE: - `-w, --watch` - Watch templates and re-render on changes (experimental)
jinja_template_render.sh [OPTIONS] <template> [template...]
DESCRIPTION:
A sophisticated Jinja2 template rendering engine with support for
multiple variable sources, glob patterns, and ninja-style operations.
ARGUMENTS:
<template> Template file(s) to render (glob patterns supported)
Examples: template.j2, templates/*.j2, **/*.jinja2
OPTIONS:
-o, --output DIR Output directory (default: ./output)
-v, --var KEY=VALUE Define template variable (can be used multiple times)
-f, --file FILE Load variables from JSON/YAML file (repeatable)
-V, --verbose Enable verbose ninja commentary
-p, --preview Preview rendered output without saving
-s, --strict Enable strict mode (fail on undefined variables)
-d, --dry-run Perform dry run without writing files
-w, --watch Watch templates and re-render on changes (experimental)
-h, --help Show this legendary scroll of knowledge
VARIABLE SOURCES:
Variables are merged in this order (later sources override earlier):
1. YAML files (loaded via yq)
2. JSON files (loaded via jq)
3. CLI variables (-v KEY=VALUE)
EXAMPLES:
# Render single template with CLI variables
jinja_template_render.sh template.j2 -v name=Ninja -v level=Master
# Render multiple templates with YAML config
jinja_template_render.sh templates/*.j2 -f config.yaml -o dist/
# Render with multiple variable sources
jinja_template_render.sh app.j2 -f base.yaml -f env.json -v debug=true
# Preview without saving
jinja_template_render.sh template.j2 -f vars.yaml --preview --verbose
# Strict mode with dry run
jinja_template_render.sh *.j2 -f vars.json --strict --dry-run
TEMPLATE SYNTAX:
Jinja2 template example:
Hello {{ name }}!
{% for item in items %}
- {{ item }}
{% endfor %}
{% if debug %}Debug mode enabled{% endif %}
REQUIREMENTS:
- Python 3 with jinja2 package
- jq (for JSON parsing)
- yq (for YAML parsing)
[NINJA] May your templates be swift and your renders be flawless! >>
```
</details>
### Examples ### Examples
@@ -648,83 +414,61 @@ jinja_template_render.sh app.j2 -f base.yaml -f env.json -v debug=true
# Preview without saving # Preview without saving
jinja_template_render.sh template.j2 -f vars.yaml --preview --verbose jinja_template_render.sh template.j2 -f vars.yaml --preview --verbose
# Strict mode with dry run
jinja_template_render.sh *.j2 -f vars.json --strict --dry-run
``` ```
### Dependencies
- Python 3 with jinja2 package
- jq (for JSON parsing)
- yq (for YAML parsing)
--- ---
## `mime_mp4_gif.sh` ## `mime_mp4_gif.sh`
Usage: mime_mp4_gif.sh [OPTIONS] INPUT_FILE [OUTPUT_FILE] **Advanced MP4 to GIF Converter**
### Demo Convert MP4 videos to animated GIFs with advanced frame extraction algorithms, interpolation functions, and magical effects.
![Demo of mime_mp4_gif.sh](docs/img/mime_mp4_gif.gif)
### Usage ### Usage
```bash ```bash
mime_mp4_gif.sh [OPTIONS] [ARGUMENTS] mime_mp4_gif.sh [OPTIONS] INPUT_FILE [OUTPUT_FILE]
``` ```
### Arguments
- `INPUT_FILE` - Input MP4 video file (required)
- `OUTPUT_FILE` - Output GIF file (optional, defaults to INPUT_FILE.gif)
### Options ### Options
- `-k, --keyframes N` - Number of keyframes to extract (default: 10)
- `-d, --keyframe-duration MS` - Duration of each frame in milliseconds (default: 100, range: 1-30000)
- `-i, --input-schedules N` - Number of input schedules (default: 1)
- `-t, --transition TYPE` - Interpolation function for frame timing
- Available: linear, sinoid, cubic, quadratic, exponential, bounce, elastic (default: linear)
- `-s, --schedule TYPE` - Algorithm to distribute keyframes across schedules
- Available: uniform, front-load, back-load, center-peak, edge-peak, fibonacci, golden-ratio (default: uniform)
- `-m, --magic TYPE` - Apply magical effects to the GIF
- Available: none, psychedelic, dither-bloom, edge-glow, temporal-blur, chromatic-shift, vaporwave (default: none)
- `-v, --verbose` - Enable verbose output
<details> ### Examples
<summary>Click to expand full help output</summary>
```bash
# Basic conversion with 15 keyframes
mime_mp4_gif.sh -k 15 video.mp4
# Fast animation with 50ms per frame
mime_mp4_gif.sh -k 20 -d 50 video.mp4
# Use sinusoidal transition with center-peak distribution
mime_mp4_gif.sh -t sinoid -s center-peak -k 20 video.mp4
# Apply psychedelic magic with fibonacci distribution
mime_mp4_gif.sh -m psychedelic -s fibonacci -k 13 video.mp4 trippy.gif
# Complex: 3 schedules with cubic interpolation and edge glow
mime_mp4_gif.sh -i 3 -t cubic -s front-load -m edge-glow -k 30 video.mp4
``` ```
Usage: mime_mp4_gif.sh [OPTIONS] INPUT_FILE [OUTPUT_FILE]
Convert MP4 videos to animated GIFs with advanced frame extraction algorithms.
Arguments:
INPUT_FILE Input MP4 video file (required)
OUTPUT_FILE Output GIF file (optional, defaults to INPUT_FILE.gif)
Options:
-k, --keyframes N Number of keyframes to extract (default: 10)
-d, --keyframe-duration MS Duration of each frame in milliseconds (default: 100)
Valid range: 1-30000 ms
Lower values = faster animation
Higher values = slower animation
-i, --input-schedules N Number of input schedules (default: 1)
1 schedule = entire video duration
N schedules = divide video into N segments
-t, --transition TYPE Interpolation function for frame timing
Available: linear sinoid cubic quadratic exponential bounce elastic
(default: linear)
-s, --schedule TYPE Algorithm to distribute keyframes across schedules
Available: uniform front-load back-load center-peak edge-peak fibonacci golden-ratio
(default: uniform)
-m, --magic TYPE Apply magical effects to the GIF
Available: none psychedelic dither-bloom edge-glow temporal-blur chromatic-shift vaporwave
(default: none)
-v, --verbose Enable verbose output
-h, --help Show this help message
Examples:
# Basic conversion with 15 keyframes
mime_mp4_gif.sh -k 15 video.mp4
# Fast animation with 50ms per frame
mime_mp4_gif.sh -k 20 -d 50 video.mp4
# Slow animation with 500ms per frame
mime_mp4_gif.sh -k 10 -d 500 video.mp4
# Use sinusoidal transition with center-peak distribution
mime_mp4_gif.sh -t sinoid -s center-peak -k 20 video.mp4
# Apply psychedelic magic with fibonacci distribution
mime_mp4_gif.sh -m psychedelic -s fibonacci -k 13 video.mp4 trippy.gif
# Complex: 3 schedules with cubic interpolation and edge glow
mime_mp4_gif.sh -i 3 -t cubic -s front-load -m edge-glow -k 30 video.mp4
```
</details>
--- ---
@@ -739,27 +483,37 @@ chmod +x *.sh
Add them to your PATH for easy access: Add them to your PATH for easy access:
```bash ```bash
export PATH="$PATH:$(pwd)" export PATH="$PATH:/home/valknar/bin"
``` ```
## Dependencies Or create symbolic links in `/usr/local/bin`:
Common dependencies for these scripts: ```bash
sudo ln -s /home/valknar/bin/*.sh /usr/local/bin/
```
## Common Dependencies
Most scripts require:
- `bash` (4.0+) - `bash` (4.0+)
- `bc` - For floating-point arithmetic - `bc` - For floating-point arithmetic
- `git` - For repository operations (arty.sh)
- `yq` - For YAML parsing (arty.sh)
- `jq` - For JSON parsing
Specific dependencies are listed in each command's help output. Additional dependencies are listed in each command's help output.
## Contributing ## Contributing
Contributions are welcome! Please ensure: Contributions are welcome! Please ensure:
- Scripts follow POSIX conventions - Scripts follow bash best practices
- Include comprehensive `--help` output with usage examples - Include comprehensive `--help` output with usage examples
- Test scripts before submitting
## License ## License
MIT License - See LICENSE file for details. MIT License - See individual scripts for details.
--- ---
*Documentation generated on 2025-10-30 02:59:22 CET by [`doc_bash_generate.sh`](https://github.com/yourusername/yourrepo)* *Scripts collection maintained by valknar*

2003
arty.sh Executable file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB