recursive traversal is implicit

This commit is contained in:
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",
o: "output",
m: "mode",
r: "recursive",
},
boolean: ["recursive"],
default: {
w: 640,
h: 640,
@ -43,7 +41,7 @@ args["_"].forEach((arg) => {
if (Deno.statSync(arg).isDirectory) {
Array.from(
walkSync(arg, {
maxDepth: args["recursive"] ? Infinity : 1,
maxDepth: Infinity,
includeDirs: false,
includeFiles: true,
exts: includeExtensions.length ? includeExtensions : undefined,

View file

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