[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kiwix 99c4663b6a 11/15: Add API URL scheme example comm
From: |
ELPA Syncer |
Subject: |
[elpa] externals/kiwix 99c4663b6a 11/15: Add API URL scheme example comments. |
Date: |
Wed, 7 Dec 2022 19:58:03 -0500 (EST) |
branch: externals/kiwix
commit 99c4663b6a40e85b124ca8e475955a75c007c019
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
Add API URL scheme example comments.
---
kiwix.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kiwix.el b/kiwix.el
index 31a6ac8863..962547375f 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -157,6 +157,7 @@ Set it to ‘t’ will use Emacs built-in ‘completing-read’."
(defun kiwix-get-libraries ()
"Check out all available Kiwix libraries."
(cond
+ ;; http://192.168.31.251:8580/catalog/search?start=0&count=
((and (eq kiwix-server-type 'docker-remote) (string-equal
kiwix-server-api-version "v2"))
(let ((url (format "%s:%s/catalog/search?start=0&count=" kiwix-server-url
kiwix-server-port)))
(request url
@@ -195,6 +196,7 @@ Set it to ‘t’ will use Emacs built-in ‘completing-read’."
;; ZIM library files on remote Docker server, parse index HTML page.
((and (eq kiwix-server-type 'docker-remote) (string-equal
kiwix-server-api-version "v1"))
+ ;; http://192.168.31.251:8580
(let ((url (format "%s:%s" kiwix-server-url kiwix-server-port)))
(request url
:type "GET"
@@ -306,18 +308,21 @@ Set it to ‘t’ will use Emacs built-in ‘completing-read’."
(defun kiwix-query (query &optional selected-library)
"Search `QUERY' in `LIBRARY' with Kiwix."
(cond
+ ;; http://192.168.31.251:8580/wikipedia_en_all_maxi_2021-03/A/Linux_kernel
((and (eq kiwix-server-type 'docker-remote) (string-equal
kiwix-server-api-version "v2"))
(let* ((library (or selected-library (kiwix--get-library-name
selected-library)))
(url (concat (format "%s:%s" kiwix-server-url kiwix-server-port)
"/" library "/A/" (replace-regexp-in-string " " "_"
query)))
(browse-url-browser-function kiwix-default-browser-function))
(browse-url url)))
+ ;;
http://192.168.31.251:8580/search?content=wikipedia_en_all_maxi_2021-03&pattern=Linux%20kernel
((and (eq kiwix-server-type 'docker-remote) (string-equal
kiwix-server-api-version "v1"))
(let* ((library (or selected-library (kiwix--get-library-name
selected-library)))
(url (concat (format "%s:%s" kiwix-server-url kiwix-server-port)
"/search?content=" library "&pattern="
(url-hexify-string query)))
(browse-url-browser-function kiwix-default-browser-function))
(browse-url url)))
+ ;;
http://192.168.31.251:8580/search?content=wikipedia_en_all_maxi_2021-03&pattern=Linux%20kernel
(t
(let* ((library (or selected-library (kiwix--get-library-name
selected-library)))
(url (concat (format "%s:%s" kiwix-server-url kiwix-server-port)
@@ -343,6 +348,7 @@ Set it to ‘t’ will use Emacs built-in ‘completing-read’."
(or (kiwix-docker-check)
(async-shell-command "docker pull kiwix/kiwix-serve")))
(let ((inhibit-message t))
+ ;; http://192.168.31.251:8580
(request (format "%s:%s" kiwix-server-url kiwix-server-port)
:type "GET"
:sync t
@@ -365,6 +371,7 @@ list and return a list result."
(when (and input kiwix-server-available?)
(let* ((library (or selected-library
(kiwix--get-library-name selected-library)))
+ ;;
http://192.168.31.251:8580/suggest?content=wikipedia_en_all_maxi_2021-03&term=linux
(ajax-api (format "%s:%s/suggest?content=%s&term="
kiwix-server-url kiwix-server-port
library))
@@ -467,6 +474,7 @@ list and return a list result."
"Full context search QUERY in all kiwix ZIM libraries. It's very slow."
(interactive
(list (read-string "kiwix full context search in all libraries: ")))
+ ;;
http://192.168.31.251:8580/search?content=wikipedia_en_all_maxi_2021-03&pattern=Linux%20kernel
(browse-url (format "%s:%s/search?pattern=%s" kiwix-server-url
kiwix-server-port query)))
;;;###autoload
- [elpa] externals/kiwix updated (cb843349c1 -> 444f686a7f), ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 792215ed10 07/15: Support new upgraded kiwix-serve index API, ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 7dd18df6f8 03/15: kiwix search keywords async completion read with vertico and consult support, ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix e20c67854b 05/15: Update extension description., ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix d21cbe30d6 06/15: Update library homepage, ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 4f683e87b2 12/15: Get the complete thumbnail image URL, ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 99c4663b6a 11/15: Add API URL scheme example comments.,
ELPA Syncer <=
- [elpa] externals/kiwix 444f686a7f 15/15: Display kiwix library thumbnail URL image in vertico candidates., ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 6afdefeed3 01/15: Don't need .html in URL constructor now., ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 1645c5b659 04/15: kiwix search keywords async completion read with Helm support, ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 9c5d9cf558 08/15: Add missing URL parameters to retrieve complete available ZIM libraries., ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 5892fff779 02/15: Add missing kiwix server port in `org-kiwix-open-link' function, ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 4743f948f8 09/15: Fix query string replace space with "_" in the concatenated with query URL., ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix fedb138fec 10/15: Remove supposed deleted duplicated prototype code., ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix 1b2f99eec3 13/15: Display full kiwix library name for library filename candidates with propertize., ELPA Syncer, 2022/12/07
- [elpa] externals/kiwix b2d0c0dc9d 14/15: rename let-binding variable names., ELPA Syncer, 2022/12/07