Skip to content

Commit ca0fbb5

Browse files
authored
Add a --dir command argument for setting the download path (#365)
-Manually set output directory for downloads. Download archive should be untouched.
1 parent 0396bb3 commit ca0fbb5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Usage:
106106
[--quiet] [--debug]
107107
[--use-download-archive]
108108
[--output <output>]
109+
[--dir <dir>]
109110
[--ignore-existing-item]
110111
tubeup -h | --help
111112
tubeup --version
@@ -117,6 +118,8 @@ Arguments:
117118
of compatible websites.
118119
--metadata=<key:value> Custom metadata to add to the archive.org
119120
item.
121+
--dir <dir> Provide a directory for downloads and metadata.
122+
120123
Options:
121124
-h --help Show this screen.
122125
-p --proxy <prox> Use a proxy while uploading.

tubeup/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
[--quiet] [--debug]
2626
[--use-download-archive]
2727
[--output <output>]
28+
[--dir <dir>]
2829
[--ignore-existing-item]
2930
tubeup -h | --help
3031
tubeup --version
@@ -35,6 +36,7 @@
3536
of compatible websites.
3637
--metadata=<key:value> Custom metadata to add to the archive.org
3738
item.
39+
--dir <dir> Provide a directory for downloads and metadata.
3840
3941
Options:
4042
-h --help Show this screen.
@@ -74,6 +76,7 @@ def main():
7476
debug_mode = args['--debug']
7577
use_download_archive = args['--use-download-archive']
7678
ignore_existing_item = args['--ignore-existing-item']
79+
dir_path = args['--dir']
7780

7881
if debug_mode:
7982
# Display log messages.
@@ -91,6 +94,7 @@ def main():
9194
metadata = key_value_to_dict(args['--metadata'])
9295

9396
tu = TubeUp(verbose=not quiet_mode,
97+
dir_path=dir_path,
9498
output_template=args['--output'])
9599

96100
try:

0 commit comments

Comments
 (0)