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

    Add manual generation functionality for Ellama
    
    Added a new `.gitignore` entry to exclude `ellama.texi`. Created
    `ellama-manual.el` to include a function for exporting an info manual from 
the
    README. Also, added a binary file `ellama.info`, which is the generated info
    file from the manual export process.
---
 .gitignore       |   1 +
 ellama-manual.el |  51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 ellama.info      | Bin 0 -> 45364 bytes
 3 files changed, 52 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..f825bf3c9a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+ellama.texi
diff --git a/ellama-manual.el b/ellama-manual.el
new file mode 100644
index 0000000000..95704ea309
--- /dev/null
+++ b/ellama-manual.el
@@ -0,0 +1,51 @@
+;;; ellama-manual.el --- Working with ellama info manual -*- lexical-binding: 
t; package-lint-main-file: "ellama.el"; -*-
+
+;; Copyright (C) 2023-2025  Free Software Foundation, Inc.
+
+;; Author: Sergey Kostyaev <sskosty...@gmail.com>
+;; SPDX-License-Identifier: GPL-3.0-or-later
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Ellama is a tool for interacting with large language models from Emacs.
+;; It allows you to ask questions and receive responses from the
+;; LLMs.  Ellama can perform various tasks such as translation, code
+;; review, summarization, enhancing grammar/spelling or wording and
+;; more through the Emacs interface.  Ellama natively supports streaming
+;; output, making it effortless to use with your preferred text editor.
+;;
+
+;;; Code:
+
+;;;###autoload
+(defun ellama-manual-export ()
+  "Create info manual from readme."
+  (interactive)
+  (declare-function org-export-to-file "ox")
+  (declare-function org-texinfo-compile "ox-texinfo")
+  (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"))
+      (org-export-to-file
+         'texinfo "ellama.texi"
+       nil nil nil nil nil
+       #'org-texinfo-compile))))
+;;; ellama-manual.el ends here.
diff --git a/ellama.info b/ellama.info
new file mode 100644
index 0000000000..5bb0b8ea30
Binary files /dev/null and b/ellama.info differ

Reply via email to