- Notifications
You must be signed in to change notification settings - Fork18
Provide extra protocols to make like Fever, NewsBlur, Nextcloud/ownCloud News and Tiny Tiny RSS work with elfeed
License
fasheng/elfeed-protocol
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Important
Since version0.9.0
, elfeed-protocol use variableelfeed-protocol-feeds
instead ofelfeed-feeds
to fix conflictissues to extensions that modify or requireelfeed-feeds
. Andelfeed-protocol could work together with elfeed-org andelfeed-autotag without any aditional setup now.
Provide extra protocols to make self-hosting RSS readers workwithelfeed,includingFever,NewsBlur,Nextcloud/ownCloud News,Tiny Tiny RSS and even more.
;; Install through package managerM-x package-install <ENTER>elfeed-protocol <ENTER>
Setup elfeed-protocol, then switch to search view and and press G to update entries:
;; curl recommend(setq elfeed-use-curlt)(elfeed-set-timeout36000)(setq elfeed-curl-extra-arguments '("--insecure"));necessary for https without a trust certificate;; setup feeds(setq elfeed-protocol-feeds '(("owncloud+https://user@myhost.com":password"my-password")));; enable elfeed-protocol(setq elfeed-protocol-enabled-protocols '(fever newsblur owncloud ttrss))(elfeed-protocol-enable)
- Fetch articles with the entry ID one by one by default. For someservice that don't provide valid entry ID like FressRSS, just set
elfeed-protocol-fever-update-unread-only
to t as a workaround - Fetch remote category as tag
- Support sync unread, starred(saved) tags, the starred tag namedefined in
elfeed-protocol-fever-star-tag
which default value isstar
- Support multiple fetching methods:
elfeed-protocol-fever-update-older
elfeed-protocol-fever-update-star
NOTE: Many self-hosted RSS server provide Fever API, and user mustprovide the URL manually. Here is a list of Fever API URLs I collectedfor some popular RSS servers:
- Tiny Tiny RSS's Fever plugin
https://your-ttrss-server/plugins/fever/
- FreshRSS
https://your-freshrss-server/api/fever.php
- miniflux
https://your-miniflux-server/fever/
Example:
(setq elfeed-protocol-fever-update-unread-onlynil)(setq elfeed-protocol-fever-fetch-category-as-tagt)(setq elfeed-protocol-feeds '(("fever+https://user@myhost.com":api-url"https://myhost.com/plugins/fever/":password"my-password")))
- Fetch articles from recent pages
- Fetch articles for special feed
- Fetch remote category as tag
- Fetch tags in remote
- Support sync unread, starred(saved) tags, the starred tag namedefined in
elfeed-protocol-ttrss-star-tag
which default value isstar
NOTE: A file for storing session cookies has to be specified viaelfeed-curl-extra-arguments
like in the following example.
Example:
(setq elfeed-protocol-newsblur-maxpages20)(setq elfeed-protocol-newsblur-fetch-tagst)(setq elfeed-protocol-newsblur-fetch-category-as-tagt)(setq elfeed-protocol-newsblur-sub-category-separator"/")(setq elfeed-curl-extra-arguments '("--cookie-jar""/tmp/newsblur-cookie""--cookie""/tmp/newsblur-cookie"))(setq elfeed-protocol-feeds '(("newsblur+https://user@newsblur.com":password"my-password")))
- Fetch articles with the modified time by default
- Fetch articles for special feed
- Fetch remote category as tag
- Support sync unread and starred tags, the starred tag name definedin
elfeed-protocol-owncloud-star-tag
which default value isstar
. Forexample, if user addstar
tag to one article, the star stat willbe sync to server, too - Support multiple fetching methods:
elfeed-protocol-owncloud-update-since-timestamp
elfeed-protocol-owncloud-update-since-id
elfeed-protocol-owncloud-update-older
Example:
(setq elfeed-protocol-owncloud-maxsize1000)(setq elfeed-protocol-owncloud-update-with-modified-timet)(setq elfeed-protocol-owncloud-fetch-category-as-tagt)(setq elfeed-protocol-feeds '(("owncloud+https://user@myhost.com":password"my-password")))
- Fetch articles by the entry ID
- Fetch articles for special feed
- Fetch remote category as tag
- Support sync unread, starred and published tags, the starred tagname defined in
elfeed-protocol-ttrss-star-tag
which defaultvalue isstar
, and the published tag name defined inelfeed-protocol-ttrss-publish-tag
which default value ispublish
- Support multiple fetching methods:
elfeed-protocol-ttrss-update-older
elfeed-protocol-ttrss-update-star
NOTE: For Tiny Tiny RSS only allow fetch Maximize 200 entries eachtime, so if your own much more starred entries, just runelfeed-protocol-ttrss-update-star
manually to fetch them all
Example:
(setq elfeed-protocol-ttrss-maxsize200); bigger than 200 is invalid(setq elfeed-protocol-ttrss-fetch-category-as-tagt)(setq elfeed-protocol-feeds '(("ttrss+https://user@myhost.com":password"my-password")))
(setq elfeed-protocol-feeds '(;; same format with elfeed-feeds"http://foo/" ("http://baz/" comic);; format 1"owncloud+https://user:pass@myhost.com";; format 2, for username or password with special characters ("owncloud+https://user@domain.com@myhost.com":password"password/with|special@characters:");; format 3, for password in file ("owncloud+https://user@myhost.com":password-file"~/.password");; format 4, for password in .authinfo,;; ensure (auth-source-search :host "myhost.com" :port "443" :user "user4") exists ("owncloud+https://user@myhost.com":use-authinfot);; format 5, for password in gnome-keyring ("owncloud+https://user@myhost.com":password (shell-command-to-string"echo -n `secret-tool lookup attribute value`"));; format 6, for password in pass(1), using password-store.el ("owncloud+https://user@myhost.com":password (password-store-get"owncloud/app-pass"));; use autotags ("owncloud+https://user@myhost.com":password"password":autotags (("example.com" comic)))))
(setq elfeed-feeds '("http://foo/" ("http://baz/" comic)))(setq elfeed-protocol-feeds '(("owncloud+https://user@myhost.com":password"my-password")))(setq elfeed-protocol-feeds (append elfeed-protocol-feeds elfeed-feeds))
Since version0.9.0
, elfeed-protocol could work together withelfeed-org and elfeed-autotag without any aditional setup.
To fix0 / 0
zero count issue for all feeds, just active thefollowing advice forrmh-elfeed-org-export-feed
:
(defunelfeed-protocol-advice-rmh-elfeed-org-export-feed (headline)"Advice for`rmh-elfeed-org-export-feed', add elfeed-protocol ID as suffix for each feed." (let* ((url (car headline)) (proto-id (car (elfeed-protocol-feed-list)))) (when proto-id (setcar headline (elfeed-protocol-format-subfeed-id proto-id url)))))(advice-add'rmh-elfeed-org-export-feed:before#'elfeed-protocol-advice-rmh-elfeed-org-export-feed)
Besides, don't useelfeed-summary-update
to fetach articles,useelfeed-update
instead, and pressr
to refresh UI manually:
(define-key elfeed-summary-mode-map (kbd"R")#'elfeed-update)
Installcask
system package firstly, and then run following commands
make initmaketestmake checkdocmake elintmake package-lint
Fetch docker image and run it
docker pull nextclouddocker run --rm -p 80:80 nextcloud
Openhttp://127.0.0.1 in browser to setup Nextcloud
- Create admin user and select database to SQLite, then press "Finish setup"
- Press left top popup menu and select "+Apps", select"Multimedia", and enable the "News" app
- Press left top popup menu and switch to "News" app, thensubscribe some feeds
Setup
elfeed-protocol
(setq elfeed-protocol-feeds '("owncloud+http://<admin>:<password>@localhost"))
Fetch related docker images and run them
docker pull clue/ttrssdocker pull nornagon/postgresdocker run --rm -d --name ttrssdb nornagon/postgresdocker run --rm --link ttrssdb:db -p 80:80 clue/ttrss
Openhttp://127.0.0.1 in browser to setup Tiny Tiny RSS
- Use the default
admin:password
authorization info to login - Enter "Preferences" page to enable "Enable API access" and save configuration
- Use the default
Setup
elfeed-protocol
(setq elfeed-protocol-feeds '("ttrss+http://admin:password@localhost"))
Please collect logs in buffer*elfeed-log*
with the following configbefore reporting issues:
(setq elfeed-log-level'debug)(toggle-debug-on-error);; for more logs(setq elfeed-protocol-log-tracet)(setq elfeed-protocol-fever-maxsize10)(setq elfeed-protocol-newsblur-maxpages1)(setq elfeed-protocol-owncloud-maxsize10)(setq elfeed-protocol-ttrss-maxsize10)
When I run elfeed-update I get the error:
elfeed-protocol-feeds malformed, bad entry
Don't forget to enable elfeed-protocol at first:
(elfeed-protocol-enable)
Not working if my password contains special characters like
@#$/:
.Use format 2 instead in previous example for complex password:
;; format 2, for password with special characters("owncloud+https://user@myhost.com":password"password/with|special@characters:")
How to fetch my older headlines in server?
fever
,owncloud
andttrss
protocol provide method to fetcholder headlines. And the update operations could not executed inthe same time, sorun-at-time
with some delays(for example 15s)will help you:(setq my-elfeed-update-timer (run-at-time1515 (lambda () (when (= elfeed-curl-queue-active0) (elfeed-protocol-ttrss-update-older"ttrss+https://user@host")))))(cancel-timer my-elfeed-update-timer)
Why the articles still are unread even they were mark read in other client?
Well, only ownCloud News API support two-way synchronization for itfetch articles with modified time. And other API only fetcharticles id by id. So your issue just the desired result~
However here is a workaround. For example fever, you could resetthe update mark so it will re-fetch the last 1000 articles infollowing updates and will sync the read state:
(let* ((proto-id"fever+https://user@miniflux-host") (last-id (elfeed-protocol-fever-get-update-mark proto-id'update))) (elfeed-protocol-fever-set-update-mark proto-id'update (- last-id1000)))
And Fever limit 50 max size for per request, so update timer may help you:
(run-at-time300300 (lambda () (when (= elfeed-curl-queue-active0) (elfeed-update))))
Or you could use
elfeed-untag-1
mark all selected articles asread(will not call curl process) then executeelfeed-protocol-fever-reinit
fetch all unread articles:(cl-loopfor entryin (elfeed-search-selected)do (elfeed-untag-1 entry'unread))
Hope helps.
Sometimes emacs may be blocked if the parsing downloaded articlesis too large, for example >50MB.
This is caused by the known emacs bug that CPU will be in highusage if a text line is too long. There three methods to workaroundthis:
Method 1, limit the download size, for example:
(setq elfeed-protocol-owncloud-maxsize 1000)
Method 2, for ownCloud, just update articles since special entryID instead the modified time, this could run multiple times tokeep up to date to avoid download too large entries once time
M-x elfeed-protocol-owncloud-update-since-id
Method 3, some protocol provide update method to reset the lastmodified time to skip some data, for example:
M-x elfeed-protocol-owncloud-update-since-timestamp
Released under the terms of the GNU GPLv3+.
About
Provide extra protocols to make like Fever, NewsBlur, Nextcloud/ownCloud News and Tiny Tiny RSS work with elfeed