Changes as per second PR review

This commit is contained in:
Nitesh Sawant
2018-02-05 23:01:44 +05:30
parent 0e3249646f
commit a8f261edae
2 changed files with 4 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ optional arguments:
-ll {INFO,WARNING,ERROR,DEBUG}, --log-level {INFO,WARNING,ERROR,DEBUG}
set log verbosity (default: INFO)
-c CONFIG_FILE_PATH --config CONFIG_FILE_PATH
path to custom config.yml file
Replace with custom config.yml file (default: None)
```
#### Download by Name
@@ -265,7 +265,7 @@ Also note that config options are overridden by command-line arguments.
#### Specify the Custom Config File Path
If you want to use custom `config.yml` instead of default one, you can use `-c`/`--config` option.
If you want to use custom `.yml` configuration instead of the default one, you can use `-c`/`--config` option.
E.g. `$ python3 spotdl.py -s "adele hello" -c "/home/user/customConfig.yml"`
## [Docker Image](https://hub.docker.com/r/ritiek/spotify-downloader/)

View File

@@ -40,6 +40,7 @@ def merge(default, config):
merged.update(config)
return merged
def get_config(config_file):
try:
with open(config_file, 'r') as ymlfile:
@@ -73,6 +74,7 @@ def override_config(config_file, parser, raw_args=None):
return parser.parse_args(raw_args)
def get_arguments(raw_args=None, to_group=True, to_merge=True):
parser = argparse.ArgumentParser(
description='Download and convert songs from Spotify, Youtube etc.',