Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file: -- http://anggtwu.net/SUBTITLES/emacsconf2022-kla.lua.html -- http://anggtwu.net/SUBTITLES/emacsconf2022-kla.lua -- (find-angg "SUBTITLES/emacsconf2022-kla.lua") -- Author: Eduardo Ochs <eduardoochs@gmail.com> -- -- (defun e () (interactive) (find-angg "SUBTITLES/emacsconf2022-kla.lua")) -- (find-editeevsubtitles-links-1 "emacsconf2022-kla") -- (find-editeevsubtitles-links-1 "eev2022kla") -- Title: Bidirectional links with eev (@ EmacsConf 2022) -- MP4: http://anggtwu.net/eev-videos/emacsconf2022-kla.mp4 -- YT: http://www.youtube.com/watch?v=KRobfwXd7Cw -- Page: http://anggtwu.net/emacsconf2022-kla.html -- Comment: A video about eev-kla.el. -- Date: 2022dec03 -- Length: 7:57 -- This file: -- http://anggtwu.net/SUBTITLES/emacsconf2022-kla.lua.html -- http://anggtwu.net/SUBTITLES/emacsconf2022-kla.lua -- (find-angg "SUBTITLES/emacsconf2022-kla.lua") -- Author: Eduardo Ochs <eduardoochs@gmail.com> -- -- (defun st () (interactive) (find-angg "SUBTITLES/emacsconf2022-kla.lua")) -- Skel: (find-editeevsubtitles-links-1 "eev2022kla") -- (find-efunction 'find-editeevsubtitles-links-1) -- Yttr: (find-yttranscript-links "eev2022kla" "KRobfwXd7Cw") -- Info: (find-1stclassvideo-links "eev2022kla") -- Play: (find-eev2022klavideo "0:00") -- -- «.subtitles» (to "subtitles") -- -- I use the code below to generate the subtitles in .vtt. -- ee_dofile "~/LUA/Subtitles.lua" -- (find-angg "LUA/Subtitles.lua") --[[ -- (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 "emacsconf2022-kla.lua" sts = Subtitles.fromsexps(subs_bigstr):addtime("7:57") -- sts.lang = "pt-BR" = sts outfname = "$S/http/anggtwu.net/eev-videos/emacsconf2022-kla.vtt" outfname = "/tmp/emacsconf2022-kla.vtt" out = sts:vtt().."\n\n" ee_writefile(outfname, out) -- (find-fline "/tmp/emacsconf2022-kla.vtt") ** Test the .vtt ** (find-eev2022klavideo "0:00") ** Select /tmp/ or ee-eevvideosdir ** (find-eevvideosfile "") ** (find-eevvideosfile "" "emacsconf2022-kla.mp4") ** (find-eevvideossh0 "cp -v emacsconf2022-kla.mp4 /tmp/") ** (code-video "eev2022klavideo" "/tmp/emacsconf2022-kla.mp4") ** (code-video "eev2022klavideo" "$S/http/anggtwu.net/eev-videos/emacsconf2022-kla.mp4") ** (find-eev2022klavideo "0:00") ** Upload the emacsconf2022-kla.vtt ** to http://anggtwu.net/eev-videos/ * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd /tmp/ Scp-np emacsconf2022-kla.vtt $TWUP/eev-videos/ Scp-np emacsconf2022-kla.vtt $TWUS/eev-videos/ ** Upload the subtitles to youtube ** http://www.youtube.com/watch?v=KRobfwXd7Cw ** Check that the "psne subtitles" thing works ** (find-1stclassvideo-links "eev2022kla") --]] -- «subtitles» (to ".subtitles") subs_bigstr = [==[ (find-eev2022klavideo "00:00" "Hi! My name is Eduardo Ochs. I'm the author") (find-eev2022klavideo "00:04" "of an Emacs package called eev, and the name") (find-eev2022klavideo "00:06" "of this presentation is: \"Bidirectional links") (find-eev2022klavideo "00:09" "in eev\".") (find-eev2022klavideo "00:10" "Let me present things in a weird order,") (find-eev2022klavideo "00:13" "starting by the new feature, and then I'm") (find-eev2022klavideo "00:16" "going to explain the whole context.") (find-eev2022klavideo "00:20" "One of the main features that we are") (find-eev2022klavideo "00:22" "going to see here is this function here,") (find-eev2022klavideo "00:24" "M-x kla, and kla is a mnemonic for \"kill") (find-eev2022klavideo "00:27" "Link to Anchor\". Let me explain... let me") (find-eev2022klavideo "00:31" "demonstrate how it works. This thing here") (find-eev2022klavideo "00:33" "with the green angle brackets is an") (find-eev2022klavideo "00:36" "anchor, this thing between the green") (find-eev2022klavideo "00:40" "angle brackets is a tag of an") (find-eev2022klavideo "00:42" "anchor, and if I type M-x kla here") (find-eev2022klavideo "00:46" "it highlights this tag for a second and") (find-eev2022klavideo "00:49" "it says \"Copied to the kill ring: blah") (find-eev2022klavideo "00:52" "blah blah...\" and this thing here is a link.") (find-eev2022klavideo "00:54" "I can insert the link here, I") (find-eev2022klavideo "00:57" "can insert the link in my notes...") (find-eev2022klavideo "01:00" "and if I execute this thing this link") (find-eev2022klavideo "01:03" "here it goes to this anchor in this file.") (find-eev2022klavideo "01:10" "If you have a recent version of eev") (find-eev2022klavideo "01:12" "installed then trying this feature") (find-eev2022klavideo "01:13" "should be very easy...") (find-eev2022klavideo "01:15" "you just need to open the this file here,") (find-eev2022klavideo "01:18" "in which everything is defined, and then") (find-eev2022klavideo "01:21" "go to this section at the beginning of") (find-eev2022klavideo "01:23" "the file, and then run the three blocks") (find-eev2022klavideo "01:26" "of tests that are there.") (find-eev2022klavideo "01:28" "This block corresponds roughly to what") (find-eev2022klavideo "01:31" "we have just done...") (find-eev2022klavideo "01:33" "this other block") (find-eev2022klavideo "01:36" "is slightly different because it shows") (find-eev2022klavideo "01:40" "some variants of kla... one is with `f'") (find-eev2022klavideo "01:44" "instead of an `a' here, let me") (find-eev2022klavideo "01:48" "show how it works... if we type") (find-eev2022klavideo "01:51" "`M-x eeklf' or just `M-x klf'") (find-eev2022klavideo "01:57" "we get a link to this file that does not") (find-eev2022klavideo "02:00" "point to an anchor, and if we type") (find-eev2022klavideo "02:03" "`M-x klt' we get another kind of link that") (find-eev2022klavideo "02:07" "is a link to an anchor in the same") (find-eev2022klavideo "02:09" "file...") (find-eev2022klavideo "02:11" "and the third block") (find-eev2022klavideo "02:16" "is more interesting because it lets") (find-eev2022klavideo "02:18" "people create links to files that") (find-eev2022klavideo "02:20" "are elsewhere, and that do not have") (find-eev2022klavideo "02:23" "anchors in them...") (find-eev2022klavideo "02:25" "let me execute this... this will") (find-eev2022klavideo "02:29" "run this sexp here and display the") (find-eev2022klavideo "02:32" "target at the window at the right...") (find-eev2022klavideo "02:35" "this is one of the source files of Emacs.") (find-eev2022klavideo "02:41" "Let's imagine that I want to create a") (find-eev2022klavideo "02:43" "link to this string here... then I can") (find-eev2022klavideo "02:46" "type `M-x klfs', and this will create a") (find-eev2022klavideo "02:51" "link to a file and to a string in that") (find-eev2022klavideo "02:53" "file. So if I type ENTER here") (find-eev2022klavideo "02:56" "it says: \"Copied to the kill ring: ...\"") (find-eev2022klavideo "02:59" "and this is a link to this file here,") (find-eev2022klavideo "03:02" "and to the first occurrence of this") (find-eev2022klavideo "03:04" "string in this file.") (find-eev2022klavideo "03:10" "So: how does this work (inside)?...") (find-eev2022klavideo "03:14" "when I was trying to write the documentation") (find-eev2022klavideo "03:16" "of this I tried to write a summary of") (find-eev2022klavideo "03:19" "how the algorithm works, and I failed and") (find-eev2022klavideo "03:21" "I tried again, and I failed again,") (find-eev2022klavideo "03:23" "several times... and then I gave up and I") (find-eev2022klavideo "03:26" "decided to write an intro - a tutorial,") (find-eev2022klavideo "03:29" "this one -") (find-eev2022klavideo "03:31" "that explains everything with lots of") (find-eev2022klavideo "03:34" "details, and with lots of sections") (find-eev2022klavideo "03:35" "with \"Try it!\"s, that") (find-eev2022klavideo "03:39" "have examples that you you can run to") (find-eev2022klavideo "03:41" "understand things, to examine how some") (find-eev2022klavideo "03:44" "functions work, how the data") (find-eev2022klavideo "03:48" "structures work, and so on...") (find-eev2022klavideo "03:51" "the problem is that sometimes we have") (find-eev2022klavideo "03:54" "several hyperlinks that point to the to") (find-eev2022klavideo "03:56" "the same file. Let me give an example.") (find-eev2022klavideo "04:00" "In the configuration in which I am now,") (find-eev2022klavideo "04:04" "in this file here... the old way of") (find-eev2022klavideo "04:07" "generating hyperlinks to this file") (find-eev2022klavideo "04:08" "with `find-here-links'") (find-eev2022klavideo "04:10" "will generate a temporary buffer") (find-eev2022klavideo "04:13" "like this, and then I would have to") (find-eev2022klavideo "04:15" "choose which one of these hyperlinks I") (find-eev2022klavideo "04:18" "find best, which one I prefer, and then") (find-eev2022klavideo "04:21" "copy it to my notes... so instead") (find-eev2022klavideo "04:25" "of choosing a hyperlink this thing here") (find-eev2022klavideo "04:27" "shows all the options.") (find-eev2022klavideo "04:30" "And in the new way, in `M-x kla'") (find-eev2022klavideo "04:34" "and friends, there's an algorithm that") (find-eev2022klavideo "04:37" "chooses the best short hyperlink by") (find-eev2022klavideo "04:39" "itself, and this algorithm is a bit hard") (find-eev2022klavideo "04:43" "to explain... let me demonstrate it here.") (find-eev2022klavideo "04:46" "Again, we have all these options here, of") (find-eev2022klavideo "04:50" "hyperlinks to this file...") (find-eev2022klavideo "04:51" "and if I type `M-x klf'") (find-eev2022klavideo "04:56" "it chooses one of them.") (find-eev2022klavideo "04:58" "And of course I can copy it to my notes,") (find-eev2022klavideo "05:01" "it's going to work, it's going to point") (find-eev2022klavideo "05:02" "to here... and so on.") (find-eev2022klavideo "05:05" "Well, the title of this presentation was") (find-eev2022klavideo "05:08" "\"Bidirectional links with eev\"... let me") (find-eev2022klavideo "05:11" "show what I mean by bi-directional") (find-eev2022klavideo "05:13" "hyperlinks, and how we can use this thing") (find-eev2022klavideo "05:15" "to create bidirectional hyperlinks") (find-eev2022klavideo "05:17" "very quickly.") (find-eev2022klavideo "05:19" "I will have to use a smaller font... let") (find-eev2022klavideo "05:22" "me open these two files here. This one at") (find-eev2022klavideo "05:25" "the left is a program in Haskell, and") (find-eev2022klavideo "05:27" "this one is a file with my notes on") (find-eev2022klavideo "05:30" "Haskell.") (find-eev2022klavideo "05:31" "How do I create a link from...") (find-eev2022klavideo "05:35" "to this file in Haskell") (find-eev2022klavideo "05:39" "to put it in this file here? I can put") (find-eev2022klavideo "05:42" "the cursor here, in any position") (find-eev2022klavideo "05:45" "after this anchor here, and type") (find-eev2022klavideo "05:48" "`M-x kla'...") (find-eev2022klavideo "05:49" "it copies this link here to the kill") (find-eev2022klavideo "05:51" "ring and then I can can go here and") (find-eev2022klavideo "05:54" "either insert it with C-y (yank), or") (find-eev2022klavideo "05:59" "insert it with `M-k kli', that adds a") (find-eev2022klavideo "06:06" "comment prefix here.") (find-eev2022klavideo "06:07" "So this is a way to create a link from") (find-eev2022klavideo "06:11" "here to there in which every") (find-eev2022klavideo "06:15" "command has to be given explicitly...") (find-eev2022klavideo "06:18" "but I also implemented a way to") (find-eev2022klavideo "06:21" "create the two links at the same time.") (find-eev2022klavideo "06:23" "I don't use it much, it's mostly for") (find-eev2022klavideo "06:25" "demos, because it's impressive, I wanted") (find-eev2022klavideo "06:27" "to show that in this presentation...") (find-eev2022klavideo "06:29" "Anyway, let me show it here. Note that") (find-eev2022klavideo "06:33" "that in this file here the point is") (find-eev2022klavideo "06:36" "here, in this file the point is here...") (find-eev2022klavideo "06:40" "My trick is going to create a link to") (find-eev2022klavideo "06:43" "this anchor and put it in this file, and") (find-eev2022klavideo "06:47" "it's going to create a link to this") (find-eev2022klavideo "06:49" "anchor and put it in this file...") (find-eev2022klavideo "06:52" "So, here it goes: `M-x kla2'... ta-da!") (find-eev2022klavideo "06:57" "it highlighted the two anchors for a") (find-eev2022klavideo "07:01" "second, and it created these things here") (find-eev2022klavideo "07:03" "and inserted them with the") (find-eev2022klavideo "07:06" "right prefixes, I mean, the right") (find-eev2022klavideo "07:09" "comment prefixes.") (find-eev2022klavideo "07:10" "And that's it!") (find-eev2022klavideo "07:15" "So... that's it. If you found this thing") (find-eev2022klavideo "07:18" "interesting just") (find-eev2022klavideo "07:22" "install a recent version of eev and run") (find-eev2022klavideo "07:25" "the tutorial, either with this thing here,") (find-eev2022klavideo "07:28" "`M-x find-kla-intro', or by running") (find-eev2022klavideo "07:30" "this sexp, or open this file here in the") (find-eev2022klavideo "07:35" "eev directory, and follow the") (find-eev2022klavideo "07:37" "tutorials...") (find-eev2022klavideo "07:39" "most things that there are well") (find-eev2022klavideo "07:42" "documented, but the thing that I don't") (find-eev2022klavideo "07:46" "use much and that is mostly for demos,") (find-eev2022klavideo "07:48" "which is the the thing that creates") (find-eev2022klavideo "07:50" "bi-directional hyperlinks, is not yet") (find-eev2022klavideo "07:52" "well documented, but the rest is.") (find-eev2022klavideo "07:55" "So: that's it! Bye! Have fun! =)") ]==] unrevised_bigstr = [==[ ]==] -- Local Variables: -- coding: utf-8-unix -- End: