[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev 321a855f56: Added `find-pip3-links' and `find-yttra
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eev 321a855f56: Added `find-pip3-links' and `find-yttranscript-links'. |
Date: |
Tue, 29 Mar 2022 04:57:31 -0400 (EDT) |
branch: externals/eev
commit 321a855f56523a2a3515db8135cd94889401a709
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Added `find-pip3-links' and `find-yttranscript-links'.
---
ChangeLog | 6 +++++
README.org | 2 +-
VERSION | 4 +--
eev-blinks.el | 2 +-
eev-tlinks.el | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
5 files changed, 88 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f0dd255925..96228be7cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-03-29 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-tlinks.el (find-pip3-links): new function.
+ (find-yttranscript-links): new function.
+ (find-youtubedl-links): use `find-yttranscript-links'.
+
2022-03-24 Eduardo Ochs <eduardoochs@gmail.com>
* eev-tlinks.el (find-newbrowser-links): new function (inspired by
diff --git a/README.org b/README.org
index 2810a98000..1e935ad193 100644
--- a/README.org
+++ b/README.org
@@ -14,7 +14,7 @@
# (find-eev "README.org")
#
# (find-orgnode "Table of Contents")
-#+OPTIONS: toc:nil num:ni
+#+OPTIONS: toc:nil num:nil
* Introduction
diff --git a/VERSION b/VERSION
index 08ba677f05..435a65c410 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Fri Mar 25 02:40:33 GMT 2022
-Thu Mar 24 23:40:33 -03 2022
+Tue Mar 29 08:38:27 GMT 2022
+Tue Mar 29 05:38:27 -03 2022
diff --git a/eev-blinks.el b/eev-blinks.el
index a3a441f20d..256210c992 100644
--- a/eev-blinks.el
+++ b/eev-blinks.el
@@ -494,7 +494,7 @@ inspecting text proprties."
;; Test:
;; (eek "2*<down> C-a C-SPC <down> C-x 1 C-x 3 C-x o <<find-eregionpp>>")
;;
-(defun find-eregionpp (b e use-print-circle)
+(defun find-eregionpp (b e &optional use-print-circle)
"Show the text properties of the text in the region.
This function pretty-prints the result of `(buffer-substring B
E)' and shows the result in a temporary buffer; B and E are the
diff --git a/eev-tlinks.el b/eev-tlinks.el
index 0c0c4e7ad0..f1f5cf1cb5 100644
--- a/eev-tlinks.el
+++ b/eev-tlinks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20220324
+;; Version: 20220329
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-tlinks.el>
@@ -120,6 +120,8 @@
;; «.find-advicebefore-links» (to "find-advicebefore-links")
;; «.find-osm-links» (to "find-osm-links")
;; «.find-newbrowser-links» (to "find-newbrowser-links")
+;; «.find-pip3-links» (to "find-pip3-links")
+;; «.find-yttranscript-links» (to "find-yttranscript-links")
(require 'eev-env)
@@ -1042,6 +1044,9 @@ cd {dir}
# (find-youtube-video \"{hash}\" \"0:00\")
# (code-youtubevideo \"{stem}\" \"{hash}\" \"{title}\")
# (find-{stem}video \"0:00\")
+
+# Transcript:
+# (find-yttranscript-links \"{stem}\" \"{hash}\")
")
)
pos-spec-list))
@@ -3025,6 +3030,78 @@ how this works."
+;; «find-pip3-links» (to ".find-pip3-links")
+;; Skel: (find-find-links-links-new "pip3" "pkg" "")
+;; Test: (find-pip3-links "youtube-transcript-downloader")
+;;
+(defun find-pip3-links (&optional pkg &rest pos-spec-list)
+"Visit a temporary buffer containing a script for pip3."
+ (interactive)
+ (setq pkg (or pkg "{pkg}"))
+ (apply
+ 'find-elinks
+ `((find-pip3-links ,pkg ,@pos-spec-list)
+ ;; Convention: the first sexp always regenerates the buffer.
+ (find-efunction 'find-pip3-links)
+ ""
+ ,(ee-template0 "\
+ (eepitch-shell)
+ (eepitch-kill)
+ (eepitch-shell)
+# (find-man \"pip3\")
+# (find-sh \"pip3 list\" \"{pkg}\")
+pip3 show {pkg}
+pip3 install {pkg}
+
+")
+ )
+ pos-spec-list))
+
+
+
+
+;; «find-yttranscript-links» (to ".find-yttranscript-links")
+;; Skel: (find-find-links-links-new "yttranscript" "c hash" "")
+;; Test: (find-yttranscript-links)
+;; (find-yttranscript-links "acmetour" "dP1xVpMPn8M")
+;; Based on:
+;;
https://ag91.github.io/blog/2022/03/27/an-elisp-snippet-to-dowload-youtube-videos-transcripts/
+;;
+(defun find-yttranscript-links (&optional c hash &rest pos-spec-list)
+"Display a temporary script that downloads a transcript from youtube."
+ (interactive (list nil (ee-youtubedl-hash-around-point)))
+ (setq c (or c "{c}"))
+ (setq hash (or hash "{hash}"))
+ (apply
+ 'find-elinks
+ `((find-yttranscript-links ,c ,hash ,@pos-spec-list)
+ ;; Convention: the first sexp always regenerates the buffer.
+ (find-efunction 'find-yttranscript-links)
+ ""
+ ,(ee-template0 "\
+# (find-pip3-links \"youtube-transcript-downloader\")
+# (find-youtubedl-links nil nil \"{hash}\" nil \"{c}\")
+
+ (eepitch-python)
+ (eepitch-kill)
+ (eepitch-python)
+ (python-mode)
+import youtube_transcript_downloader
+url = \"http://www.youtube.com/watch?v={hash}\"
+tr = youtube_transcript_downloader.get_transcript(url)
+trits0 = tr.items()
+trits1 = '\\n'.join(('% (find-{c}video \"' + key + '\" \"' + text + '\")' for
key, text in trits0))
+print(trits1)
+
+")
+ )
+ pos-spec-list))
+
+
+
+
+
+
(provide 'eev-tlinks)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eev 321a855f56: Added `find-pip3-links' and `find-yttranscript-links'.,
ELPA Syncer <=