Added quit after finish option
This commit is contained in:
parent
457b8cd21c
commit
2fd9248715
|
@ -23,7 +23,7 @@ This program downloads imgur, gfycat and direct image and video links of saved p
|
||||||
|
|
||||||
- **MacOS** users have to **[compile it from source code](docs/COMPILE_FROM_SOURCE.md)**.
|
- **MacOS** users have to **[compile it from source code](docs/COMPILE_FROM_SOURCE.md)**.
|
||||||
|
|
||||||
Script also accepts **command-line arguments**, get further information from **[`--help`](docs/COMMAND_LINE_ARGUMENTS.md)**
|
Script also accepts additional options via command-line arguments, get further information from **[`--help`](docs/COMMAND_LINE_ARGUMENTS.md)**
|
||||||
|
|
||||||
## Setting up the script
|
## Setting up the script
|
||||||
Because this is not a commercial app, you need to create an imgur developer app in order API to work.
|
Because this is not a commercial app, you need to create an imgur developer app in order API to work.
|
||||||
|
|
|
@ -5,12 +5,12 @@ See **[compiling from source](COMPILE_FROM_SOURCE.md)** page first unless you ar
|
||||||
***Use*** `.\bulk-downloader-for-reddit.exe` ***or*** `./bulk-downloader-for-reddit` ***if you are using the executable***.
|
***Use*** `.\bulk-downloader-for-reddit.exe` ***or*** `./bulk-downloader-for-reddit` ***if you are using the executable***.
|
||||||
```console
|
```console
|
||||||
$ python script.py --help
|
$ python script.py --help
|
||||||
usage: script.py [-h] [--directory DIRECTORY] [--link link] [--saved]
|
usage: script.py [-h] [--directory DIRECTORY] [--NoDownload] [--verbose]
|
||||||
[--submitted] [--upvoted] [--log LOG FILE]
|
[--quit] [--link link] [--saved] [--submitted] [--upvoted]
|
||||||
[--subreddit SUBREDDIT [SUBREDDIT ...]]
|
[--log LOG FILE] [--subreddit SUBREDDIT [SUBREDDIT ...]]
|
||||||
[--multireddit MULTIREDDIT] [--user redditor]
|
[--multireddit MULTIREDDIT] [--user redditor]
|
||||||
[--search query] [--sort SORT TYPE] [--limit Limit]
|
[--search query] [--sort SORT TYPE] [--limit Limit]
|
||||||
[--time TIME_LIMIT] [--NoDownload] [--verbose]
|
[--time TIME_LIMIT]
|
||||||
|
|
||||||
This program downloads media from reddit posts
|
This program downloads media from reddit posts
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@ optional arguments:
|
||||||
--directory DIRECTORY, -d DIRECTORY
|
--directory DIRECTORY, -d DIRECTORY
|
||||||
Specifies the directory where posts will be downloaded
|
Specifies the directory where posts will be downloaded
|
||||||
to
|
to
|
||||||
|
--NoDownload Just gets the posts and store them in a file for
|
||||||
|
downloading later
|
||||||
|
--verbose, -v Verbose Mode
|
||||||
|
--quit, -q Quit afer the proccess finishes
|
||||||
--link link, -l link Get posts from link
|
--link link, -l link Get posts from link
|
||||||
--saved Triggers saved mode
|
--saved Triggers saved mode
|
||||||
--submitted Gets posts of --user
|
--submitted Gets posts of --user
|
||||||
|
@ -38,9 +42,6 @@ optional arguments:
|
||||||
--limit Limit default: unlimited
|
--limit Limit default: unlimited
|
||||||
--time TIME_LIMIT Either hour, day, week, month, year or all. default:
|
--time TIME_LIMIT Either hour, day, week, month, year or all. default:
|
||||||
all
|
all
|
||||||
--NoDownload Just gets the posts and store them in a file for
|
|
||||||
downloading later
|
|
||||||
--verbose, -v Verbose Mode
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
30
script.py
30
script.py
|
@ -66,6 +66,22 @@ def parseArguments(arguments=[]):
|
||||||
help="Specifies the directory where posts will be " \
|
help="Specifies the directory where posts will be " \
|
||||||
"downloaded to",
|
"downloaded to",
|
||||||
metavar="DIRECTORY")
|
metavar="DIRECTORY")
|
||||||
|
|
||||||
|
parser.add_argument("--NoDownload",
|
||||||
|
help="Just gets the posts and store them in a file" \
|
||||||
|
" for downloading later",
|
||||||
|
action="store_true",
|
||||||
|
default=False)
|
||||||
|
|
||||||
|
parser.add_argument("--verbose","-v",
|
||||||
|
help="Verbose Mode",
|
||||||
|
action="store_true",
|
||||||
|
default=False)
|
||||||
|
|
||||||
|
parser.add_argument("--quit","-q",
|
||||||
|
help="Quit afer the proccess finishes",
|
||||||
|
action="store_true",
|
||||||
|
default=False)
|
||||||
|
|
||||||
parser.add_argument("--link","-l",
|
parser.add_argument("--link","-l",
|
||||||
help="Get posts from link",
|
help="Get posts from link",
|
||||||
|
@ -137,18 +153,6 @@ def parseArguments(arguments=[]):
|
||||||
choices=["all","hour","day","week","month","year"],
|
choices=["all","hour","day","week","month","year"],
|
||||||
metavar="TIME_LIMIT",
|
metavar="TIME_LIMIT",
|
||||||
type=str)
|
type=str)
|
||||||
|
|
||||||
parser.add_argument("--NoDownload",
|
|
||||||
help="Just gets the posts and store them in a file" \
|
|
||||||
" for downloading later",
|
|
||||||
action="store_true",
|
|
||||||
default=False)
|
|
||||||
|
|
||||||
parser.add_argument("--verbose","-v",
|
|
||||||
help="Verbose Mode",
|
|
||||||
action="store_true",
|
|
||||||
default=False)
|
|
||||||
|
|
||||||
|
|
||||||
if arguments == []:
|
if arguments == []:
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
@ -696,4 +700,4 @@ if __name__ == "__main__":
|
||||||
exc_info=full_exc_info(sys.exc_info()))
|
exc_info=full_exc_info(sys.exc_info()))
|
||||||
print(log_stream.getvalue())
|
print(log_stream.getvalue())
|
||||||
|
|
||||||
input("\nPress enter to quit\n")
|
if not GLOBAL.arguments.quit: input("\nPress enter to quit\n")
|
||||||
|
|
Loading…
Reference in a new issue