Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
####### # # E-scripts on telega. # # Note 1: use the eev command (defined in eev.el) and the # ee alias (in my .zshrc) to execute parts of this file. # Executing this file as a whole makes no sense. # An introduction to eev can be found here: # # (find-eev-quick-intro) # http://angg.twu.net/eev-intros/find-eev-quick-intro.html # # Note 2: be VERY careful and make sure you understand what # you're doing. # # Note 3: If you use a shell other than zsh things like |& # and the for loops may not work. # # Note 4: I always run as root. # # Note 5: some parts are too old and don't work anymore. Some # never worked. # # Note 6: the definitions for the find-xxxfile commands are on my # .emacs. # # Note 7: if you see a strange command check my .zshrc -- it may # be defined there as a function or an alias. # # Note 8: the sections without dates are always older than the # sections with dates. # # This file is at <http://angg.twu.net/e/telega.e> # or at <http://angg.twu.net/e/telega.e.html>. # See also <http://angg.twu.net/emacs.html>, # <http://angg.twu.net/.emacs[.html]>, # <http://angg.twu.net/.zshrc[.html]>, # <http://angg.twu.net/escripts.html>, # and <http://angg.twu.net/>. # ####### # «.tdlib» (to "tdlib") # «.server» (to "server") # «.emacsconf2021» (to "emacsconf2021") # «.tme» (to "tme") # «.telega-msg-copy-dwim» (to "telega-msg-copy-dwim") # «.telega-use-images» (to "telega-use-images") # «.copy-text» (to "copy-text") # «.prev-and-next» (to "prev-and-next") # «.sort» (to "sort") # «.filter» (to "filter") # «.history-beginning» (to "history-beginning") # «.maxima» (to "maxima") # «.some-chats» (to "some-chats") # «.date-format» (to "date-format") # «.search-by-date» (to "search-by-date") TODO: move several sections from (find-es "telegram") to here... # (find-epackage-links 'telega "telega" t) # (find-epackage 'telega) # (code-c-d "telega" "~/.emacs.d/elpa/telega-20250304.1550/") # (find-telegafile "") ##### # # tdlib # 2022jan26 # ##### # «tdlib» (to ".tdlib") # (find-angg ".emacs" "telega") # https://github.com/zevlg/telega.el # https://github.com/zevlg/telega.el/blob/master/README.md # https://zevlg.github.io/telega.el/ Telega Manual # https://zevlg.github.io/telega.el/#building-tdlib # # https://core.telegram.org/tdlib # https://core.telegram.org/tdlib/getting-started # https://github.com/tdlib/td # https://tdlib.github.io/td/build.html?language=C # https://tdlib.github.io/td/build.html?language=C%2B%2B # (find-telegachat "1487862914#237695" "-j2 might still help quite a bit") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) sudo apt-get update sudo apt-get upgrade sudo apt-get install make git zlib1g-dev libssl-dev gperf php-cli cmake g++ # (find-git-links "https://github.com/tdlib/td.git" "td") * (eepitch-shell3) * (eepitch-kill) * (eepitch-shell3) # rm -Rfv ~/usrc/td/ cd ~/usrc/ git clone https://github.com/tdlib/td.git cd ~/usrc/td/ git pull git clean -dfx git reset --hard # (find-fline "~/usrc/") # (find-fline "~/usrc/td/") # (find-gitk "~/usrc/td/") # (code-c-d "td" "~/usrc/td/") # (find-tdfile "") # (find-tdfile "build/") # (find-tdfile "build/ocm2") # (find-tdfile "build/ocm2" "usrc/td/build/../tdlib/") # (find-tdfile "tdlib/") # (find-tdsh "find * | sort") # (find-tdsh "find * | sort | grep tdjson") # (find-tdsh "find * | sort | grep tdjson.pc") # (find-tdsh "find tdlib | sort") # (find-tdfile "tdlib/lib/pkgconfig/tdjson.pc") * (eepitch-shell3) * (eepitch-kill) * (eepitch-shell3) cd ~/usrc/td/ # git checkout v1.8.0 git checkout master rm -rf build/ mkdir build/ cd build/ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib .. |& tee ocm1 cmake --build . --target install |& tee ocm2 cd .. cd .. ls -l td/tdlib # mkdir -p build/bld && cd build && cmake -DCMAKE_INSTALL_PREFIX=$PWD/bld .. # user-error: TDLib is not installed into "/usr/local". Set # ‘telega-server-libs-prefix’ to the TDLib installion path # (find-evardescr 'telega-server-libs-prefix) # (find-evariable 'telega-server-libs-prefix) (setq telega-server-libs-prefix "/usr/local") (setq telega-server-libs-prefix "/home/edrx/usrc/td/tdlib") ##### # # server # 2022oct23 # ##### # «server» (to ".server") # (find-telegafile "") # (find-telegafile "server/") # (find-telegafile "server/Makefile") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/.emacs.d/elpa/telega-20221015.1120/ cd ~/.emacs.d/elpa/telega-20221015.1120/server/ # (find-tdsh "find * | sort | grep tdjson") # (find-tdsh "find * | sort | grep tdjson.pc") # (find-tdfile "tdlib/lib/pkgconfig/tdjson.pc") # (find-fline "~/usrc/td/tdlib/lib/pkgconfig/tdjson.pc") make clean |& tee omc make LIBS_PREFIX=$HOME/usrc/td/tdlib |& tee om make install |& tee omi ##### # # emacsconf2021 # 2022oct23 # ##### # «emacsconf2021» (to ".emacsconf2021") # https://emacsconf.org/2021/talks/telega/ # https://media.emacsconf.org/2021/emacsconf-2021-telega--telega-el-and-the-emacs-community-on-telegram--gabriele-bozolla--main.webm # https://media.emacsconf.org/2021/emacsconf-2021-telega--telega-el-and-the-emacs-community-on-telegram--gabriele-bozolla--main.vtt # (code-video "telegavideo" "$S/https/media.emacsconf.org/2021/emacsconf-2021-telega--telega-el-and-the-emacs-community-on-telegram--gabriele-bozolla--main.webm") # (find-telegavideo) # (find-telegavideo "0:00") ##### # # tme # 2022oct23 # ##### # «tme» (to ".tme") # (find-efunctiondescr 'telega-chatbuf--name) # (find-efunction 'telega-chatbuf--name) # (find-efunctiondescr 'telega-chatbuf--chat) # (find-efunction 'telega-chatbuf--chat) # (find-efunctiondescr 'telega-chat-username) # (find-efunction 'telega-chat-username) # (find-efunctiondescr 'telega-chat-title-with-brackets) # (find-efunction 'telega-chat-title-with-brackets) # (find-efunctiondescr 'telega-chat-title) # (find-efunction 'telega-chat-title) # (find-efunctiondescr 'telega-tme-internal-link-to) # (find-efunction 'telega-tme-internal-link-to) # (find-efunctiondescr 'telega-tme-open-tg) # (find-efunction 'telega-tme-open-tg) # (find-efunctiondescr 'telega-msg-copy-link) # (find-efunction 'telega-msg-copy-link) # (find-efunctiondescr 'telega-tme--post-msg-id) # (find-efunction 'telega-tme--post-msg-id) # (find-efunctiondescr 'telega-tl-str) # (find-efunction 'telega-tl-str) # (find-ebuffer "◀[telega.el@emacs_telega]") (setq tcbuf "◀[telega.el@emacs_telega]") (setq tcchat (with-current-buffer tcbuf telega-chatbuf--chat)) (telega-chat-username tcchat) (telega-chat-title tcchat) (find-eppp tcchat) (plist-get tcchat :chat_id) (plist-get tcchat :title) (plist-get tcchat :id) (plist-get chat-or-msg :chat_id) (telega-tme-internal-link-to tcchat) # (find-efunction 'find-telegachat) # (find-efunction 'find-telegachat-links) # (find-telegachat "@emacs_telega" "telega.el") # (find-telegachat "@emacs_telega:37219" "telega.el") # (find-telegachat "@emacs_telega#37219" "telega.el") # (find-telegachat "@emacs_posts" "Emacs News and Posts") # (find-telegachat "@hackernewslive" "Hacker News") # (find-telegachat "@hacker_news_feed" "Hacker News") https://t.me/emacs_telega/37219 (telega-tme-open-tg ,url) (telega-tme-open-tg "https://t.me/emacs_telega") (telega-tme-open-tg "https://t.me/emacs_telega/37219") (telega-tme-open-tg "tg:telega:@emacs_telega") (telega-tme-open-tg "tg:telega:@emacs_telega") JFYI: to get strings it is better to use telega-tl-str instead of plist-get, i.e. correctly get chat's title is to call (telega-tl-str <chat> :title) instead of (plist-get <chat> :title) ##### # # telega-msg-copy-dwim # 2023dec18 # ##### # «telega-msg-copy-dwim» (to ".telega-msg-copy-dwim") # (find-telegachat "-1001179424883#43591" "To copy text from message use c") # (find-telegachat "@emacs_telega#43594" "(let* ((m (telega-msg-for-interactive))") # (find-efunction 'telega-msg-copy-dwim) # (find-eapropos "telega.*map") # (find-eapropos "telega.*map$") # (find-ekeymapdescr telega-msg-button-map) # (find-ekeymapdescr telega-msg-button-map "telega-msg-copy-dwim") # (find-evariable 'telega-msg-button-map) # (find-evariable 'telega-msg-button-map "telega-msg-copy-dwim") # (find-efunction 'telega-msg-for-interactive) (setq m (telega-msg-for-interactive)) (find-epp m) (find-eppp m) (plist-get :content m) (plist-get m :content) (plist-get (plist-get m :content) :text) (plist-get (plist-get (plist-get m :content) :text) :text) (let* ((m (telega-msg-for-interactive)) (mc (plist-get m :content)) (mct (plist-get mc :text)) (mctt (plist-get mct :text))) mctt) # (find-efunction 'ee-find-telegachat-links) ##### # # telega-use-images # 2024mar10 # ##### # «telega-use-images» (to ".telega-use-images") # (find-eaproposv "telega.*image") # (find-evardescr 'telega-use-images) # (setq telega-use-images '(scale rotate90)) # (setq telega-use-images nil) ##### # # copy-text # 2024mar10 # ##### # «copy-text» (to ".copy-text") # (find-efunction 'telega-msg-copy-text) # (defun tct () (interactive) (telega-msg-copy-text (telega-msg-for-interactive) 'no-props)) (find-telegachat "272098718#231063") ##### # # prev-and-next # 2024mar10 # ##### # «prev-and-next» (to ".prev-and-next") # (find-elocus-links "<tab>" 'telega-msg-button-map) # (find-elocus-links "<backtab>" 'telega-msg-button-map) # (find-efunction 'telega-button-forward) # (find-efunction 'telega-button-backward) ##### # # sort # 2025apr10 # ##### # «sort» (to ".sort") # (find-eaproposf "^telega.*sort") # (find-eaproposv "^telega.*sort") # (find-elocus-links "\\ j" 'telega-root-mode-map "telega-sort-by-join-date") # (find-evariable 'telega-sort-map) # (find-evariable 'telega-sort-map "telega-sort-by-join-date") # (find-telegafile "telega-sort.el") # (find-evardescr 'telega-sort-criteria-alist) # (find-evariable 'telega-sort-criteria-alist) ##### # # filter # 2025apr10 # ##### # «filter» (to ".filter") # (find-eaproposf "^telega.*filter") # (find-eaproposv "^telega.*filter") # (find-telegafile "telega-filter.el") # (find-telegachat "@emacs_telega#48005" "filter chats with specific messages") # (find-telegachat "@emacs_telega#48020" "(not (last-message (type ContactRegistered)))") ##### # # history-beginning # 2025apr10 # ##### # «history-beginning» (to ".history-beginning") # (find-elocus-links "M-g <" 'telega-chat-mode-map "telega-chatbuf-history-beginning") ##### # # maxima # 2025apr12 # ##### # «maxima» (to ".maxima") # (find-telegachat "-1002074960141#423" "um horario pra prova relampago?") # (find-telegachat "-1002074960141#526" "Na prova relâmpago vocês só vão ter que") # (find-telegachat "-1002074960141#634" "e tirar 0 nela perde 0.3 na P1") # (find-telegachat "-1002074960141#639" "Se voce nao for fazer") # (find-telegachat "-1002074960141#756" "nada que vale pontos na prova relâmpago") # (find-telegachat "-1002074960141#788" "que vai fazer a prova relampago hoje") # (find-telegachat "-1002074960141#1223" "o que devo estudar para o teste relâmpago 2") # (find-telegachat "-1002074960141#3347" "90% do que você precisa pra prova relâmpago") ##### # # some-chats # 2025apr11 # ##### # «some-chats» (to ".some-chats") # 2019-07-11 (find-telegachat "-356216436#36486" "Conversa") # 2019-09-22 (find-telegachat "768413327#54706" "Yoneda.idr") # 2019-09-25 (find-telegachat "-1001383957254#2" "Anotações Executáveis") # 2019-10-01 (find-telegachat "@lunks#63505" "Lunks") # 2020-01-08 (find-telegachat "686653261#99187" "Gabriel Pellizer") # 2020-05-23 (find-telegachat "@paolobrasolin#119092" "Paolo Brasolin") # 2020-05-27 (find-telegachat "1253657575#119895" "amigo do jp caron") # 2020-09-04 (find-telegachat "@ercdude#148311" "ercdude") # 2020-09-08 (find-telegachat "@lambdart#148647" "Isaac Emacs") # 2021-04-26 (find-telegachat "-569654044#168559" "Sobre cursos via Telegram (2021)") # 2021-06-09 (find-telegachat "-493150071#170972" "Troca de experiencias didaticas" "Bel") # 2021-06-11 (find-telegachat "903908251#171160" "Márcio Adames") # 2021-09-07 (find-telegachat "1454311446#176657" "Vitus") # 2021-11-06 (find-telegachat "-1001777823193#4" "Introdução ao Emacs e eev (6/nov/2021)") # 2021-12-04 (find-telegachat "-1001504431492#3" "Workshop on creating and saving Elisp hyperlinks") # 2022-03-02 (find-telegachat "-1001666246297#3" "Emacs e Software Livre CAEPRO") # 2024-04-10 (find-telegachat "-4171633152#231703" "Emacs, eev e Maxima - abril/2024") # 2024-04-30 (find-telegachat "-1002074960141#3" "Oficina permanente de Emacs, eev e Maxima") # 2024-11-21 (find-telegachat "-4554418500#240060" "Projeto Emacs-MQ") # 2017-08-28 (find-telegachat "146879298#4817" "Ayrton Cavalieri") # 2018-03-13 (find-telegachat "69805235#5768" "Gloria Celeste") # 2018-03-26 (find-telegachat "@matheus_lobo#6213" "Matheus Lobo") # 2018-08-29 (find-telegachat "@luscascrz#11343" "Luscas" "Gersting") # 2018-11-12 (find-telegachat "353617046#17256" "Beatriz Rangel" "Tipografia Digital") # 2018-12-10 (find-telegachat "168125915#16022" "Daniel.ILA") # 2019-05-15 (find-telegachat "@jessicabtz#29496" "Jéssica Beatriz" "TD.html#emacs-para-windows") # 2019-05-22 (find-telegachat "681276489#37773" "Laryssa") # 2019-09-19 (find-telegachat "@Rafaelffontes#54079" "Rafael Ferreira Fontes" "dietlibc") # 2019-10-17 (find-telegachat "952053393#74784" "Mary Jane") # 2019-10-17 (find-telegachat "@layla_sampaio#75019" "Layla Sampaio") # 2020-05-24 (find-telegachat "-485696196#119222" "Lógicos Não-matemáticos") # 2020-09-09 (find-telegachat "@Belspinola#149039" "criticas grandes") # 2020-10-23 (find-telegachat "@Jmr12#152112" "Julia Miranda") # 2020-11-11 (find-telegachat "904471110#156524" "Beatriz Da Gama Silva De Araujo") # 2020-12-04 (find-telegachat "@FelipeFalcao#155695" "Felipe Viana") # 2020-12-10 (find-telegachat "898388344#156598" "Alexandre Junior") # 2020-12-14 (find-telegachat "1201086005#156885" "Kelly Ohana C2") # 2021-01-28 (find-telegachat "156459503#160589" "Thanos Tsouanas") # 2021-02-03 (find-telegachat "1405579874#161969" "Carmen Lent") # 2021-02-03 (find-telegachat "1655619126#161950" "Jessica Goulart Moura") # 2021-02-11 (find-telegachat "703221075#162961" "João Henrique C2" "Essa duvida e' MUITO boa") # 2021-05-18 (find-telegachat "1250078022#169970" "Pedro Falcão") # 2021-06-17 (find-telegachat "718714781#171682" "Fernando Castilho Vargas") # 2021-06-18 (find-telegachat "1548298961#171741" "Isabelle") # 2021-06-24 (find-telegachat "1750585056#171919" "") # 2021-06-24 (find-telegachat "1750585056#172478" "Manda pro grupo!") # 2021-06-24 (find-telegachat "1750585056#174897" "o grupo") # 2021-06-24 (find-telegachat "1750585056#174912" "Vamos discutir isso no grupo") # 2021-07-07 (find-telegachat "1617738132#173800" "Tacyano") # 2021-07-09 (find-telegachat "1147787242#173902" "João C2") # 2021-08-30 (find-telegachat "@Viteeck#176174" "Viteck") # 2021-09-01 (find-telegachat "@lucasparente98#176220" "Deu um pouco mais de 500MB") # 2021-09-15 (find-telegachat "1924576902#177156" "Luiz Gustavo C2" "Mas nao tem nada na sua 1!!") # 2021-10-01 (find-telegachat "986882003#177838" "julha") # 2021-10-25 (find-telegachat "570776190#178927" "Jovane Mafort" "manim") # 2021-11-13 (find-telegachat "1380815810#180346" "pra agradecer pela aula") # 2021-11-17 (find-telegachat "1447015608#180410" "L Machado C2") # 2022-01-22 (find-telegachat "201997741#182328" "Jerônimo Pellegrini") # 2022-01-22 (find-telegachat "776756686#182461" "CarlosRFS" "patola") # 2022-02-09 (find-telegachat "1885906061#186805" "Rafael Tiribás") # 2022-04-01 (find-telegachat "1102468235#194683" "(um aluno que me ajudou)") # 2022-06-06 (find-telegachat "993700850#199342" "Victor Barcellos") # 2022-07-27 (find-telegachat "1674870229#202008" "Pedro Pugian") # 2022-07-27 (find-telegachat "@angeloledo#201971" "Angelo Cabral Ledo C2") # 2022-08-03 (find-telegachat "1358245383#202732" "Bruna Oliveira C2") # 2022-08-13 (find-telegachat "75103671#203548" "Igor Garcia CursoGNU") # 2022-11-02 (find-telegachat "24963450#206895" "Matheus Andrade") # 2023-03-24 (find-telegachat "5708637365#215413" "Daniel Lopes EP") # 2023-04-13 (find-telegachat "1093484425#216100" "João Pedro Rebello C2") # 2024-07-20 (find-telegachat "6569519175#234721" "logic bender") # 2024-09-25 (find-telegachat "770639657#238193" "Samuel Detone C3") ##### # # date-format # 2025apr11 # ##### # «date-format» (to ".date-format") # (find-eaproposf "^telega.*date") # (find-eaproposv "^telega.*date") # (find-evardescr 'telega-date-format-alist) # (find-evariable 'telega-date-format-alist) ##### # # search-by-date # 2024jul13 # ##### # «search-by-date» (to ".search-by-date") # (find-es "emacs" "format-time-string") # (find-telegachat "@emacs_telega#45490") # (find-telegachat "@emacs_telega#45490" "Try M-g d in a chatbuf") # (find-elocus-links "M-g d" 'telega-chat-mode-map) # (find-ekeymapdescr telega-chat-mode-map) # (find-hkeymap-links 'telega-chat-mode-map) # (find-ekeymapdescr telega-chat-mode-map "M-g d" "telega-chatbuf-goto-date") # (find-hkeymap-links 'telega-chat-mode-map 2 "M-g d" "telega-chatbuf-goto-date") # (find-efunction 'telega-chatbuf-goto-date) # (find-efunction 'telega-read-timestamp) # (find-efunction 'org-read-date) # (setq mytime (telega-read-timestamp "History at" 'only-date)) > Evgeny Zajcev: Try M-g d in a chatbuf > Evgeny Zajcev: See https://zevlg.github.io/telega.el/#chatbuf-fast-navigation for fast navigation commands ``` (defun find-telegachatdate (idn datestr &rest rest) (let* ((decodedtime (parse-time-string datestr)) (timestamp (encode-time decodedtime)) (seconds (time-convert timestamp 'integer))) (find-telegachat idn) (telega-chatbuf-goto-date seconds))) ;; Ok: (find-telegachat "@eduardoochs") ;; Ok: (find-telegachatdate "@eduardoochs" "2023-10-10 23:59:28") ;; Error: (find-telegachatdate "@eduardoochs" "2023-10-10") ;; -> let*: Wrong type argument: fixnump, nil ``` (parse-time-string "2023-10-10 23:59:28") (parse-time-string "2023-10-10") (encode-time (parse-time-string "2023-10-10 23:59:28")) (encode-time (parse-time-string "2023-10-10")) https://www.youtube.com/watch?v=Py5xBdGqM0I https://www.youtube.com/watch?v=myWi03zB87E https://www.youtube.com/shorts/eAvyW7_eyl0 https://www.youtube.com/watch?v=Wm1jkaVztqY https://www.youtube.com/shorts/XESDBlwkb1U https://en.wikipedia.org/wiki/Sternalis_muscle https://www.brasildefato.com.br/2024/07/11/como-pensa-a-extrema-direita-dossie-revela-metodo-de-curso-criado-por-eduardo-bolsonaro # (find-fline "~/.telega/" "db.sqlite") # (find-telegachat "-1001179424883#46181" "sqlite" "about 0.5 seconds") # Local Variables: # coding: utf-8-unix # End: