From c5c207d562f36139ca0d2855e923b760d46d835b Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 16 Aug 2023 23:16:49 +0200 Subject: [PATCH] Also publish the Sweep manual via texinfo --- esy-publish.el | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/esy-publish.el b/esy-publish.el index cc58ca8..789ea08 100644 --- a/esy-publish.el +++ b/esy-publish.el @@ -6,7 +6,7 @@ ;; Maintainer: Eshel Yaron ;; 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) @@ -69,6 +70,10 @@ (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" @@ -386,6 +391,22 @@ (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 @@ -424,6 +445,7 @@ (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 -- 2.39.2