a scripting language created for file management and processing. mirror of https://codeberg.org/ignis621/ignish
* Media.open(path) returns an object with chainable settings, nothing runs until save(), example Media.open("a.mkv").scale(-1, 720).fps(30).save("a.mp4")
* VIDEO: scale, crop, rotate, hflip, vflip, fps, vcodec, crf, vb, preset, vn. SOUND: volume, an, acodec, ab, ar, ac. time: trim, ss, to, speed
* aliases video_codec, audio_codec, bitrate, mute, no_audio, flip_horizontal and so on
* probe() / info() give duration, size, fps, codecs etc as a dict from ffprobe
* sizes, bitrates and times are turned into no suffix numbers before they go into the command: 200k=200000, 2MiB = 2097152, 1:30=90
* save(path, force) also shows a pgoress bar
* save writes to a hidden .part- file first and renames it when its done, so ctrl+c or a failed ffmpeg wont leave a broken video :3
* compress_to(size) picks the bitrates for a target file size, checks the result and encodes again if it came out too big (up to 3 tries)
* run_noshell, eval_noshell and spawn_noshell take an array like ["ffmpeg", "-i", path] and start the program without a shell
* run, eval and spawn still use the shell, but go through util/process.c now instead of system(), popen() and their own fork code
* util/process.c starts every program in the foreground, capturing output, or in the background. Media uses it without a shell
* util/units.c parses amounts and times
* progress bars now cut off labels that would make the line wrap
|
||
|---|---|---|
| .vscode | ||
| assets | ||
| demos | ||
| src | ||
| .clang-format | ||
| .gitignore | ||
| compile_flags.txt | ||
| LICENSE.md | ||
| Makefile | ||
| PKGBUILD | ||
| README.md | ||
ignish
/ˈiɡ.ɲiʂ/
a minimal domain-specific scripting language for lightning-fast file management and automation.
⋆。°✩ ⋆⁺。˚ ✦ highlights ✦ ˚。⁺⋆ ✩°。⋆
- ✧ sub-millisecond startup ✧ cold boots in
< 1ms(~10x faster than python) - ✧ featherweight binary ✧ standalone interpreter is only
~155 KB(~138 KBon-Os) - ✧ standalone executables ✧ compile scripts into self-contained single binaries
- ✧ minimal memory footprint ✧ runs with as little as
~2.7 MBpeak RAM - ✧ zero dependencies ✧ pure C99 + POSIX (
libc&libm) -- builds anywhere in seconds - ✧ object-oriented filesystem ✧
f.ensure().chmod(755).append(...)
// quick demo!
// iterate through a directory, filter by extension, and execute commands
var media_dir = dir("./media")
for item in media_dir.walk() {
if (item.extension in ["mp4", "mkv"]) {
print("found video: ${item.name} (${item.filesize} bytes)")
}
}
─── ⋆⋅☆⋅⋆ ───
Note
ignish is still in its early stages! you might run into bugs, breaking changes or memory leaks before v1.0. if you find anything weird, please feel free to report it here! other than that have fun :D
installation
currently, the best way to install ignish is by building it from source.
this will build the latest tag, which should be somewhat stable:
git clone https://codeberg.org/ignis621/ignish.git
cd ignish
makepkg -si
ignish --help
if you wish to build from latest source, try this:
git clone https://codeberg.org/ignis621/ignish.git
cd ignish
git checkout develop
git pull
make
./build/ignish --help
documentation
full documentation and language tutorials are in the ignish wiki.
license
this piece of software is licensed under GPL-3.0-only
that means:
- you can copy, distribute, and modify the software.
- you must track changes and dates in modified source files.
- you must release derivative works and modifications under GPL-3.0.
- you must provide the complete source code if you distribute compiled binaries.
- you must keep all copyright notices, license texts, and disclaimers intact.
- the software is provided without any warranty