bebebebebebbbeb
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# Configuration
|
# Configuration
|
||||||
let template_dir = ".typst-template"
|
let template_dir = ".typst-template"
|
||||||
let config_dir = ".config"
|
let config_dir = ".config"
|
||||||
let out_dir = (pwd)
|
let out_dir = $"(pwd)/works"
|
||||||
|
|
||||||
def main [subject: string, shortcode: string, number: string = ""] {
|
def main [subject: string, shortcode: string, number: string = ""] {
|
||||||
let subject_lower = ($subject | str downcase)
|
let subject_lower = ($subject | str downcase)
|
||||||
@@ -45,7 +45,7 @@ def validate-input [subject: string, shortcode: string, number: string] {
|
|||||||
error make -u {msg: "subjects.toml not found in config directory"}
|
error make -u {msg: "subjects.toml not found in config directory"}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $out_dir != "." and not ($out_dir | path exists) {
|
if not ($out_dir | path exists) {
|
||||||
mkdir $out_dir
|
mkdir $out_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Configuration
|
# Configuration
|
||||||
template_dir := ".typst-template"
|
template_dir := ".typst-template"
|
||||||
config_dir := ".config"
|
config_dir := ".config"
|
||||||
out_dir := ""
|
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
default:
|
default:
|
||||||
@@ -9,4 +8,4 @@ default:
|
|||||||
|
|
||||||
# Create new work from template
|
# Create new work from template
|
||||||
new subject shortcode number="":
|
new subject shortcode number="":
|
||||||
./.config/create-work.nu {{subject}} {{shortcode}} {{number}}
|
@./.config/create-work.nu {{subject}} {{shortcode}} {{number}}
|
||||||
|
|||||||
Reference in New Issue
Block a user