• Stars
    star
    109
  • Rank 316,928 (Top 7 %)
  • Language
    Emacs Lisp
  • Created over 3 years ago
  • Updated 2 months ago

Reviews

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

Repository Details

Emacs wallabag client - A Read It Later/Web Archiving Solution in Emacs.

README

Table of Contents

Description

Emacs Wallabag client.

homepage.png

Features

  • [x] Request all entries
  • [x] Request all tags
  • [x] Add tags for one entry
  • [x] Delete tag for one entry
  • [x] Request format for one entry
  • [x] Add one entry
  • [x] Add one entry with current buffer content (Only Emacs has this feature!)
  • [x] Delete one entry
  • [x] Copy as org links (Only Emacs has this feature!)
  • [x] Offline database (Sqlite)
  • [x] Full update
  • [x] Real time search and filter
  • [x] Sidebar supported
  • [x] Select with Ivy
  • [x] sync with all clients (mobile, web, browser extention etc)
  • [x] Support shrface
  • [ ] Advanced search and filtering
  • [ ] Exporting.
  • [ ] Editing.
  • [ ] Batch Deletion.
  • [ ] Batch Tagging.
  • [ ] Annotation
  • [ ] Sorting.

Installation and Configuration

This project relies on emacs-request and emacsql. Please install them in advanced.

git clone https://github.com/chenyanming/wallabag.el.git ~/.emacs.d/lisp/wallabag/

require

