;; 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.
(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