Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
;; This file:
;;   http://anggtwu.net/elisp/find-subs-links.el.html
;;   http://anggtwu.net/elisp/find-subs-links.el
;;          (find-angg "elisp/find-subs-links.el")
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;;
;; (defun e () (interactive) (find-angg "elisp/find-subs-links.el"))
;; (load (buffer-file-name))
;;
;; See: (find-angg ".emacs.templates" "find-subs-links")


;; «.find-subs-links»			(to "find-subs-links")
;; «.find-subs-lua-links»		(to "find-subs-lua-links")
;; «.find-subs-blogme3-links»		(to "find-subs-blogme3-links")
;; «.find-subs-1stclassvideo-links»	(to "find-subs-1stclassvideo-links")
;;   «.ee-subs-1stclassvideo-links»	(to "ee-subs-1stclassvideo-links")
;;   «.ee-subs-eevvideolinks-links»	(to "ee-subs-eevvideolinks-links")
;;   «.ee-subs-57-links»		(to "ee-subs-57-links")
;;   «.ee-subs-lua-header-links»	(to "ee-subs-lua-header-links")
;;   «.ee-subs-lua-code-links»		(to "ee-subs-lua-code-links")
;;   «.ee-subs-blogme3-links»		(to "ee-subs-blogme3-links")

(defvar ee-subs-c        "{ee-subs-c}")
(defvar ee-subs-mp4stem  "{ee-subs-mp4stem}")
(defvar ee-subs-pagestem "{ee-subs-pagestem}")
(defvar ee-subs-hash     "{ee-subs-hash}")
(defvar ee-subs-length   "{ee-subs-length}")


