emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/plz-event-source 544432be2d 22/22: Split manual and REA


From: ELPA Syncer
Subject: [elpa] externals/plz-event-source 544432be2d 22/22: Split manual and README
Date: Wed, 1 May 2024 09:58:51 -0400 (EDT)

branch: externals/plz-event-source
commit 544432be2dee5dd39532aeb2fbd5247af56b57e0
Author: Roman Scherer <roman@burningswell.com>
Commit: Roman Scherer <roman@burningswell.com>

    Split manual and README
---
 .elpaignore                        |   4 +-
 README.org                         | 120 +------------------------------------
 README.org => plz-event-source.org |   6 --
 3 files changed, 6 insertions(+), 124 deletions(-)

diff --git a/.elpaignore b/.elpaignore
index 192cbd389d..d7f5fb8631 100644
--- a/.elpaignore
+++ b/.elpaignore
@@ -1,5 +1,7 @@
 .elpaignore
+.github
+LICENSE
 Makefile
 makem.sh
-.github
+plz-event-source.org
 tests
diff --git a/README.org b/README.org
index 4ea65eebe1..f170139e05 100644
--- a/README.org
+++ b/README.org
@@ -1,15 +1,5 @@
 #+TITLE: plz-event-source
 
-#+PROPERTY: LOGGING nil
-
-# NOTE: It would be preferable to put these at the bottom of the file under 
the export options heading, but it seems that "TEXINFO_DIR_CATEGORY" only works 
at the top of the file.
-#+EXPORT_FILE_NAME: plz-event-source.texi
-#+TEXINFO_DIR_CATEGORY: Emacs
-#+TEXINFO_DIR_TITLE: Plz Event Source: (plz-event-source)
-#+TEXINFO_DIR_DESC: Event Source extension for plz.el
-
-# Note: This readme works with the org-make-toc 
<https://github.com/alphapapa/org-make-toc> package, which automatically 
updates the table of contents.
-
 
