]> git.eshelyaron.com Git - esy-publish.git/commitdiff
Also publish the Sweep manual via texinfo
authorEshel Yaron <me@eshelyaron.com>
Wed, 16 Aug 2023 21:16:49 +0000 (23:16 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 16 Aug 2023 21:16:49 +0000 (23:16 +0200)
esy-publish.el

index cc58ca8fa9142a6e176923207af9818c0ef5c4ef..789ea08cc34babf942a921e2cb4ed5b1332f0506 100644 (file)
@@ -6,7 +6,7 @@
 ;; Maintainer: Eshel Yaron <me@eshelyaron.com>
 ;; Keywords: languages extensions
 ;; URL: http://git.eshelyaron.com/gitweb/?p=esy-publish.git
-;; Package-Version: 0.11.0
+;; Package-Version: 0.12.0
 ;; Package-Requires: ((emacs "28.2"))
 
 ;; This file is NOT part of GNU Emacs.
@@ -20,6 +20,7 @@
 (require 'org)
 (require 'ox-publish)
 (require 'ox-html)
+(require 'ox-texinfo)
 (require 'org-transclusion)
 (require 'dom)
 (require 'xref)
   (file-name-as-directory (expand-file-name "posts"
                                             esy-publish-local-directory)))
 
+(defvar esy-publish-local-man-directory
+  (file-name-as-directory (expand-file-name "man"
+                                            esy-publish-local-directory)))
+
 (defvar esy-publish-keywords '("emacs"
                                "prolog"
                                "language"
     (org-transclusion-add-all)
     (push (current-buffer) esy-publish--buffers)))
 
+(defun esy-publish--sweep-texinfo (plist)
+  (with-current-buffer
+      (find-file-noselect
+       (expand-file-name "sweep/README.org" esy-publish-root-directory))
+    (org-texinfo-export-to-texinfo)
+    (push (current-buffer) esy-publish--buffers))
+  (make-directory esy-publish-local-man-directory t)
+  (call-process "texi2any"
+                nil nil nil
+                "--html"
+                "--css-ref" "../../style.css"
+                "-c" "TREE_TRANSFORMATIONS=regenerate_master_menu"
+                ;; TODO - also add @contents
+                "--output" (expand-file-name "sweep" esy-publish-local-man-directory)
+                (expand-file-name "sweep/sweep.texi" esy-publish-root-directory)))
+
 (defun esy-publish--prepare-indices (&rest _)
   (dolist (dir (list esy-publish-notes-source-directory
                      esy-publish-posts-source-directory
 (defun esy-publish--finalize (plist)
   (esy-publish--add-canonical-tags plist)
   (esy-publish--finalize-feed plist)
+  (esy-publish--sweep-texinfo plist)
   (esy-publish--finalize-sitemap plist))
 
 ;;;###autoload