[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
- [elpa] branch externals/plz-event-source created (now 544432be2d), ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source b33496a593 02/22: Remove plz-media-type.el, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 47fff98c63 06/22: Rename text/event-stream media type, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source b25a8bd7c8 07/22: Fix checkdoc issues, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 540072367a 03/22: Remove plz.el, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 92a81ca775 04/22: Use .git to locate dominating file, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 436a615c64 05/22: Rename buffer and http event source, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 8e1b769f08 20/22: Tweak vendor note, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 544432be2d 22/22: Split manual and README,
ELPA Syncer <=
- [elpa] externals/plz-event-source a1f3cc7da9 14/22: Prefix parser functions with plz-event-source-parser, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source abfc1f5271 18/22: Run tests on 29.3 as well, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source ae322c21ed 01/22: Initial commit, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 1c108a456a 15/22: Move private function, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 7d3c6a19d2 17/22: Update example in README, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 558ba9a77e 19/22: Add vendor note, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source de99b89df6 21/22: ELPA preparations, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 471a01eb83 10/22: Run handler code via a timer in the main loop, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source 9654a785ef 11/22: Call handler functions only with the event object, ELPA Syncer, 2024/05/01
- [elpa] externals/plz-event-source c3874f9ad2 16/22: Make dispatch functions private, ELPA Syncer, 2024/05/01