mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Fix accidental inconsistency between savetiddlers and rendertiddlers
“-do-not-delete” flag for savetiddlers command was introduced in 5.1.10 without consistency with the already implemented “noclean” flag for the rendertiddlers command
This commit is contained in:
parent
7b8928886b
commit
814353d8ce
@ -15,4 +15,4 @@ For example:
|
||||
|
||||
By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
|
||||
|
||||
Any files in the target directory are deleted unless the "noclean" parameter is specified. The target directory is recursively created if it is missing.
|
||||
Any files in the target directory are deleted unless the ''noclean'' flag is specified. The target directory is recursively created if it is missing.
|
||||
|
@ -4,11 +4,11 @@ description: Saves a group of raw tiddlers to a directory
|
||||
Saves a group of tiddlers in their raw text or binary format to the specified directory.
|
||||
|
||||
```
|
||||
--savetiddlers <filter> <pathname> [-do-not-delete]
|
||||
--savetiddlers <filter> <pathname> ["noclean"]
|
||||
```
|
||||
|
||||
By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
|
||||
|
||||
The output directory is cleared of existing files before saving the specified files. The deletion can be disabled by specifying the ''-do-not-delete'' flag.
|
||||
The output directory is cleared of existing files before saving the specified files. The deletion can be disabled by specifying the ''noclean'' flag.
|
||||
|
||||
Any missing directories in the pathname are automatically created.
|
||||
|
@ -39,7 +39,7 @@ Command.prototype.execute = function() {
|
||||
pathname = path.resolve(outputPath,this.params[2]),
|
||||
type = this.params[3] || "text/html",
|
||||
extension = this.params[4] || ".html",
|
||||
deleteDirectory = (this.params[5] || "") != "noclean",
|
||||
deleteDirectory = (this.params[5] || "").toLowerCase() !== "noclean",
|
||||
tiddlers = wiki.filterTiddlers(filter);
|
||||
if(deleteDirectory) {
|
||||
$tw.utils.deleteDirectory(pathname);
|
||||
|
@ -35,9 +35,9 @@ Command.prototype.execute = function() {
|
||||
wiki = this.commander.wiki,
|
||||
filter = this.params[0],
|
||||
pathname = path.resolve(this.commander.outputPath,this.params[1]),
|
||||
dontDelete = (this.params[2] || "").toLowerCase() === "-do-not-delete",
|
||||
deleteDirectory = (this.params[2] || "").toLowerCase() !== "noclean",
|
||||
tiddlers = wiki.filterTiddlers(filter);
|
||||
if(!dontDelete) {
|
||||
if(deleteDirectory) {
|
||||
$tw.utils.deleteDirectory(pathname);
|
||||
}
|
||||
$tw.utils.createDirectory(pathname);
|
||||
|
@ -4,11 +4,11 @@ description: 将一群条目的原始内容保存到一个文件夹
|
||||
保存一群条目的原始文字或二进制格式到指定的文件夹。
|
||||
|
||||
```
|
||||
--savetiddlers <filter> <pathname> [-do-not-delete]
|
||||
--savetiddlers <filter> <pathname> [noclean]
|
||||
```
|
||||
|
||||
默认情况下,路径名被解析为相对于版本文件夹的 `output` 子文件夹。 `--output` 命令可以用于将输出指定到一个不同的文件夹。
|
||||
|
||||
保存指定的文件之前,会先清除输出目录的现有文件。可藉由指定 `-do-not-delete` 旗标,禁用该删除动作。
|
||||
保存指定的文件之前,会先清除输出目录的现有文件。可藉由指定 `noclean` 旗标,禁用该删除动作。
|
||||
|
||||
自动创建在路径中任何缺少的文件夹。
|
||||
|
@ -4,11 +4,11 @@ description: 將一群條目的原始內容儲存到一個資料夾
|
||||
儲存一群條目的原始文字或二進位格式到指定的資料夾。
|
||||
|
||||
```
|
||||
--savetiddlers <filter> <pathname> [-do-not-delete]
|
||||
--savetiddlers <filter> <pathname> [noclean]
|
||||
```
|
||||
|
||||
預設情況下,路徑名被解析為相對於版本資料夾的 `output` 子資料夾。 `--output` 命令可以用於將輸出指定到一個不同的資料夾。
|
||||
|
||||
儲存指定的檔案之前,會先清除輸出目錄的現有檔案。可藉由指定 `-do-not-delete` 旗標,停用該刪除動作。
|
||||
儲存指定的檔案之前,會先清除輸出目錄的現有檔案。可藉由指定 `noclean` 旗標,停用該刪除動作。
|
||||
|
||||
自動建立在路徑中任何缺少的資料夾。
|
||||
|
Loading…
Reference in New Issue
Block a user