;; «find-subs-links»  (to ".find-subs-links")
;; Skel: (find-find-links-links-new "subs" "c" "")
;; Test: (find-subs-links)
;;       (find-subs-links "eev2021")
;;       (find-subs-links "eev20219")
;;
(defun find-subs-links (&optional c &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subs."
  (interactive)
  (setq c (or c "{c}"))
  (let ((ee-buffer-name (or ee-buffer-name "*find-subs-links*")))
    (apply
     'find-elinks-elisp
     `((find-subs-links ,c ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-subs-links)
       (find-efunction 'ee-subs-setqs-links)
       (find-efunction 'ee-subs-setqs-1stclass-links)
       (find-2a nil '(1c))
       ""
       (find-subs-57-links)
       (find-subs-lua-links)
       (find-subs-blogme3-links)
       (find-subs-1stclassvideo-links)
       (find-subs-eevvideolinks-links)
       ""
       ,(ee-subs-setqs-links c)
       ""
       ,(if (assoc c ee-1stclassvideos-info)
	    (ee-subs-setqs-1stclass-links c)
	  (ee-template0 ";; Not first class: \"{c}\""))
       )
     pos-spec-list)))

;; «find-subs-lua-links»  (to ".find-subs-lua-links")
;; Skel: (find-find-links-links-new "subs-lua" "" "")
;; Test: (find-subs-lua-links)
;;
(defun find-subs-lua-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subs-lua."
  (interactive)
  (let ((ee-buffer-name (or ee-buffer-name "*find-subs-lua-links*")))
    (apply
     'find-elinks
     `((find-subs-lua-links ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-subs-lua-links)
       (find-efunction 'ee-subs-lua-header-links)
       (find-efunction 'ee-subs-lua-code-links)
       (find-subs-lua-links ,ee-subs-c)
       ""
       (kill-new ,(ee-template0 "  SUBTITLES/{ee-subs-mp4stem}.lua"))
       (find-blogme3 "anggmake.lua" "anggtranslate" "SUBTITLES/")
       ""
       (ee-copy-rest 2 '(find-angg ,(format "SUBTITLES/%s.lua" ee-subs-mp4stem)))
       (ee-copy-rest 1 '(find-angg ,(format "SUBTITLES/%s.lua" ee-subs-c)))
       ""
       ,(ee-subs-lua-header-links)
       ,(ee-subs-lua-code-links)
       )
     pos-spec-list)))

;; «find-subs-blogme3-links»  (to ".find-subs-blogme3-links")
;; Skel: (find-find-links-links-new "subs-blogme3" "" "")
;; Test: (find-subs-blogme3-links)
;;
(defun find-subs-blogme3-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subs-blogme3."
  (interactive)
  (let ((ee-buffer-name (or ee-buffer-name "*find-subs-blogme3-links*")))
    (apply
     'find-elinks
     `((find-subs-blogme3-links ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-subs-blogme3-links)
       (find-efunction 'ee-subs-blogme3-links)
       ""
       (kill-new ,ee-subs-mp4stem)
       (find-blogme3 "anggmake.lua" "blogmestems" "2023-caepro0")
       (find-TH ,ee-subs-mp4stem)
       (ee-copy-rest 1 '(find-TH ,ee-subs-mp4stem))
       ""
       ,(ee-subs-blogme3-links)
       )
     pos-spec-list)))

;; <find-subs-57-links>
;; Skel: (find-find-links-links-new "subs-57" "" "")
;; Test: (find-subs-57-links)
;;
(defun find-subs-57-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subs-57."
  (interactive)
  (apply
   'find-elinks
   `((find-subs-57-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-subs-57-links)
     (find-efunction 'ee-subs-57-links)
     ""
     ,(ee-subs-57-links)
     )
   pos-spec-list))

;; «find-subs-1stclassvideo-links»  (to ".find-subs-1stclassvideo-links")
;; Skel: (find-find-links-links-new "subs-1stclassvideo" "" "")
;; Test: (find-subs-1stclassvideo-links)
;;
(defun find-subs-1stclassvideo-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subs-1stclassvideo."
  (interactive)
  (let ((ee-buffer-name (or ee-buffer-name "*find-subs-1stclassvideo-links*")))
    (apply
     'find-elinks
     `((find-subs-1stclassvideo-links ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-subs-1stclassvideo-links)
       (find-efunction 'ee-subs-1stclassvideo-links)
       ""
       ,(ee-subs-1stclassvideo-links)
       )
     pos-spec-list)))



(defun ee-subs-setqs-links (c)
  (ee-template0 "\
;; Current values:
(setq ee-subs-c        \"{ee-subs-c}\")
(setq ee-subs-mp4stem  \"{ee-subs-mp4stem}\")
(setq ee-subs-pagestem \"{ee-subs-pagestem}\")
(setq ee-subs-hash     \"{ee-subs-hash}\")
(setq ee-subs-length   \"{ee-subs-length}\")

;; Reset:
(setq ee-subs-c        \"{<}ee-subs-c{>}\")
(setq ee-subs-mp4stem  \"{<}ee-subs-mp4stem{>}\")
(setq ee-subs-pagestem \"{<}ee-subs-pagestem{>}\")
(setq ee-subs-hash     \"{<}ee-subs-hash{>}\")
(setq ee-subs-length   \"{<}ee-subs-length{>}\")

"))

(defun ee-subs-setqs-1stclass-links (c)
  (ee-template0 "\
;; From the `c':
(setq ee-subs-c        \"{c}\")
(setq ee-subs-mp4stem  \"{(ee-1stclassvideos-mp4stem  c)}\")
(setq ee-subs-pagestem \"{(ee-1stclassvideos-pagestem c)}\")
(setq ee-subs-hash     \"{(ee-1stclassvideos-hash     c)}\")
(setq ee-subs-length   \"{(ee-1stclassvideos-field    c :length)}\")
"))


;; «ee-subs-1stclassvideo-links»  (to ".ee-subs-1stclassvideo-links")
;; Test: (find-estring (ee-subs-1stclassvideo-links))
(defun ee-subs-1stclassvideo-links ()
  (ee-template0 "\
code_eevshortvideo(\"{ee-subs-c}\", \"{ee-subs-mp4stem}\", \"{ee-subs-hash}\")
# ^ copy to: (find-blogme3 \"sandwiches-defs.lua\" \"code_eevshortvideos\")

      [\"{ee-subs-c}\"] = \"{ee-subs-hash}\",
# ^ copy to: (find-blogme3 \"videoindex.lua\")
"))


;; «ee-subs-eevvideolinks-links»  (to ".ee-subs-eevvideolinks-links")
;; Test: (find-estring (ee-subs-eevvideolinks-links))
(defun ee-subs-eevvideolinks-links ()
  (ee-template0 "\
;; Info: (find-1stclassvideo-links \"{ee-subs-c}\")
;;       (find-eev \"eev-videolinks.el\" \"{ee-subs-c}\")
;;       (find-eev \"eev-videolinks.el\" \"eev2021\")
;;
(ee-1stclassvideos-add '

    ;;
    ;; <{ee-subs-c}>
    ;; Play: (find-{ee-subs-c}video \"0:00\")
    ;; Index: (find-1stclassvideoindex \"{ee-subs-c}\")
    (\"{ee-subs-c}\"
     :title \"TITLE\"
     :mp4   \"http://anggtwu.net/eev-videos/{ee-subs-mp4stem}.mp4\"
     :yt    \"http://www.youtube.com/watch?v={ee-subs-hash}\"
     :page  \"http://anggtwu.net/{ee-subs-pagestem}.html\"
     :lang  \"portuguese\"
     :date    \"DATE\"
     :length  \"{ee-subs-length}\"
     :subs    \".vtt\"
     :comment \"COMMENT\")

)
# ^ copy to: (find-eev \"eev-videolinks.el\" \"{ee-subs-c}\")
#            (find-eev \"eev-videolinks.el\" \"eev2021\")
"))



;; «ee-subs-57-links»  (to ".ee-subs-57-links")
;; Test: (find-estring (ee-subs-57-links))
(defun ee-subs-57-links ()
  (ee-template0 "\
;; <{ee-subs-c}>
;; 19/mar/2023
;; (find-ssr-links     \"{ee-subs-c}\" \"{ee-subs-mp4stem}\" \"{ee-subs-hash}\")
 ' (code-eevvideo      \"{ee-subs-c}\" \"{ee-subs-mp4stem}\" \"{ee-subs-hash}\")
;; (code-eevlinksvideo \"{ee-subs-c}\" \"{ee-subs-mp4stem}\" \"{ee-subs-hash}\")
;; (find-subs-links    \"{ee-subs-c}\")
;; (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\" \"legendas\")
;; (find-SUBSfile \"{ee-subs-mp4stem}.lua\" \"legendas\")
;; (find-TH \"{ee-subs-mp4stem}\")
;; (find-TH \"{ee-subs-pagestem}\")
;; (find-1stclassvideolsubs \"{ee-subs-c}\")
;; (find-{ee-subs-c}video \"0:00\")

# ^ copy to: (find-angg \".emacs.videos\" \"{ee-subs-c}\")
"))




;; «ee-subs-lua-header-links»  (to ".ee-subs-lua-header-links")
;; Test: (find-estring (ee-subs-lua-header-links))
(defun ee-subs-lua-header-links ()
  (ee-template0 "\
-- This file:
--   http://anggtwu.net/SUBTITLES/{ee-subs-mp4stem}.lua.html
--   http://anggtwu.net/SUBTITLES/{ee-subs-mp4stem}.lua
--          (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun l () (interactive) (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\"))
-- (defun l () (interactive) (find-SUBS \"{ee-subs-mp4stem}.lua\"))
-- (defun b () (interactive) (find-TH   \"{ee-subs-mp4stem}\"))
-- (defun p () (interactive) (find-TH   \"{ee-subs-pagestem}\"))
-- (defun R () (interactive) (ee-recompile-SUBTITLES-0))
-- (defun r () (interactive) (ee-recompile-SUBTITLES-3))
-- (defun r () (interactive) (ee-recompile-SUBTITLES-1))
--  (define-key eev-mode-map (kbd \"M-r\") 'r)
--
-- Skel: (find-subs-links \"{ee-subs-c}\")
-- Old:  (find-editeevsubtitles-links-1 \"{ee-subs-c}\")
--       (find-efunction 'find-editeevsubtitles-links-1)
-- Yttr: (find-yttranscript-links       \"{ee-subs-c}\" \"{ee-subs-hash}\")
-- Info: (find-1stclassvideo-links      \"{ee-subs-c}\")
-- Play: (find-{ee-subs-c}video \"0:00\")
--
-- I use the code below to generate the subtitles in .vtt.
--

ee_dofile \"~/LUA/Subtitles.lua\" -- (find-angg \"LUA/Subtitles.lua\")
"))

;; «ee-subs-lua-code-links»  (to ".ee-subs-lua-code-links")
;; Test: (find-estring (ee-subs-lua-code-links))
(defun ee-subs-lua-code-links ()
  (ee-template0 "\
--[[
-- (find-angg \"LUA/Subtitles.lua\")

** Run the .lua and tell it to
** write the .vtt - by default in /tmp/
*
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"{ee-subs-mp4stem}.lua\"
sts = Subtitles.fromsexps(subs_bigstr):addtime(\"{ee-subs-length}\")
-- sts.lang = \"pt-BR\"
= sts
outfname = \"$S/http/anggtwu.net/eev-videos/{ee-subs-mp4stem}.vtt\"
outfname =                           \"/tmp/{ee-subs-mp4stem}.vtt\"
out = sts:vtt()..\"\\n\\n\"
ee_writefile(outfname, out)
-- (find-fline                       \"/tmp/{ee-subs-mp4stem}.vtt\")

** Test the .vtt
** (find-{ee-subs-c}video \"0:00\")

** Select /tmp/ or ee-eevvideosdir
** (find-eevvideosfile \"\")
** (find-eevvideosfile \"\"   \"{ee-subs-mp4stem}.mp4\")
** (find-eevvideossh0 \"cp -v {ee-subs-mp4stem}.mp4 /tmp/\")
** (code-video \"{ee-subs-c}video\"                           \"/tmp/{ee-subs-mp4stem}.mp4\")
** (code-video \"{ee-subs-c}video\" \"$S/http/anggtwu.net/eev-videos/{ee-subs-mp4stem}.mp4\")
** (find-{ee-subs-c}video \"0:00\")

** Upload the {ee-subs-mp4stem}.vtt
** to http://anggtwu.net/eev-videos/
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
scp    {ee-subs-mp4stem}.vtt $LINP/eev-videos/
scp    {ee-subs-mp4stem}.vtt $LINS/eev-videos/
Scp-np {ee-subs-mp4stem}.vtt $TWUP/eev-videos/
Scp-np {ee-subs-mp4stem}.vtt $TWUS/eev-videos/

** Upload the subtitles to youtube
** http://www.youtube.com/watch?v={ee-subs-hash}

** Check that the \"psne subtitles\" thing works
** (find-1stclassvideo-links \"{ee-subs-c}\")

--]]

--[[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"{ee-subs-mp4stem}.lua\"
for li in subs_bigstr:gmatch(\"([^\\n]+)\") do
  local time,text = li:match('^.-\"(.-)\".-\"(.*)\"%)$')
  text = text:gsub(\"\\\\(.)\", \"%1\")
  if time then print(\"  \"..time..\"  \"..text) end
end

--]]
\n
subs_bigstr = [==[
\(find-{ee-subs-c}video \"00:00\" \" \")
]==]

unrevised_bigstr = [==[
\(find-{ee-subs-c}video \"00:00\" \" \")
]==]

-- Local\  Variables:
-- coding:  utf-8-unix
-- End:"))


;; «ee-subs-blogme3-links»  (to ".ee-subs-blogme3-links")
;; Test: (find-estring (ee-subs-blogme3-links))
(defun ee-subs-blogme3-links ()
  (ee-template0 "\
[INCLUDE TH/speedbar.blogme]
[SETFAVICON dednat4/dednat4-icon.png]
[SETFAVICON IMAGES/forthsun.png]
[# 
(defun c () (interactive) (find-blogme3-sh0-if \"{ee-subs-mp4stem}\"))
(defun u () (interactive) (find-blogme-upload-links \"{ee-subs-mp4stem}\"))
(defun u () (interactive) (find-blogme3-st-up-links \"{ee-subs-mp4stem}\"))
(defun l () (interactive) (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\"))
(defun b () (interactive) (find-TH \"{ee-subs-mp4stem}\"))
(defun p () (interactive) (find-TH \"{ee-subs-pagestem}\"))
;;     http://anggtwu.net/{ee-subs-pagestem}.html
;;     http://anggtwu.net/{ee-subs-mp4stem}.html
;; file:///home/edrx/TH/L/{ee-subs-mp4stem}.html
;;
;; (find-blogme3-legendas-links \"{ee-subs-c}\" \"{ee-subs-mp4stem}\" \"{ee-subs-hash}\")
#]
[lua:
  require \"defs-2022\"    -- (find-blogme3 \"defs-2022.lua\")
  load_caepro4()         -- (find-blogme3 \"defs-2022.lua\" \"load_caepro2\")
  short_:add [[
    caepro      => (find-TH \"2023-caepro\")
    caepro      ->           2023-caepro.html

                      (find-1stclassvideo-links \"{ee-subs-c}\")
    {ee-subs-c}-page   -> http://anggtwu.net/{ee-subs-pagestem}.html
    {ee-subs-c}-mp4    -> http://anggtwu.net/eev-videos/{ee-subs-mp4stem}.mp4
    {ee-subs-c}-lua    => (find-angg    \"SUBTITLES/{ee-subs-mp4stem}.lua\" \"legendas\")
    {ee-subs-c}-leg    => (find-TH                \"{ee-subs-mp4stem}\")
    {ee-subs-c}-pdf    -> http://anggtwu.net/LATEX/2023-caepro.pdf
    {ee-subs-c}-video  -> https://www.youtube.com/watch?v={ee-subs-hash}
    {ee-subs-c}-index  => (find-1stclassvideoindex \"{ee-subs-c}\")

  ]]
]
[SETHEADSTYLE [LUCIDA]]
[htmlize8 [J \"Isso muda alguma coisa?\" (Sobre as reclamações do CAEPRO)]

[P The main page about this video is [_ {ee-subs-c}-page here].
[BR] Its index is [_ {ee-subs-c}-index here].
[BR] Its subtitles in Lua are [_ {ee-subs-c}-lua here].
[BR] The rest of this page contains a conversion of the subtitles in Lua
[BR] to a slightly more readable format.
]

[NARROW
[PLEFT
  [FIG [__ {ee-subs-c}-video]
          IMAGES/{ee-subs-mp4stem}-small.png]
]
]

[br]

[P
[lua:
-- (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\")
-- (find-angg \"LUA/Subtitles.lua\" \"Subtitles\")
-- (find-TH \"2021aulas-por-telegram\" \"legendas\" \"ipairs\")
-- (find-fline \"~/SUBTITLES/{ee-subs-mp4stem}.lua\")
ee_dofile      \"~/SUBTITLES/{ee-subs-mp4stem}.lua\"
-- (find-fline \"~/LUA/Subtitles2.lua\")
ee_dofile      \"~/LUA/Subtitles2.lua\"

Subtitle.hash = \"{ee-subs-hash}\"
sls = SubtitleLines.from(subs_bigstr)
return sls:blogme()

]
]


]
[#
 # Local {\"Variables\"}:
 # coding: utf-8-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]"))



;;
;; Local Variables:
;; coding:  utf-8-unix
;; End: