Skip to content

Commit 795d621

Browse files
committed
docs: add KTOOLBOX_JOB__FILENAME_FORMAT example
Closes #116
1 parent 8b6d122 commit 795d621

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

docs/en/configuration/guide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ KTOOLBOX_JOB__POST_STRUCTURE__ATTACHMENTS=./
1818
# Rename attachments in numerical order, e.g. `1.png`, `2.png`, ...
1919
KTOOLBOX_JOB__SEQUENTIAL_FILENAME=True
2020
21+
# Customize the filename format by inserting an empty `{}` to represent the basic filename.
22+
# Similar to `post_dirname_format`, you can use some of the properties in `Post`.
23+
# For example: `{title}_{}` > `HelloWorld_b4b41de2-8736-480d-b5c3-ebf0d917561b`, etc.
24+
# You can also use it with `sequential_filename`. For instance,
25+
# `[{published}]_{}` > `[2024-1-1]_1.png`, `[2024-1-1]_2.png`, etc.
26+
KTOOLBOX_JOB__FILENAME_FORMAT=[{published}]_{}
27+
2128
# Prefix the post directory name with its release/publish date, e.g. `[2024-1-1]HelloWorld`
2229
KTOOLBOX_JOB__POST_DIRNAME_FORMAT=[{published}]{title}
2330

docs/zh/configuration/guide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ KTOOLBOX_JOB__POST_STRUCTURE__ATTACHMENTS=./
1818
# 按照数字顺序重命名附件, 例如 `1.png`, `2.png`, ...
1919
KTOOLBOX_JOB__SEQUENTIAL_FILENAME=True
2020
21+
# 通过插入一个代表了基本文件名的空白的 `{}` 以自定义文件名格式
22+
# 与 `post_dirname_format` 类似,你可以使用一些 `Post` 类里的属性
23+
# 例如 `{title}_{}` > `HelloWorld_b4b41de2-8736-480d-b5c3-ebf0d917561b`
24+
# 你也可以和 `sequential_filename` 搭配使用
25+
# 例如 `[{published}]_{}` > `[2024-1-1]_1.png`, `[2024-1-1]_2.png`
26+
KTOOLBOX_JOB__FILENAME_FORMAT=[{published}]_{}
27+
2128
# 将发布日期作为作品目录名的开头,例如 `[2024-1-1]HelloWorld`
2229
KTOOLBOX_JOB__POST_DIRNAME_FORMAT=[{published}]{title}
2330

example.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ KTOOLBOX_JOB__POST_STRUCTURE__ATTACHMENTS=./
88
# Rename attachments in numerical order, e.g. `1.png`, `2.png`, ...
99
KTOOLBOX_JOB__SEQUENTIAL_FILENAME=True
1010

11+
# Customize the filename format by inserting an empty `{}` to represent the basic filename.
12+
# Similar to `post_dirname_format`, you can use some of the properties in `Post`.
13+
# For example: `{title}_{}` > `HelloWorld_b4b41de2-8736-480d-b5c3-ebf0d917561b`, etc.
14+
# You can also use it with `sequential_filename`. For instance,
15+
# `[{published}]_{}` > `[2024-1-1]_1.png`, `[2024-1-1]_2.png`, etc.
16+
KTOOLBOX_JOB__FILENAME_FORMAT=[{published}]_{}
17+
1118
# Prefix the post directory name with its release/publish date, e.g. `[2024-1-1]HelloWorld`
1219
KTOOLBOX_JOB__POST_DIRNAME_FORMAT=[{published}]{title}
1320

0 commit comments

Comments
 (0)