recursive traversal is implicit

master
Tomáš Mládek 2021-09-20 22:43:25 +02:00
parent 85881f877c
commit bfe739a487
2 changed files with 1 additions and 4 deletions

View File

@ -17,9 +17,7 @@ const args = parse(Deno.args, {
h: "height", h: "height",
o: "output", o: "output",
m: "mode", m: "mode",
r: "recursive",
}, },
boolean: ["recursive"],
default: { default: {
w: 640, w: 640,
h: 640, h: 640,
@ -43,7 +41,7 @@ args["_"].forEach((arg) => {
if (Deno.statSync(arg).isDirectory) { if (Deno.statSync(arg).isDirectory) {
Array.from( Array.from(
walkSync(arg, { walkSync(arg, {
maxDepth: args["recursive"] ? Infinity : 1, maxDepth: Infinity,
includeDirs: false, includeDirs: false,
includeFiles: true, includeFiles: true,
exts: includeExtensions.length ? includeExtensions : undefined, exts: includeExtensions.length ? includeExtensions : undefined,

View File

@ -138,7 +138,6 @@ class KollagenBot:
with NamedTemporaryFile(suffix=".png") as ntf: with NamedTemporaryFile(suffix=".png") as ntf:
shell_cmd_line = [ shell_cmd_line = [
self.kollagen_path, self.kollagen_path,
"-r",
*directories, *directories,
"-w", "-w",
str(args.width), str(args.width),