|
|
|
@ -2,8 +2,8 @@
|
|
|
|
|
|
|
|
|
|
;; Author: Lucien Cartier-Tilet <lucien@phundrak.com>
|
|
|
|
|
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
|
|
|
|
;; Version: 0.1.0
|
|
|
|
|
;; Package-Requires: ((emacs "25") (f "0.20") (s "1"))
|
|
|
|
|
;; Version: 0.1.1
|
|
|
|
|
;; Package-Requires: ((emacs "25"))
|
|
|
|
|
;; Homepage: https://labs.phundrak.com/phundrak/archwiki.el
|
|
|
|
|
;; Keywords: keywords
|
|
|
|
|
|
|
|
|
@ -37,11 +37,8 @@
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
(require 'f)
|
|
|
|
|
(require 's)
|
|
|
|
|
|
|
|
|
|
(defgroup archwiki nil
|
|
|
|
|
"browse the Arch Wiki from Emacs."
|
|
|
|
|
"Browse the Arch Wiki from Emacs."
|
|
|
|
|
:prefix "archwiki-"
|
|
|
|
|
:link '(url-link :tag "Gitea" "https://labs.phundrak.com/phundrak/archwiki.el"))
|
|
|
|
|
|
|
|
|
@ -67,12 +64,11 @@ If its value is an empty string, use `xdg-open'."
|
|
|
|
|
|
|
|
|
|
(defun archwiki--list-web-pages ()
|
|
|
|
|
"List web pages of the Arch Wiki."
|
|
|
|
|
(mapcar
|
|
|
|
|
(lambda (file) (replace-regexp-in-string "_" " " (f-no-ext (f-filename file))))
|
|
|
|
|
(f-files archwiki-local-path
|
|
|
|
|
(lambda (path)
|
|
|
|
|
(s-ends-with-p "html" path t))
|
|
|
|
|
nil)))
|
|
|
|
|
(mapcar (lambda (file) (replace-regexp-in-string "_" "_" (file-name-sans-extension file)))
|
|
|
|
|
(directory-files archwiki-local-path
|
|
|
|
|
nil
|
|
|
|
|
(rx (+ ascii)
|
|
|
|
|
".html"))))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun archwiki (page)
|
|
|
|
|