fasheng / elfeed-protocol

Provide extra protocols to make like Fever, NewsBlur, Nextcloud/ownCloud News and Tiny Tiny RSS work with elfeed
GNU General Public License v3.0
100 stars 18 forks source link

Can't get it to work with Nextcloud #9

Closed Bridouz closed 6 years ago

Bridouz commented 6 years ago

Hi,

Just tried your elfeed-protocol package with my Nextcloud instance and can't find how it work.

I installed elfeed-protocol and configured it. When I launch M+x elfeed I try M+x elfeed-protocol-owncloud-update and then the minibuffer prompts Protocol Feed:.

What am I suppose to type there ?

Thanks

fasheng commented 6 years ago

I use nextcloud news everyday, so it really works. You don't need to run elfeed-protocol-owncloud-update manually, just press G to fetch articles in elfeed search view like usual.

Bridouz commented 6 years ago
(use-package elfeed-protocol)
(setq elfeed-use-curl t)
(elfeed-set-timeout 36000)
(setq elfeed-curl-extra-arguments '("--insecure"))
(require 'elfeed-protocol)
(setq elfeed-feeds '("owncloud+https://username:password@raspbridouz.duckdns.org/nextcloud"))
(elfeed-protocol-enable)

then M+x elfeed and G (or elfeed-update) and it says:

elfeed-protocol-no-auth-url: Wrong type argument: stringp,  nil
fasheng commented 6 years ago

Looks you didn't setup elfeed-feeds correctly, maybe your username/password format is a little different, you could toggle-debug-on-error and catch the full error trace again. And how about to run following code in *scratch*:

;; format 1, prefer result: ("owncloud+https://username:password@raspbridouz.duckdns.org/nextcloud")
(let* ((elfeed-feeds '("owncloud+https://username:password@raspbridouz.duckdns.org/nextcloud")))
  (elfeed-protocol-feed-list))

;; format 2: prefer result: ("owncloud+https://username@raspbridouz.duckdns.org/nextcloud")
(let* ((elfeed-feeds '(("owncloud+https://username@raspbridouz.duckdns.org/nextcloud" :password "password"))))
  (elfeed-protocol-feed-list))
Bridouz commented 6 years ago

I ran the followings code and debug was :

;; format 1
Debugger entered--Lisp error: (void-variable owncloud+https://justin:password)
  eval(owncloud+https://justin:password nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

;; format 2

Unvalid function

My password has ! and ? in it, maybe it can cause some issues ?

fasheng commented 6 years ago

Yes, so just use format 2, and delete your secret info in past comment ;)

fasheng commented 6 years ago

Oh, format 2 show 'Unvalid function'... What that mean?

fasheng commented 6 years ago

I guess format 2 should works for you, please have a try.

Bridouz commented 6 years ago

OK I tried format 2 un a scratch buffer again ans I have

error: (void-variable owncloud+https://justin)
eval(owncloud+https://justin nil)
fasheng commented 6 years ago

emmm, your error looks strange.. Please ensure (elfeed-protocol-enable) before such test:

;; prefer result: "owncloud+https://raspbridouz.duckdns.org/nextcloud"
(let* ((elfeed-feeds '(("owncloud+https://username@raspbridouz.duckdns.org/nextcloud" :password "password:!\?"))))
  (elfeed-protocol-no-auth-url (nth 0 (elfeed-protocol-feed-list))))

I just think it's really easy.

fasheng commented 6 years ago

Maybe we should skip such testing in scratch. Believe me, use format 2 in your elfeed-feeds settings and everything will be fine.

Bridouz commented 6 years ago

Thanks, working now :) I do not know what I missed.

Thanks again