From c2c30adb28c5f7a41c476261a7519b37ca952ffe Mon Sep 17 00:00:00 2001 From: Juhani Krekelä Date: Thu, 12 Sep 2024 22:53:49 +0300 Subject: Show video titles using yt-dlp Different video URLs can be easy to confuse in the output of later(1). Look up titles for them in $XDG_CACHE_HOME/later/title.json and add an option, --update-titles, to populate the file automatically using yt-dlp. The title is prefixed with a hash sign (#) in order to better separate it visually from the URLs, as well as to allow easier copypasting of output onto an mpv command line. --- later.1 | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'later.1') diff --git a/later.1 b/later.1 index 6b2bec9..c0ba5e5 100644 --- a/later.1 +++ b/later.1 @@ -1,4 +1,4 @@ -.Dd September 10, 2024 +.Dd September 12, 2024 .Dt LATER 1 .Os .Sh NAME @@ -6,12 +6,31 @@ .Nd list mpv's watch_later entries .Sh SYNOPSIS .Nm -.Op Fl h -.Op Fl \-help +.Op Fl u | \-update-titles +.Nm +.Fl h | \-help .Sh DESCRIPTION .Nm lists all watch_later entries as saved by .Xr mpv 1 . +.Pp +The options are as follows: +.Bl -tag -width "-h, --update-titles" +.It Fl u , Fl \-update-titles +update titles of videos using yt-dlp +.It Fl h , Fl \-help +show a conscise help message +.El +.Sh FILES +.Bl -tag -width "1" +.It Pa $XDG_CACHE_HOME/later/titles.json +JSON-encoded mapping of URLs to video titles. +Populated by running +.Nm +with the +.Fl \-update-titles +option. +.El .Sh SEE ALSO .Xr mpv 1 .Sh AUTHORS @@ -19,3 +38,5 @@ lists all watch_later entries as saved by .Nm was written by .An Wolfgang Müller Aq Mt wolf@oriole.systems +with yt-dlp integration by +.An Juhani Krekelä Aq Mt juhani@krekelä.fi -- cgit v1.2.3-2-gb3c3