branch: externals/ellama
commit 63a6dd50160d39932410ce62d1d08439ce15d8fc
Author: Sergey Kostyaev <sskosty...@gmail.com>
Commit: Sergey Kostyaev <sskosty...@gmail.com>

    Clean up README.org for Texinfo export
    
    Removed badges and images from README.org before exporting it to Texinfo 
format.
    This ensures that the generated ellama.texi file does not contain 
unnecessary
    elements, making it cleaner and more focused on content.
---
 ellama-manual.el |  21 ++++++++++++++++-----
 ellama.info      | Bin 47372 -> 46919 bytes
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ellama-manual.el b/ellama-manual.el
index d8e79b25f6..d8dceca0b1 100644
--- a/ellama-manual.el
+++ b/ellama-manual.el
@@ -41,11 +41,22 @@
   (declare-function project-root "project")
   (declare-function project-current "project")
   (require 'ox-texinfo)
-  (let* ((org-export-with-broken-links t))
-    (with-current-buffer (find-file-noselect
-                         (file-name-concat
-                          (project-root (project-current))
-                          "README.org"))
+  (let* ((org-export-with-broken-links t)
+        (content (with-current-buffer (find-file-noselect
+                                       (file-name-concat
+                                        (project-root (project-current))
+                                        "README.org"))
+                   (buffer-string))))
+    (with-temp-buffer
+      (insert content)
+      ;; remove badges
+      (goto-char (point-min))
+      (while (re-search-forward "\\[\\[.+?\\]\\[.+?\\.svg\\]\\]" nil t)
+       (replace-match ""))
+      ;; remove images
+      (goto-char (point-min))
+      (while (re-search-forward "\\[\\[.+?\\.gif\\]\\]" nil t)
+       (replace-match ""))
       (org-export-to-file
          'texinfo "ellama.texi"
        nil nil nil nil nil
diff --git a/ellama.info b/ellama.info
index bc30d01943..4d02212387 100644
Binary files a/ellama.info and b/ellama.info differ

Reply via email to