diff --git a/transform.ts b/transform.ts new file mode 100644 index 0000000..19e9aea --- /dev/null +++ b/transform.ts @@ -0,0 +1,12 @@ +import $ from "https://deno.land/x/dax@0.7.1/mod.ts"; + +import { expandGlob } from "https://deno.land/std@0.148.0/fs/mod.ts"; +import { relative, parse, resolve } from "https://deno.land/std@0.148.0/path/mod.ts"; + +for await (const file of expandGlob("*.wav")){ + const from = relative(Deno.cwd(),file.path); + const parsed = parse(from); + const to = resolve(parsed.dir,parsed.name+".flac") + console.log(from, to); + await $`ffmpeg -i ${from} ${to}` +} \ No newline at end of file