[[http://www.gnu.org/licenses/gpl-3.0.txt][https://img.shields.io/badge/license-GPL_3-green.svg]]
 
[[http://elpa.gnu.org/packages/plz-event-source.html][http://elpa.gnu.org/packages/plz-event-source.svg]]
 
[[https://github.com/r0man/plz-event-source/actions/workflows/test.yml][https://github.com/r0man/plz-event-source/actions/workflows/test.yml/badge.svg]]
@@ -20,110 +10,6 @@ used in the [[https://github.com/ahyatt/llm][LLM]] library 
to handle server sent
 
 👷🏽 NOTE: This is work in progress. The library is not yet on ELPA.
 
-* Contents :noexport:
-:PROPERTIES:
-:TOC:      :include siblings
-:END:
-:CONTENTS:
-- [[#installation][Installation]]
-- [[#usage][Usage]]
-  - [[#examples][Examples]]
-- [[#credits][Credits]]
-  - [[#copyright-assignment][Copyright assignment]]
-:END:
-
-* Installation
-:PROPERTIES:
-:TOC:      :depth 0
-:END:
-
-** GNU ELPA
-
-~plz-event-source~ is available in 
[[http://elpa.gnu.org/packages/plz-event-source.html][GNU ELPA]].  It may be 
installed in
-Emacs using the ~package-install~ command.
-
-* Usage
-:PROPERTIES:
-:TOC:      :depth 1
-:END:
-
-This library provides the ~plz-event-source:text/event-stream~ class,
-which is a media type implementation for server sent events. It should
-be used with the 
[[https://github.com/r0man/plz-media-type#usage][plz-media-type-request]] 
function of the [[https://github.com/r0man/plz-media-type][plz-media-type]]
-library.
-
-** Examples
-
-The following example shows how to request chat completions from a
-large language model.
-
-#+BEGIN_SRC elisp :exports code :results value code :cache yes
-  (plz-media-type-request
-    'post "https://api.openai.com/v1/chat/completions";
-    :as `(media-types ((text/event-stream
-                        . ,(plz-event-source:text/event-stream
-                            :handlers `((open . (lambda (event)
-                                                  (message "open: %s" event)))
-                                        (message . (lambda (event)
-                                                     (message "message: %s" 
event)))
-                                        (close . (lambda (event)
-                                                   (message "close: %s" 
event))))))))
-    :body (json-encode
-           '(("model" . "gpt-3.5-turbo")
-             ("messages" . [(("role" . "system")
-                             ("content" . "You are an assistant."))
-                            (("role" . "user")
-                             ("content" . "Hello"))])
-             ("stream" . t)))
-    :headers `(("Authorization" . ,(format "Bearer %s"
-                                           (auth-source-pick-first-password
-                                            :host "api.openai.com"
-                                            :user "plz-event-source")))
-               ("Content-Type" . "application/json")))
-#+END_SRC
-
-* Credits
-
-- Thanks to [[https://github.com/ahyatt][ahyatt]] and 
[[https://github.com/alphapapa][alphapapa]] for their help and advice.
-
-** Copyright assignment
-
-This package is part of [[https://www.gnu.org/software/emacs/][GNU Emacs]], 
being distributed in [[https://elpa.gnu.org/][GNU ELPA]].
-Contributions to this project must follow GNU guidelines, which means
-that, as with other parts of Emacs, patches of more than a few lines
-must be accompanied by having assigned copyright for the contribution
-to the FSF.  Contributors who wish to do so may contact
-[[mailto:emacs-devel@gnu.org][emacs-devel@gnu.org]] to request the assignment 
form.
-
-* License
-:PROPERTIES:
-:TOC:      :ignore (this)
-:END:
-
-GPLv3
-
-* COMMENT Export setup                                             :noexport:
-:PROPERTIES:
-:TOC:      :ignore (this descendants)
-:END:
-
-# Copied from org-super-agenda's readme, in which much was borrowed from Org's 
=org-manual.org=.
-
-#+OPTIONS: broken-links:t *:t
-
-** Info export options
-
-# NOTE: These are moved to the top of the file.
-
-** File-local variables
-
-# NOTE: Setting org-comment-string buffer-locally is a nasty hack to work 
around GitHub's org-ruby's HTML rendering, which does not respect noexport 
tags.  The only way to hide this tree from its output is to use the COMMENT 
keyword, but that prevents Org from processing the export options declared in 
it.  So since these file-local variables don't affect org-ruby, wet set 
org-comment-string to an unused keyword, which prevents Org from deleting this 
tree from the export buffer, which all [...]
-
-# Local Variables:
-# eval: (require 'org-make-toc)
-# before-save-hook: org-make-toc
-# org-export-with-properties: ()
-# org-export-with-title: t
-# org-export-initial-scope: buffer
-# org-comment-string: "NOTCOMMENT"
-# End:
+- Package name (GNU ELPA): plz-event-source
+- Official manual: 
[[https://github.com/r0man/plz-event-source/blob/main/plz-event-source.org][https://github.com/r0man/plz-event-source/blob/main/plz-event-source.org]]
+- Git repository: 
[[https://github.com/r0man/plz-event-source][https://github.com/r0man/plz-event-source]]
diff --git a/README.org b/plz-event-source.org
similarity index 92%
copy from README.org
copy to plz-event-source.org
index 4ea65eebe1..1223404acc 100644
--- a/README.org
+++ b/plz-event-source.org
@@ -10,16 +10,10 @@
 
 # Note: This readme works with the org-make-toc 
<https://github.com/alphapapa/org-make-toc> package, which automatically 
updates the table of contents.
 
-[[http://www.gnu.org/licenses/gpl-3.0.txt][https://img.shields.io/badge/license-GPL_3-green.svg]]
-[[http://elpa.gnu.org/packages/plz-event-source.html][http://elpa.gnu.org/packages/plz-event-source.svg]]
-[[https://github.com/r0man/plz-event-source/actions/workflows/test.yml][https://github.com/r0man/plz-event-source/actions/workflows/test.yml/badge.svg]]
-
 ~plz-event-source~ provides a 
[[https://github.com/r0man/plz-media-type][plz-media-type]], a parser and an 
event
 source implementation for the 
[[https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events][Server
 Sent Event (SSE)]] protocol. It is
 used in the [[https://github.com/ahyatt/llm][LLM]] library to handle server 
sent events.
 
-👷🏽 NOTE: This is work in progress. The library is not yet on ELPA.
-
 * Contents :noexport:
 :PROPERTIES:
 :TOC:      :include siblings



reply via email to

[Prev in Thread] Current Thread [Next in Thread]