From 53a91b6db6cb5d2e052d4e0a3be621778d42ac82 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sun, 19 May 2019 00:29:23 +0200 Subject: Add external download command #543 #348. Added 'download-command' setting to configure a command/script that handles the download of an uri. With the new setting flag 'download-use-external' can be decided if the external download command is used to download an uri or the built in downloader. --- doc/vimb.1 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'doc') diff --git a/doc/vimb.1 b/doc/vimb.1 index b5d854e..e2bebaa 100644 --- a/doc/vimb.1 +++ b/doc/vimb.1 @@ -1044,6 +1044,29 @@ Default Full-Content zoom level in percent. Default is 100. .B dns-prefetching (bool) Indicates if Vimb prefetches domain names. .TP +.B download-command (string) +A command with placeholder '%s' that will be invoked to download a URI in +case 'download-use-external' is enabled. +.RS +.TP +The following additional environment variable are available: +.PD 0 +.TP +.B $VIMB_URI +The URI of the current opened page, normally the page where the download was +started from, also known as referer. +.TP +.B $VIMB_DOWNLOAD_PATH +Setting value of 'dowanload-path' which would be used normally for downloads. +.PD +.PP +Example: +.PD 0 +.IP ":set download-command=/bin/sh -c ""cd '$VIMB_DOWNLOAD_PATH' \ +&& curl -sLJOC - -e '$VIMB_URI' %s""" +.PD +.RE +.TP .B download-path (string) Path to the default download directory. If no download directory is set, download will be written into current @@ -1051,6 +1074,11 @@ directory. The following pattern will be expanded if the download is started '~/', '~user', '$VAR' and '${VAR}'. .TP +.B download-use-external (bool) +Indicates if the external download tool set as 'download-command' should be +used to handle downloads. +If this is disabled Vimb will handle the download. +.TP .B editor-command (string) Command with placeholder '%s' called if form field is opened with $EDITOR to spawn the editor-like `x-terminal-emulator -e vim %s'. -- cgit v1.2.3