You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
- Attempting to unpack a directory that is not a valid LevelDB database now throws an error.
5
5
- (BoltsJ) Added the `--config` command-line flag. Configuration options read from this file will be merged with the global `.fvttrc.yml` configuration options.
6
6
- (Jeff Hitchcock) Added the `--folders` command-line flag, and corresponding `folders` parameter to `extractPack`. When used, this option writes the pack's entries to a directory structure matching the pack's internal Folder document structure.
7
+
- (Jeff Hitchcock) Added the `--expandAdventures` command-line flags, and corresponding `expandAdventures` parameter to `extractPack`. When used, this option writes each Adventure document's embedded documents to their own files.
7
8
8
9
### Fixes
9
10
- (Jakob Törmä) Fixed launch command assuming electron directory structure.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -213,6 +213,7 @@ Extract the contents of a compendium pack into individual source files for each
213
213
***transformEntry:***(entry: object): Promise<false|void>* A function that is called on every entry. Returning *false* indicates that the entry should be discarded.
214
214
***transformName:***(entry: object): Promise<string|void>* A function that is called on every entry. The value returned from this will be used as the entry's filename and must include the appropriate file extension. If nothing is returned, an auto-generated name will be used instead.
215
215
***transformFolderName:***(entry: object): Promise<string|void>* A function used to generate a directory name for an extracted Folder document when the `folders` option is used.
216
+
***expandAdventures:***boolean* Write documents emebdded in Adventures to their own files. If the `folders` option is also supplied, the Adventure is treated like a folder, and written to `_Adventure.{yml|json}` instead of `_Folder.{yml|json}`.
216
217
***jsonOptions:***object*
217
218
***replacer:***(key: string, value: any): any|Array<string|number>* A replacer function or an array of property names in the object to include in the resulting string.
218
219
***space:***string|number* A number of spaces or a string to use as indentation.
* @property {boolean} [clean] When unpacking, delete the destination directory first.
29
29
* @property {boolean} [folders] When unpacking, create a directory structure that matches the
30
30
* compendium folders.
31
+
* @property {boolean} [expandAdventures] When unpacking, extract adventure documents into a folder with
32
+
* each contained document as its own entry in a folder.
31
33
*/
32
34
33
35
/**
@@ -132,6 +134,11 @@ export function getCommand() {
132
134
type: "boolean"
133
135
});
134
136
137
+
yargs.option("expandAdventures",{
138
+
describe: "When unpacking, extract documents embedded inside Adventures to their own files. If supplied alongside the --folders option, the Adventure is treated like a folder.",
139
+
type: "boolean"
140
+
});
141
+
135
142
returnyargs;
136
143
},
137
144
handler: asyncargv=>{
@@ -381,7 +388,7 @@ async function handleUnpack(argv) {
0 commit comments