~bzg/orgweb

caa43468ad52694c51b1b33f02327e88b07ed81d — Ihor Radchenko 3 months ago 104dbae
index.org (Project heartbeat): Add Sacha Chua's weekly news
1 files changed, 23 insertions(+), 0 deletions(-)

M index.org
M index.org => index.org +23 -0
@@ 55,8 55,31 @@
#+end_export

* Project heartbeat

#+include: "https://tracker.orgmode.org/news.org" :lines "1-6"
#+include: "https://tracker.orgmode.org/requests.org" :lines "1-6"

#+begin_src emacs-lisp :exports results :results raw value
  (let* ((org-text-buffer
  	(url-retrieve-synchronously
  	 "https://raw.githubusercontent.com/sachac/emacs-news/master/most-recent.org"))
         (org-data
  	(with-current-buffer org-text-buffer
            ;; https://sachachua.com/blog/2024/05/emacs-url-retrieve-synchronously-and-set-buffer-multibyte/
            (set-buffer-multibyte t)
            (org-mode)
            (org-element-parse-buffer))))
    (org-element-map org-data '(item)
      (lambda (item)
        (when-let ((contents (org-element-contents item))
  		 (paragraph (car contents))
                   (paragraph-text (car (org-element-contents paragraph))))
          (when (and (stringp paragraph-text)
  		   (string-equal-ignore-case paragraph-text "Org Mode:\n"))
            (org-element-interpret-data (cdr contents)))))
      nil 'first-match))
#+end_src

* Highlights
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: columns no-heading