From cab1d2d4984e67e60b7a4fae56ddfed5b96e03e7 Mon Sep 17 00:00:00 2001 From: Justin Hawkins Date: Thu, 23 Nov 2023 18:11:29 +1030 Subject: [PATCH] Update docco and bump version for v1.0.0 --- CHANGELOG.md | 12 ++++- README.md | 147 +++++++++++++++++++++++++++++++++++++++------------ main.go | 2 +- 3 files changed, 124 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a35c9b..5163b60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,17 @@ All notable changes to this project will be documented in this file. -## [Unreleased] +## [v1.0.0] - 2023-11-23 + +- Don't start downloads until "start download" is pressed +- Add "download option" for more per-download customisability, especially + for destinations +- Removed "destinations" as that is now possible more flexibly with download + options. Configurations using destinations automatically migrated to an + appropriate `yt-dlp -o ...` download options +- Gropple now available via docker +- Clean up web interface display on index page, especially when a playlist + with many files is downloading ## [v0.6.0] - 2023-03-15 diff --git a/README.md b/README.md index 1488c90..444dbf7 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,56 @@ # gropple -A frontend to youtube-dl (or compatible forks, like yt-dlp) to download videos with a single click, straight from your web browser. +A frontend to youtube-dl (or compatible forks, like yt-dlp) to download videos +with a single click, straight from your web browser. ![Screencast](/screencast.gif) -## Pre-requisites +## Installing -* some familiarity with the command line -* youtube-dl (plus any of its required dependencies, like ffmpeg) -* golang compiler (only if you'd like to build from source) - -## Build +### From Source go build -## Binaries - -Binaries are available at +### Standalone Binaries -Gropple will automatically check for available updates and prompt you to -upgrade. +Binaries are available at for most +platforms. ## Running - ./gropple +### From Binaries + + ./gropple There are no command line arguments. All configuration is done via the web interface. The address will be printed after startup: - 2021/09/30 23:53:00 starting gropple v0.5.0 - https://github.com/tardisx/gropple - 2021/09/30 23:53:00 go to http://localhost:6123 for details on installing the bookmarklet and to check status + 2023/11/22 22:42:06 Starting gropple v1.0.0 - https://github.com/tardisx/gropple + 2023/11/22 22:42:07 Configuration loaded from /Users/username/path/config.yml + 2023/11/22 22:42:07 Visit http://localhost:6123 for details on installing the bookmarklet and to check status + +### Docker + +Copy the `docker-compose.yml` to a directory somewhere. + +Edit the two `volume` entries to point to local paths where you would like to +store the config file, and the downloads (the path on the left hand side of the +colon). + +Run `docker-compose up -d` to start the program. + +Note that the docker images include `yt-dlp` and `ffmpeg` and are thus +completely self-contained. + +Run `docker-compose logs` to see the output of the program, if you are having +problems. ## Using -Bring up `http://localhost:6283` (or your configured address) in your browser. -You should see a link to the bookmarklet at the top of the screen, and the list -of downloads (currently empty). +Bring up `http://localhost:6283` (or the appropriate host if you are running it +on a different machine) in your browser. You should see a link to the +bookmarklet at the top of the screen, and the list of downloads (currently +empty). Drag the bookmarklet to your favourites bar, or otherwise bookmark it as you see fit. Any kind of browser bookmark should work. The bookmarklet contains embedded @@ -48,44 +63,106 @@ the bookmarklet. A popup window will appear. Choose a download profile and the download will start. The status will be shown in the window, updating in real time. +There is also an optional "download option" you can choose. These are discussed +below. + You may close this window at any time without stopping the download, the status -of all downloads is available on the index page. +of all downloads is available on the index page. Clicking on the id number will +show the popup again. ## Configuration -Click the "config" link on the index page to configure gropple. The default -options are fine if you are running on your local machine. If you are running it -remotely you will need to set the "server address" to ensure the bookmarklet has -the correct URL in it. +Click the "config" link on the index page to configure gropple. + +The options in each part are dicussed below. + +### Server + +#### Port and Server Address + +You can configure the port number here if you do not want the default of `6123`. + +If you are running it on a machine other than `localhost` you will need to set +the "server address" to ensure the bookmarklet has the correct URL in it. +Similarly, if you are running it behind a reverse proxy, the address here must +match what you would type in the browser so that the bookmarklet will work +correctly. -### Configuring Downloaders +#### Download path + +The download path specifies where downloads will end up, *if* no specific `-o` +options are passed to `yt-dlp`. + +#### Maximum active downloads per domain + +Gropple will limit the number of downloads per domain to this number. Increasing +this will likely result in failed downloads when server rate limiters notice +you. + +#### UI popup size + +Changes the size of the popup window. + +### Download Profiles Gropple's default configuration uses `yt-dlp` and has two profiles set up, one for downloading video, the other for downloading audio (mp3). +Each download profile consists of a name (for your reference), a command to run, +and a number of arguments. + Note that gropple does not include any downloaders, you have to install them -separately. +separately (unless using the docker image). If you would like to use a youtube-dl compatible fork or change the options you -can do so on the right hand side. Create as many profiles as you wish, whenever -you start a download you can choose the appropriate profile. +can do so here. Create as many profiles as you wish, whenever you start a +download you can choose the appropriate profile. Note that the command arguments must each be specified separately - see the -default configuration for an example. +default configuration. For example, if you have a single argument like +`--audio-format mp3`, it will be parsed by the `yt-dlp` as a single, long +unknown argument, and will fail. This needs to be configured as two arguments, +`--audio-format` and `mp3`. While gropple will use your `PATH` to find the executable, you can also specify a full path instead. Note that any tools that the downloader calls itself (for instance, `ffmpeg`) will need to be available on your path. -### Alternate destinations +### Download Options + +There are also an arbitrary amount of Download Options you can configure. Each +one specifies one or more extra arguments to add to the downloader command line. +The most common use for this is to have customised download paths. For instance, +sometimes you might want to bundle all files into a single directory, other +times you might want to separate files by download playlist URL or similar. + +Most of this is done directly through appropriate options for `yt-dlp`, see the +[output template +documentation](https://github.com/yt-dlp/yt-dlp#output-template). + +However, gropple offers two extra substitutions: + + * `%GROPPLE_HOST%` + * `%GROPPLE_PATH%` + +These will be replaced with the hostname, and path of the download, +respectively. + +So, a playlist URL `https://www.youtube.com/@UsernameHere` + +With a download option setup like this: + + * Name of Option: Split by Host and Path + * Arguments: + * -o + * /Downloads/%GROPPLE_HOST%/%GROPPLE_PATH%/%(title)s [%(id)s].%(ext)s -Gropple supports adding additional optional destinations. By default, all -downloads will be stored in the main download path specified in the config. You -can also add one or more destinations, and you can choose one of these -destinations when queueing a new download, or while it is still downloading from -the popup. +Will result in downloads going into the path +`/Downloads/www.youtube.com/@UsernameHere/...`. -The file will be moved after downloading is complete. +Note that this also means that `yt-dlp` can resume partially downloaded files, and +also automatically 'backfill', downloading only files that have not been +downloaded yet from that playlist. ## Portable mode diff --git a/main.go b/main.go index 03e6d60..9c707ae 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ import ( func main() { versionInfo := &version.Manager{ - VersionInfo: version.Info{CurrentVersion: "v1.0.0-alpha.2"}, + VersionInfo: version.Info{CurrentVersion: "v1.0.0"}, } log.Printf("Starting gropple %s - https://github.com/tardisx/gropple", versionInfo.GetInfo().CurrentVersion)