a scripting language created for file management and processing
set_variable, if one exists, overwrites the variable ONLY instead of overwriting it and creating another one. this fixes loop variable shadowing overloading environment with new never to be found vars |
||
|---|---|---|
| test_scripts | ||
| .gitignore | ||
| ast.c | ||
| ast.h | ||
| build.c | ||
| build.h | ||
| builtins.c | ||
| builtins.h | ||
| eval.c | ||
| eval.h | ||
| lexer.c | ||
| lexer.h | ||
| LICENSE.md | ||
| logger.c | ||
| logger.h | ||
| main.c | ||
| Makefile | ||
| parser.c | ||
| parser.h | ||
| preprocessor.c | ||
| preprocessor.h | ||
| README.md | ||
ignish
ignish (/ˈiɡ.ɲiʂ/) is a minimal domain-specific scripting language for file management and processing.
it tries to separate logic from shell execution. you write all of your logic, checks, etc in ignish, and then build and execute the shell command.
Note
this project is in it's very early stages! i don't even know if i'll ever finish it. check out .ish scripts other than test99.ish for what's currently working.
// this is what i want to have in the 1.0 release
var path = eval("pwd") // find current path
var my_dir = dir(path) // get a Directory object
// define a function with an argument
func process_directory(dir) {
var items = dir.get_elements() // get all items in this directory
for (element in items) {
if (element.is_file()) {
// if its a file, process it with ffmpeg and append -h265
var path = element.path
var name = element.name
var basename = element.basename
var output = "${my_dir}/${basename}-h265.mp4"
print("currently processing: ${name}")
eval("ffmpeg -i ${path} -vcodec libx265 -b:v 500k -acodec libopus ${output}")
} else {
// it is a directory, so just pass it back into the function
process_directory(element)
}
}
}
// start the loop
process_directory(my_dir)