(add-to-list 'load-path "~/.emacs.d/lisp/wallabag/")
(require 'wallabag)
(setq wallabag-host "https://xx.xx.xx") ;; wallabag server host name
(setq wallabag-username "xx") ;; username
(setq wallabag-password "xx") ;; password
(setq wallabag-clientid "xx") ;; created with API clients management
(setq wallabag-secret "xx") ;; created with API clients management

use-package (load-path)

(use-package wallabag
  :defer t
  :load-path "~/.emacs.d/lisp/wallabag/"
  :config
  (setq wallabag-host "https://xx.xx.xx") ;; wallabag server host name
  (setq wallabag-username "xx") ;; username
  (setq wallabag-password "xx") ;; password
  (setq wallabag-clientid "xx") ;; created with API clients management
  (setq wallabag-secret "xx") ;; created with API clients management
  ;; (setq wallabag-db-file "~/OneDrive/Org/wallabag.sqlite") ;; optional, default is saved to ~/.emacs.d/.cache/wallabag.sqlite
  ;; (run-with-timer 0 3540 'wallabag-request-token) ;; optional, auto refresh token, token should refresh every hour
  )

use-package (Straight)

(use-package wallabag
  :straight (:host github :repo "chenyanming/wallabag.el" :files ("*.el" "*.alist" "*.css")))

Doom Emacs (package!)

(package! wallabag :recipe (:host github :repo "chenyanming/wallabag.el" :files ("*.el" "*.alist" "*.css")))

Store sensitive credentials in auth-sources

It is insecure to store your sensitive credentials such as the wallabag password and client secret in plain text, and especially if you want to be upload it to public servers. You can use Emacsโ€™ built-in auth-sources library for GPG-encrypted storage of your secrets.

Create an encrypted ~/.authinfo.gpg file with the lines:

machine <wallabag-host> login <username> password <password>
machine <wallabag-client> login <client-id> password <client-secret>

Then, we can use that when setting the wallabag password and secret variables in your config above.

(setq wallabag-password (auth-source-pick-first-password :host "<wallabag-host>")
      wallabag-secret (auth-source-pick-first-password :host "<wallabag-client>"))

Image Caching

Wallabag will not download the images, but using Emacs disk caching capability. Setting url-automatic-caching non-nil causes documents to be cached automatically.

(setq url-automatic-caching t)

Retrieve new entries after M-x wallabag

(add-hook 'wallabag-after-render-hook 'wallabag-search-update-and-clear-filter)

Keybindings

Start with M-x wallabag. For the first time you connect to server, you need to press u to synchronize.

PS:

  1. The synchronization algorithm is still on development, if you want to keep local database always updated, please use wallabag-full-update.

Functions can be used outside wallabag related modes

wallabagEnter *wallabag-search* buffer.
wallabag-findSelect wallabag entries from a list with ivy.
wallabag-full-updatePerform a full database update. It can always keep the local database updated.
wallabag-request-tokenRequest a new token.
wallabag-add-entryAdd one entry to wallabag server, with URL and TAGS
wallabag-insert-entryInsert an entry to wallabag server with current buffer content (behavior may be changed in the future)
wallabag-request-new-entriesRequest the new entries in the background.
wallabag-request-and-synchronize-entriesRequest and synchronize entries, controlled by wallabag-number-of-entries-to-be-synchronized.

wallabag-search-mode

<RET>wallabag-viewView the wallabag entry.
vwallabag-viewView the wallabag entry.
Vwallabag-browse-urlBrowse the url of current wallabag entry.
owallabag-original-entryOpen the original html rendered wallabag entry.
s (non-evil), /(evil)wallabag-search-live-filterFilter the *wallabag-search* buffer.
qwallabag-search-quitQuit *wallabag-entry* then *wallabag-search* and *wallabag-sidebar*.
g (non-evil), r(evil)wallabag-search-refresh-and-clear-filterRefresh wallabag and clear the filter keyword.
G (non-evil), R(evil)wallabag-search-clear-filterClear the filter keyword.
uwallabag-search-update-and-clear-filterRequest new entries, clear the filter keyword, and update wallabag-search.
Uwallabag-search-synchronize-and-clear-filterSynchronize entries, clear the filter keyword, and update wallabag-search.
mwallabag-mark-and-forwardMark entry and forward.
<DEL>wallabag-unmark-and-backwardUnmark entry and backword.
awallabag-add-entryAdd an entry.
dwallabag-delete-entryDelete an entry.
n(non-evil), j(evil)wallabag-next-entryMove to next entry.
p(non-evil), k(evil)wallabag-previous-entryMove to previous entry.
w(non-evil), y(evil)wallabag-org-link-copyCopy marked entries as org links.
twallabag-add-tagsAdd tags (seperated by comma) to entry at point.
Twallabag-remove-tagRemove one tag from list.
โ€˜wallabag-toggle-sidebarToggle sidebar.
xwallabag-update-entry-archiveToggle archive (Read/Unread).
fwallabag-update-entry-starredToggle star (favorites).
iwallabag-update-entry-titleUpdate title.
Iwallabag-update-entry-origin_urlUpdate origin url (from where you found it).

wallabag-entry-mode

rwallabag-viewRefresh wallabag entry.
M-xwallabag-browse-urlBrowse the url of current wallabag entry.
owallabag-original-entryOpen the original html rendered wallabag entry.
qwallabag-entry-quitQuit *wallabag-entry*.
mouse-1wallabag-mouse-1Browse the url.
retwallabag-retBrowse the url.

wallabag-sidebar-mode

โ€˜wallabag-toggle-sidebarToggle sidebar.
<RET>wallabag-sidebar-find-tagFilter by tag at point.
g (non-evil), r(evil)wallabag-search-clear-filterClear the filter keyword.
G (non-evil), R(evil)wallabag-search-clear-filterClear the filter keyword.
nwallabag-sidebar-find-next-tagFilter by next tag.
pwallabag-sidebar-find-previous-tagFilter by previous tag.
qwallabag-sidebar-quitQuit sidebar.

Change logs

2021-04-13

Version 1.1.0:

  • Add wallabag-request-new-entries. It only retrieves and update the new entries.
  • Add wallabag-search-synchronize-and-clear-filter, and bind to U.
  • Rename wallabag-request-entries to wallabag-request-and-synchronize-entries.
  • Rename wallabag-number-of-entries-to-be-retrieved to wallabag-number-of-entries-to-be-synchronized.

2021-04-13

Version 1.0.0: