• Stars
    star
    188
  • Rank 205,563 (Top 5 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Emacs client for Pocket reading list (getpocket.com)

pocket-reader

https://melpa.org/packages/pocket-reader-badge.svg https://stable.melpa.org/packages/pocket-reader-badge.svg

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.

Contents

Screenshots

Marked items are displayed with inverse colors.

Sorted by date-added, with both title and site colorized:

screenshots/by-date-colorized.png

Sorted by site, with only the site colorized:

screenshots/by-site-only-site-colorized.png

Sorted by favorite status, not colorized:

screenshots/by-favorite-not-colorized.png

Sorted by date, showing some excerpts, some marked items, and the bottom window displaying one of the articles using the org-web-tools-read-url-as-org command (currently the default when RET is pressed):

screenshots/with-excerpts-and-org-web-tools.png

A screenshot with the default Emacs theme and default settings:

screenshots/default-theme.png

Installation

MELPA

If you installed from MELPA, just run the pocket-reader command.

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.

Manual

Install the required packages listed in pocket-reader.el. Then put this in your init file and run the pocket-reader command:

(require 'pocket-reader)

Usage

In eww, Org, w3m, and some other major modes, the pocket-reader-add-link command can be used to add a link at point to Pocket.

Keys

Commands operate on the current item or marked items. These keys can be used in the 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.
  • g: Re-sort list.
  • G: Refresh list using last query (or default query).
  • s: Search for items (or display default view if no query is entered). With prefix, add items instead of replacing (this can be used in lieu of boolean OR searches, since Pocket doesnโ€™t support them).
  • 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 (this does not run a new search).
  • R: Open random item from current items. With prefix, read a key and call command bound to it instead of using the default opening function (e.g. use b to open in external browser).
  • ta: Add tags.
  • tr: Remove tags.
  • tt: Set tags.
  • ts: Search for a tag.

Searching

These special keywords can be used when searching:

  • :*, :favorite Return only favorited items.
  • :archive Return only archived items.
  • :unread Return only unread items (default).
  • :all Return all items.
  • :COUNT Return at most COUNT (a number) items. This limit persists until a new search is run.
  • :t:TAG, t:TAG Return items with TAG (only one tag may be searched for, a limitation of the Pocket API).

Changelog

0.3-pre

Additions

  • Use completing-read for selecting tags. (Thanks to Aaron Zeng.)
  • Command pocket-reader-add-link also checks the clipboard for a link to add.

0.2.1

Fixes

  • Handle null or blank URLs returned by Pocket. (Fixes #19, #20. Thanks to Aaron Zeng.)
  • Handle links in Org buffers that span lines. (Thanks to Aaron Zeng.)

0.2

Additions

  • pocket-reader-search (bound to s) can be called with a prefix to add items to the list instead of replacing the list, which can be used in lieu of boolean OR searches, since Pocket doesnโ€™t support them. For example, you could define a custom search command like:
(defun ap/pocket-reader-show-favorites ()
  "Show favorites and items tagged \"check\"."
  (interactive)
  (pocket-reader-search ":* :unread")
  (pocket-reader-search ":all t:check" :add t))
  • pocket-reader-more and pocket-reader-refresh both handle multiple queries when pocket-reader-search is called with a prefix. For example, you could search for t:emacs, then add results for t:linux, and then pocket-reader-more would add more items for both queries, and pocket-reader-refresh would update the list for both queries. Or, in other words, these commands โ€œDTRT.โ€
  • A custom sorting function can be set for the Added column using the option pocket-reader-added-column-sort-function.
    • The default now sorts by date, then by favorite status, then by tags, and finally by domain.
  • The queries used for the default, initial view are now stored in the option pocket-reader-default-queries, and pressing d shows the default view.
  • pocket-reader-add-link now supports Elfeed, w3m, and shr-mode buffers.
  • pocket-reader-domain-url-type-map maps domains to โ€œtypesโ€ of URLs to prefer. This is useful for, e.g. avoiding AMP URLs, which Pocket provides in their API (or for preferring them, on sites where the AMP version is more readable). This variable may be customized.

Changes

  • Default bind for pocket-reader-unmark-all changed from U to u. There was nothing bound to u, and pressing Shift was tiresome.
  • Bind re-sort command to g, and refresh command to G. This is similar to elfeed.
  • Bind random-item command to R instead of r. Since r is often a โ€œmark as readโ€ command, this will help avoid accidentally opening random items.
  • Use hash-tables internally instead of text-properties.

Fixes

  • Unmark all items before limiting display, to prevent marked, hidden items from being modified.
  • Link-adding functions are now autoloaded, so they can be used even if pocket-reader hasnโ€™t been run yet.
  • Require subr-x for if-let.
  • Use cl-incf instead of incf.
  • Allow searching for tags with hyphens and other โ€œnon-wordโ€ characters.

0.1.1

Fix: Use โ€œgivenโ€ URL if no AMP or โ€œresolvedโ€ URL is available.

0.1

Initial release.

Development

Bug reports, feature requests, suggestions โ€” oh my!

License

GPLv3

More Repositories

1

org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items
Emacs Lisp
1,182
star
2

org-ql

An Org-mode query language, including search commands and saved views
Emacs Lisp
1,159
star
3

emacs-package-dev-handbook

An Emacs package development handbook. Built with Emacs, by Emacs package developers, for Emacs package developers.
JavaScript
987
star
4

magit-todos

Show source files' TODOs (and FIXMEs, etc) in Magit status buffer
Emacs Lisp
601
star
5

org-web-tools

View, capture, and archive Web pages in Org-mode
Emacs Lisp
519
star
6

org-sidebar

A helpful sidebar for Org mode
Shell
492
star
7

org-rifle

Rifle through your Org-mode buffers and acquire your target
Emacs Lisp
488
star
8

org-protocol-capture-html

Capture HTML from the browser selection into Emacs as org-mode content
Emacs Lisp
442
star
9

bufler.el

A butler for your buffers. Group buffers into workspaces with programmable rules, and easily switch to and manipulate them.
Emacs Lisp
378
star
10

ement.el

Matrix client for Emacs
Emacs Lisp
354
star
11

unpackaged.el

A collection of useful Emacs Lisp code that isn't substantial enough to be packaged
Emacs Lisp
345
star
12

solarized-everything-css

A collection of Solarized user-stylesheets for...everything?
CSS
277
star
13

burly.el

Save and restore frames and windows with their buffers in Emacs
Emacs Lisp
252
star
14

matrix-client.el

A Matrix client for Emacs! (deprecated in favor of Ement.el)
Emacs Lisp
242
star
15

prism.el

Disperse Lisp forms (and other languages) into a spectrum of colors by depth
Emacs Lisp
228
star
16

org-graph-view

View Org buffers as a clickable, graphical mind-map
Emacs Lisp
190
star
17

yequake

Drop-down Emacs frames, like Yakuake
Emacs Lisp
175
star
18

ts.el

Emacs timestamp and date-time library
Emacs Lisp
159
star
19

dogears.el

Never lose your place in Emacs again
Emacs Lisp
154
star
20

with-emacs.sh

Script to easily run Emacs with specified configurations
Shell
142
star
21

makem.sh

Makefile-like script for building and testing Emacs Lisp packages
Shell
128
star
22

plz.el

An HTTP library for Emacs
Emacs Lisp
126
star
23

bucket

A bucket for your shell (like a set of registers, or a clipboard manager)
Shell
118
star
24

restic-runner

Configure and run Restic more easily
Shell
108
star
25

hammy.el

Programmable, interactive interval timers (e.g. for working/resting)
Emacs Lisp
103
star
26

org-sticky-header

Show off-screen Org heading at top of window
Emacs Lisp
103
star
27

alpha-org

A powerful Org configuration
Emacs Lisp
100
star
28

org-make-toc

Automatic tables of contents for Org files
Shell
83
star
29

taxy.el

Programmable taxonomical hierarchies for arbitrary objects
Emacs Lisp
82
star
30

transclusion-in-emacs

Resources about implementing transclusion in Emacs
79
star
31

topsy.el

Simple sticky header showing definition beyond top of window
Emacs Lisp
77
star
32

org-bookmark-heading

Emacs bookmark support for Org-mode
Emacs Lisp
75
star
33

snow.el

Let it snow in Emacs!
Emacs Lisp
72
star
34

org-now

Conveniently show current Org tasks in a sidebar window
Emacs Lisp
50
star
35

bashcaster

An actually simple screen recorder for Linux
Shell
48
star
36

org-recent-headings

Go to recently used Org headings
Shell
47
star
37

obvious.el

Who needs comments when the code is so obvious
Emacs Lisp
46
star
38

frame-purpose.el

Purpose-specific frames for Emacs
Emacs Lisp
46
star
39

org-almanac

Almanac for Org mode
43
star
40

mosey.el

Mosey around inside your Emacs buffer
Emacs Lisp
37
star
41

org-html-theme-darksun

A Solarized Dark version of the Bigblow Org HTML export theme
JavaScript
36
star
42

salv.el

Local minor mode to save a buffer when Emacs is idle
Emacs Lisp
33
star
43

sword-to-org

Convert Sword modules to Org-mode outlines
Emacs Lisp
33
star
44

org-auto-expand

Automatically expand certain Org headings
Shell
28
star
45

mangle

Mangle man pages to show just the parts you need (suitable for aliasing to "man")
Shell
26
star
46

magit.sh

Run Magit in a separate Emacs instance
Shell
26
star
47

org-notely

Pop to new Org headings for quick notetaking
Shell
26
star
48

scrollkeeper.el

Configurable scrolling commands with visual guidelines, for Emacs
Emacs Lisp
22
star
49

ap.el

A simple, Emacs Lisp-focused Emacs config
Emacs Lisp
21
star
50

highlight-function-calls

Highlight function/macro calls in Emacs
Emacs Lisp
21
star
51

org-quick-peek

Quick inline peeks at agenda items and linked nodes in Org-mode
Emacs Lisp
21
star
52

defrepeater.el

Easily define repeatable Emacs commands
Emacs Lisp
20
star
53

pocket-lib.el

Emacs library for the getpocket.com API
Emacs Lisp
19
star
54

org-pocket

Tools to use Pocket with Org-mode
Emacs Lisp
16
star
55

elexandria

Alexandria-like library for Emacs Lisp
Emacs Lisp
13
star
56

sword-converter

Convert SWORD modules to JSON and SQLite and search the converted files
Emacs Lisp
13
star
57

frecency.el

Library to sort items by "frecency" in Emacs
Emacs Lisp
11
star
58

chromatext.el

Apply color gradients to lines of text in Emacs (possibly increasing legibility)
Emacs Lisp
9
star
59

plamix

Mix together M3U playlists, optionally with a desired duration, outputting either a list of files to STDOUT, or writing an M3U playlist to a file
Python
9
star
60

pyza

A command-line/terminal/console Songza player, using VLC or MPD to play audio
Python
8
star
61

melpa-stats

Stats tools for MELPA
Emacs Lisp
6
star
62

org-books

Tools for books in Org-mode
Emacs Lisp
5
star
63

rubbish.py

WIP: A CLI to the XDG trash bin in Python
Python
5
star
64

tp.el

Emacs text-property convenience library
Emacs Lisp
5
star
65

org-search-goto

org-search-goto
Emacs Lisp
5
star
66

buffer-groups.el

A lightweight, automatic grouping rule-based buffer grouper and switcher
Emacs Lisp
5
star
67

ibuffer-auto-groups

Automatically make groups for ibuffer
Emacs Lisp
5
star
68

ampd-tools

A small collection of MPD-related tools
Python
4
star
69

reddit-emacs-css

CSS for /r/emacs
CSS
4
star
70

ox-elisp

Export Org buffers to Emacs Lisp comments
Emacs Lisp
3
star
71

dbg.el

Simple debugging macros
Emacs Lisp
3
star
72

tabtint

Firefox extension which tints Firefox tabs to match color of web page
JavaScript
3
star
73

ya-solarized.el

Yet Another Solarized theme for Emacs
Emacs Lisp
2
star
74

overwatch-formula76

A racing custom game type for Overwatch
C
2
star
75

overwatch-custom-games

A collection of custom games for Overwatch
Emacs Lisp
2
star
76

listen.el

Audio/music player for Emacs
Emacs Lisp
2
star
77

unsplash.hy

Hy
1
star
78

helm-swish

Like helm-swoop, but a little bit faster
Emacs Lisp
1
star
79

greek-hebrew-emacs

How to set up Emacs to easily type Greek and Hebrew
1
star
80

source-status-linker

Turns output of Source engine's status command into links to Steam user profiles
Python
1
star
81

pentadactyl-tabmattach

JavaScript
1
star
82

github-solarized

A Solarized user stylesheet for GitHub made with Stylus
CSS
1
star