ocrd resmgr: use resource_location from config for default
@@ -18,6 +18,9 @@ from ocrd_utils import (
from ocrd_validators import OcrdZipValidator
from ..resource_manager import OcrdResourceManager
+from ..config import load_config_file
+
+config = load_config_file()
def print_resources(executable, reslist):
print('%s' % executable)
@@ -56,7 +59,7 @@ def list_installed(executable=None):
@resmgr_cli.command('download')
@click.option('-n', '--any-url', help='Allow downloading/copying unregistered resources', is_flag=True)
@click.option('-o', '--overwrite', help='Overwrite existing resources', is_flag=True)
-@click.option('-l', '--location', help='Where to store resources', type=click.Choice(RESOURCE_LOCATIONS), default='virtualenv', show_default=True)
+@click.option('-l', '--location', help='Where to store resources', type=click.Choice(RESOURCE_LOCATIONS), default=config.resource_location, show_default=True)
@click.argument('executable', required=True)
@click.argument('url_or_name', required=True)
def download(any_url, overwrite, location, executable, url_or_name):
