[pocket] Add pocket layer

This commit is contained in:
Aaron L. Zeng 2021-04-03 14:25:48 -04:00 committed by Maximilian Wolff
parent b0dc044885
commit ac5fc0ac19
4 changed files with 126 additions and 0 deletions

View file

@ -0,0 +1,69 @@
#+TITLE: Pocket layer
#+TAGS: layer|reader
[[file:img/pocket.png]]
* Table of Contents :TOC_5_gh:noexport:
- [[#description][Description]]
- [[#features][Features:]]
- [[#install][Install]]
- [[#authentication][Authentication]]
- [[#key-bindings][Key bindings]]
* Description
This layer adds [[https://getpocket.com/][Pocket]] support to Spacemacs via the package
[[https://github.com/alphapapa/pocket-reader.el][pocket-reader]].
** Features:
- Manage reading list: add, remove, delete, tag, view, favorite, etc.
- Open links in Emacs or external browser
- Sort views by date, title, domain, tags, favorite, etc.
- Search items by keywords, tags, favorite status, unread/archived
status, etc.
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You
will need to add =pocket= to the existing
=dotspacemacs-configuration-layers= list in this file.
* Authentication
Just run the =pocket-reader= command. A URL will be copied to the
clipboard/kill ring. Open the URL in a web browser and follow the
instructions to log into your Pocket account.
Note: Please ignore any =Page Not Found= error you might see on the
Pocket Web site after authorizing. Just run the =pocket-reader=
command after authorizing, and it should work. You can verify that
authorization completed by checking the file
=~/.cache/emacs-pocket-lib-token.json=.
* Key bindings
| Key binding | Description |
|-------------+-------------------------------------------------------------------|
| ~SPC a w p~ | Open pocket-reader buffer |
| ~RET~ | Open with default browse function |
| ~TAB~ | Open with default pop-to function |
| ~b~ | Open with external browser function |
| ~a~ | Toggle archived/unread status |
| ~c~ | Copy URL to the kill ring |
| ~d~ | Show default view |
| ~D~ | Delete item |
| ~e~ | Show excerpt |
| ~E~ | Show excerpt for all items |
| ~*~, ~f~ | Toggle favorite status |
| ~F~ | Show unread, favorite items |
| ~gr~ | Re-sort list |
| ~gR~ | Refresh list using last query (or default query) |
| ~s~ | Search for items (or display default view if no query is entered) |
| ~m~ | Toggle mark of current item |
| ~M~ | Mark all items |
| ~U~ | Unmark all items |
| ~o~ | Show more items (using the current count limit) |
| ~l~ | Limit current view to items matching string |
| ~R~ | Open random item from current items |
| ~ta~ | Add tags |
| ~tr~ | Remove tags |
| ~tt~ | Set tags |
| ~ts~ | Search for a tag |

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View file

@ -0,0 +1,36 @@
;;; packages.el --- pocket Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;; This program 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 of the License, or
;; (at your option) any later version.
;;
;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
(defconst pocket-packages
'(pocket-reader))
(defun pocket/init-pocket-reader ()
(use-package pocket-reader
:defer t
:init (spacemacs/set-leader-keys "arp" 'pocket-reader)
:config
(progn
(evilified-state-evilify-map pocket-reader-mode-map
:mode pocket-reader-mode
:bindings
"gr" 'pocket-reader-resort
"gR" 'pocket-reader-refresh))))

View file

@ -183,6 +183,7 @@
- [[#elfeed][Elfeed]]
- [[#epub][Epub]]
- [[#pdf][PDF]]
- [[#pocket][Pocket]]
- [[#speed-reading][Speed Reading]]
- [[#readmeorg-files-that-need-proper-tags][README.org files that need proper tags]]
- [[#languagetool][LanguageTool]]
@ -2451,6 +2452,26 @@ Features:
- Manipulate annotations.
- Fit PDF to screen.
** Pocket
[[file:+readers/pocket/README.org]]
This layer adds [[https://getpocket.com/][Pocket]] support to Spacemacs via the package
[[https://github.com/alphapapa/pocket-reader.el][pocket-reader]].
#+begin_quote
This is a client for Pocket (getpocket.com). It allows you to manage
your reading list: add, remove, delete, tag, view, favorite,
etc. Doing so in Emacs with the keyboard is fast and efficient. Links
can be opened in Emacs with any function, or in external browsers, and
specific sites/URLs can be opened with specific browser
functions. Views can be sorted by date, title, domain, tags, favorite,
etc, and “limited” mutt-style. Items can be searched for using
keywords, tags, favorite status, unread/archived status, etc. Items
can optionally be colorized by site, making it easy to tell which
items come from different sites. Items are grouped depending on the
sort column.
#+end_quote
** Speed Reading
[[file:+readers/speed-reading/README.org][+readers/speed-reading/README.org]]