mirror of
https://github.com/snobu/destreamer.git
synced 2026-04-14 14:31:47 +00:00
Compare commits
4 Commits
7efa54932f
...
a129ac0240
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a129ac0240 | ||
|
|
1181290d8f | ||
|
|
21215bc9da | ||
|
|
8b2a02d0ae |
16
README.md
16
README.md
@@ -185,7 +185,7 @@ https://web.microsoftstream.com/video/xxxxxxxx-aaaa-xxxx-xxxx-xxxxxxxxxxxx
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Title template
|
### Title template
|
||||||
The `-t` option allows users to input a template string for the output file names.
|
The `-t` option allows user to specify a custom filename for the videos.
|
||||||
|
|
||||||
You can use one or more of the following magic sequence which will get substituted at runtime. The magic sequence must be surrounded by curly brackets like this: `{title} {publishDate}`
|
You can use one or more of the following magic sequence which will get substituted at runtime. The magic sequence must be surrounded by curly brackets like this: `{title} {publishDate}`
|
||||||
|
|
||||||
@@ -197,8 +197,20 @@ You can use one or more of the following magic sequence which will get substitut
|
|||||||
- `authorEmail`: E-mail of video publisher
|
- `authorEmail`: E-mail of video publisher
|
||||||
- `uniqueId`: An _unique-enough_ ID generated from the video metadata
|
- `uniqueId`: An _unique-enough_ ID generated from the video metadata
|
||||||
|
|
||||||
Example -
|
Examples -
|
||||||
```
|
```
|
||||||
|
Input:
|
||||||
|
-t 'This is an example'
|
||||||
|
|
||||||
|
Expected filename:
|
||||||
|
This is an example.mkv
|
||||||
|
|
||||||
|
Input:
|
||||||
|
-t 'This is an example by {author}'
|
||||||
|
|
||||||
|
Expected filename:
|
||||||
|
This is an example by lukaarma.mkv
|
||||||
|
|
||||||
Input:
|
Input:
|
||||||
-t '{title} - {duration} - {publishDate} - {publishTime} - {author} - {authorEmail} - {uniqueId}'
|
-t '{title} - {duration} - {publishDate} - {publishTime} - {author} - {authorEmail} - {uniqueId}'
|
||||||
|
|
||||||
|
|||||||
@@ -194,11 +194,6 @@ function isOutputTemplateValid(argv: any): boolean {
|
|||||||
match = elementRegEx.exec(finalTemplate);
|
match = elementRegEx.exec(finalTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// bad template from user, switching to default
|
|
||||||
else {
|
|
||||||
logger.warn('Empty output template provided, using default one \n');
|
|
||||||
finalTemplate = '{title} - {publishDate} {uniqueId}';
|
|
||||||
}
|
|
||||||
|
|
||||||
argv.outputTemplate = sanitize(finalTemplate.trim());
|
argv.outputTemplate = sanitize(finalTemplate.trim());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user