branch: externals/eev commit 62d6965e946465d2f64ac7f133b759958de71370 Author: Eduardo Ochs <eduardoo...@gmail.com> Commit: Eduardo Ochs <eduardoo...@gmail.com>
Added `find-2022yttranscriptvideo'. --- ChangeLog | 8 ++++++++ VERSION | 4 ++-- eev-tlinks.el | 19 ++++++++++--------- eev-videolinks.el | 26 +++++++++++++++++++++++++- 4 files changed, 45 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7ba306c7e..94e862d86c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ +2022-10-21 Eduardo Ochs <eduardoo...@gmail.com> + + * eev-videolinks.el (find-2022yttranscriptvideo): new function. + (ee-1stclassvideos-info): added an entry for ""2022yttranscript". + 2022-10-20 Eduardo Ochs <eduardoo...@gmail.com> + * eev-tlinks.el (ee-youtubedl-split): use `let*'. + (find-yttranscript-links): added a shorter format. + * eev-pdflike.el (ee-code-pdfbackend, ee-code-pdftextbackend): fixed a bug in the interactive. diff --git a/VERSION b/VERSION index 71aeb2c3db..eb71105157 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -Thu Oct 20 04:38:53 GMT 2022 -Thu Oct 20 01:38:53 -03 2022 +Fri Oct 21 04:43:21 GMT 2022 +Fri Oct 21 01:43:21 -03 2022 diff --git a/eev-tlinks.el b/eev-tlinks.el index 5cf6bfa292..de0f6d9d99 100644 --- a/eev-tlinks.el +++ b/eev-tlinks.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20221019 +;; Version: 20221020 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-tlinks.el> @@ -1087,14 +1087,13 @@ cd {dir} (defun ee-youtubedl-split (fname) "Split FNAME into (dir title hash ext ext-)." (string-match ee-youtubedl-ext-re fname) - (let (dir title hash ext- ext dth dt) - (setq ext- (match-string 1 fname)) - (setq ext (match-string 0 fname)) - (setq dth (substring fname 0 (match-beginning 0))) - (setq hash (substring dth -11)) - (setq dt (substring dth 0 -12)) - (setq title (file-name-nondirectory dt)) - (setq dir (file-name-directory dt)) + (let* ((ext- (match-string 1 fname)) + (ext (match-string 0 fname)) + (dth (substring fname 0 (match-beginning 0))) + (hash (substring dth -11)) + (dt (substring dth 0 -12)) + (title (file-name-nondirectory dt)) + (dir (file-name-directory dt))) (list dir title hash ext- ext))) (defun ee-youtubedl-dir (fname) (nth 0 (ee-youtubedl-split fname))) @@ -1156,6 +1155,7 @@ Files that look like subtitle files are ignored." ;; ;; Suggestion (2021nov26): install yt-dlp and either put this in your .emacs, ;; +;; ;; From: (find-eev "eev-tlinks.el" "ee-youtubedl-command") ;; (setq ee-youtubedl-command "yt-dlp -o '%(title)s-%(id)s.%(ext)s'") ;; ;; and put a copy of this fake youtube-dl script @@ -3462,6 +3462,7 @@ url = \"http://www.youtube.com/watch?v={hash}\" f = \"find-{c}video\" tr = youtube_transcript_downloader.get_transcript(url) trits0 = tr.items() +trits1 = '\\n'.join((key + ' ' + text for key, text in trits0)) trits1 = '\\n'.join(('% (' + f + ' \"' + key + '\" \"' + text + '\")' for key, text in trits0)) print(trits1) diff --git a/eev-videolinks.el b/eev-videolinks.el index fab3a59201..d07e0abb9a 100644 --- a/eev-videolinks.el +++ b/eev-videolinks.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20220518 +;; Version: 2022oct21 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-videolinks.el> @@ -67,6 +67,7 @@ ;; «.find-2022eevwconfigpt1video» (to "find-2022eevwconfigpt1video") ;; «.find-2022eevwconfigpt2video» (to "find-2022eevwconfigpt2video") ;; «.find-2022eevwconfigvideo» (to "find-2022eevwconfigvideo") +;; «.find-2022yttranscriptvideo» (to "find-2022yttranscriptvideo") ;; «.more-info» (to "more-info") ;; «.ee-1stclassvideos-info» (to "ee-1stclassvideos-info") ;; «.eev2019» (to "eev2019") @@ -96,6 +97,7 @@ ;; «.2022eevwconfigpt1» (to "2022eevwconfigpt1") ;; «.2022eevwconfigpt2» (to "2022eevwconfigpt2") ;; «.2022eevwconfig» (to "2022eevwconfig") +;; «.2022yttranscript» (to "2022yttranscript") ;; «.ee-1stclassvideos-field» (to "ee-1stclassvideos-field") ;; «.second-class-videos» (to "second-class-videos") ;; «.code-eevvideo» (to "code-eevvideo") @@ -606,6 +608,16 @@ For more info on this particular video, run: (interactive) (find-1stclassvideo-video "2022eevwconfig" time)) +;; «find-2022yttranscriptvideo» (to ".find-2022yttranscriptvideo") +;; Info: (find-1stclassvideo-links "2022yttranscript") +;; Play: (find-2022yttranscriptvideo "0:00") +(defun find-2022yttranscriptvideo (&optional time &rest rest) + "Play one of the first-class videos of eev starting at TIME. +For more info on this particular video, run: + (find-1stclassvideo-links \"2022yttranscript\")" + (interactive) + (find-1stclassvideo-video "2022yttranscript" time)) + @@ -982,6 +994,18 @@ For more info on this particular video, run: :subs ".vtt" :comment "This is mainly for beginners who use Windows.") ;; + ;; «2022yttranscript» (to ".2022yttranscript") + ;; Play: (find-2022yttranscriptvideo "0:00") + ;; Index: (find-1stclassvideoindex "2022yttranscript") + ("2022yttranscript" + :title "find-yttranscript-links: downloading transcripts of Youtube videos, in eev style" + :mp4 "http://angg.twu.net/eev-videos/2022-yttranscript.mp4" + :yt "http://www.youtube.com/watch?v=SW3Tx-lHX3o" + :page "http://angg.twu.net/find-yttranscript-links.html" + :date "2022oct20" + :length "28:28" + :comment "A video about `find-yttranscript-links'.") + ;; ))