;;; w3m-download.el --- download using emacs-w3m -*- coding: utf-8 ; lexical-binding: t -*- ;; Copyright © 2019-2021 Boruch Baum ;; Authors: Boruch Baum ;; Keywords: w3m, WWW, hypermedia ;; Homepage: http://emacs-w3m.namazu.org/ ;; Repository: https://github.com/emacs-w3m/emacs-w3m ;; This file is part of `emacs-w3m'. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; This file provides download features for the `emacs-w3m' project. ;; Although the project is meant to be a front-end to the `w3m' ;; browser, this code uses elisp and, when available, external ;; back-end programs (currently just `wget') in order to offer ;; additional download features not native to `w3m': ;; ;; + Partial downloads are stored on disk, not in memory (yes...). ;; ;; + Resumption of partial downloads that were interrupted due to ;; aborts or other failures. ;; ;; + Bulk downloading of a buffer's links or region's links, ;; selectable by regex and a presentation buffer. Throughout the ;; code, this feature is referred to as `download-select'. ;; ;; + The number of simultaneous downloads may be controlled, and can ;; be dynamically changed. ;; ;; + Downloads are queued, and the queue can be modified in ;; real-time. ;; ;; + Video downloads do not need actual download links, but can be ;; scraped from web pages. This extension requires the external ;; program `youtube-dl' (as is not limited to youtube). ;; ;; + Downloads may be 'throttled' to limit bandwidth per download. ;; ;; + Optional appending of meta-data to a download. ;; ;; + Defcustom `w3m-download-save-metadata' controls whether ;; downloaded `png' and `jpeg' files should have their link's ;; "alt" caption is stored as meta-data element ;; "Exif.Image.ImageDescription". Note that enabling this option ;; will modify the file's checksum. This option currently uses ;; `exif' and `exiv2' as external back-end programs. ;; ;; Some ways to view from the command-line an embedded caption ;; are: ;; ;; exiv2 -g "Exif.Image.ImageDescription" foo.png ;; exif --ifd=0 -t0x010e foo.jpg |grep value ;; ;; + Defcustom `w3m-download-enable-xattr' controls whether to ;; save a file's original URL and Referer HTTP header value. ;; This feature uses the `wget' `--xattr' argument and thus ;; requires that the save-path be on a file-system that supports ;; extended attributes. ;; ;; Be aware that the URL might contain private information like ;; access tokens or credentials. ;; ;; + Individual detailed download progress logs in dedicated ;; buffers, automatically deleted upon successful completion. ;; ;; + A single central buffer to view all downloads in all states ;; (queued, running, paused, failed, and completed), act on them, ;; and see their details. The buffer includes a summary statistics ;; line. ;; ;; + Downloads can be paused, resumed, and removed. ;; ;; + The category order of the display can be easily customized. ;; ;; + Dedicated faces for each download category. ;; ;; + Download links that are 'hidden' within HTML source code inside ;;