1769204832

This commit is contained in:
2026-01-23 23:47:12 +02:00
parent ad58ad90dc
commit a2e0e08490

View File

@@ -17,17 +17,13 @@ def main [subject: string, shortcode: string, number?: int] {
# TODO?: replace with git clone
cp -r ($config_dir)/template $temp_dir
# $template | decode base64 | tar zxvf - --strip-components=1 -C $temp_dir o> /dev/null
generate-doc-toml $shortcode_lower $subject_lower $temp_dir $number
check-mkdir $out_dir
if ($final_dir | path exists) {
error make -u {msg: $"Directory ($final_dir) already exists"}
}
check-mkdir $subject_dir; cp -r $temp_dir $final_dir; rm -rf $temp_dir
print $"=> Created new work: ($final_dir)"
}
@@ -52,7 +48,6 @@ def validate-input [subject: string, shortcode: string, number?: int] {
error make -u {msg: "Work number should be greater than 0"}
}
# Check subject exists (case insensitive)
let subject_lower = ($subject | str downcase)
let subjects = (open $subjects_toml | columns)
if $subject_lower not-in $subjects {