neo451 / feed.nvim

feature-rich neovim web feed reader, rss, atom and json, all in lua
https://luarocks.org/modules/neo451/feed.nvim
GNU General Public License v3.0
56 stars 1 forks source link

Docs: Can the docs show how to add a feed? #40

Open PyDataBlog opened 3 weeks ago

PyDataBlog commented 3 weeks ago

I can't seem to add hacker news as feed. Can an example be added to the docs?

neo451 commented 3 weeks ago

I just found that I left add_feed command as a placeholder by mistake, it does not do anything now, for the db and feed management is not fully implemented, so you just have to pass the url in the config like

require"feed".setup{
   feeds = {
      "hackernews.com/rss" -- like so
   }
}

and use Feed update

The ability to add and update individual feeds will be released very soon.

Also, if you mean can not add because the plugin can not parse hacker news feed correctly, there will be a major update on the feedparser so just wait a few days and see :)

Docs is also gonna be there as soon as I hammer down some of the stability issues.

neo451 commented 3 weeks ago

There is a new release that should solve your problem, go ahead and try it. there are some new doc in the readme as well.

PyDataBlog commented 3 weeks ago

I just found that I left add_feed command as a placeholder by mistake, it does not do anything now, for the db and feed management is not fully implemented, so you just have to pass the url in the config like

require"feed".setup{
   feeds = {
      "hackernews.com/rss" -- like so
   }
}

and use Feed update

The ability to add and update individual feeds will be released very soon.

Also, if you mean can not add because the plugin can not parse hacker news feed correctly, there will be a major update on the feedparser so just wait a few days and see :)

Docs is also gonna be there as soon as I hammer down some of the stability issues.

I tried this but nothing showing up after reloading and doing Feed update

return {
    "neo451/feed.nvim",
    lazy = true,
    dependencies = {
        "neo451/treedoc.nvim",
        "stevearc/conform.nvim",
        "j-hui/fidget.nvim",
        "nvim-lua/plenary.nvim",
        "nvim-treesitter/nvim-treesitter",
    },
    -- opts = {},
    config = function()
        require("feed").setup({
            feeds = {
                "hackernews.com/rss", -- like so
            },
        })
    end,
}
neo451 commented 3 weeks ago
  1. make sure you have updated to 1.6, make sure you have the correct rss address for hacker news.
  2. try Feed blowup to rm the db altogether, cause might be incompatible db format.
  3. then use Feed add_feed or pass the url in the setup like above
  4. if you still have issues, then might be because the feed is not handled correctly, tell me the url and I will look into it.
PyDataBlog commented 3 weeks ago
  1. make sure you have updated to 1.6, make sure you have the correct rss address for hacker news.
  2. try Feed blowup to rm the db altogether, cause might be incompatible db format.
  3. then use Feed add_feed or pass the url in the setup like above
  4. if you still have issues, then might be because the feed is not handled correctly, tell me the url and I will look into it.

I did all that including deleting and rebuilding the plugin with the same Lua file as above. Feed doesn't show anything. Can you give a minimum working example with ANY rss?

neo451 commented 3 weeks ago
  1. like for https://hnrss.github.io/#firehose-feeds, I just copied the link of the latest: https://hnrss.github.io/#firehose-feeds
  2. and used Feed add_feed, this one just type it in and it will prompt you for the link, paste it in
  3. then use Feed update or Feed update_feed (later can be buggy at the moment)
  4. then you may need to wait for a bit, see the fidget progress bar finish.
  5. open Feed, or if you are already in, use r, or Feed refresh to see new entries.

I was able to get it:

13a5fe5deb27bc3dc5972e1bb6fa99c

if none of this works, go to your local directory, in your local nvim data dir, on linux is .local/share/nvim/feed/ and in the index file see if there are entries there, also use Feed log to give me your log would also be helpful.

PyDataBlog commented 3 weeks ago
  1. like for https://hnrss.github.io/#firehose-feeds, I just copied the link of the latest: https://hnrss.github.io/#firehose-feeds
  2. and used Feed add_feed, this one just type it in and it will prompt you for the link, paste it in
  3. then use Feed update or Feed update_feed (later can be buggy at the moment)
  4. then you may need to wait for a bit, see the fidget progress bar finish.
  5. open Feed, or if you are already in, use r, or Feed refresh to see new entries.

I was able to get it:

13a5fe5deb27bc3dc5972e1bb6fa99c

if none of this works, go to your local directory, in your local nvim data dir, on linux is .local/share/nvim/feed/ and in the index file see if there are entries there, also use Feed log to give me your log would also be helpful.

ok I'm able to get the same output. when I press enter on any on the items or even launch Feed, I get a feed.lualine error trace. Any ideas?

Here's the trace:

Error executing Lua callback: ...ebr/.local/share/nvim/lazy/feed.nvim/lua/feed/render.lua:35: BufEnter Autocommands for "<buffer=23>": Vim(append):Error executing lua callback: ...r/.local/share/nvim/lazy/feed.nvim/lua/feed/commands.lua:373: mod
ule 'feed.lualine' not found:
        no field package.preload['feed.lualine']
cache_loader: module feed.lualine not found
cache_loader_lib: module feed.lualine not found
        no file './feed/lualine.lua'
        no file '/opt/homebrew/share/luajit-2.1/feed/lualine.lua'
        no file '/usr/local/share/lua/5.1/feed/lualine.lua'
        no file '/usr/local/share/lua/5.1/feed/lualine/init.lua'
        no file '/opt/homebrew/share/lua/5.1/feed/lualine.lua'
        no file '/opt/homebrew/share/lua/5.1/feed/lualine/init.lua'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/nvim-dap-python/share/lua/5.1/feed/lualine.lua'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/nvim-dap-python/share/lua/5.1/feed/lualine/init.lua'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/telescope.nvim/share/lua/5.1/feed/lualine.lua'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/telescope.nvim/share/lua/5.1/feed/lualine/init.lua'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/feed.nvim/share/lua/5.1/feed/lualine.lua'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/feed.nvim/share/lua/5.1/feed/lualine/init.lua'
        no file './feed/lualine.so'
        no file '/usr/local/lib/lua/5.1/feed/lualine.so'
        no file '/opt/homebrew/lib/lua/5.1/feed/lualine.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/nvim-dap-python/lib/lua/5.1/feed/lualine.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/nvim-dap-python/lib64/lua/5.1/feed/lualine.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/telescope.nvim/lib/lua/5.1/feed/lualine.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/telescope.nvim/lib64/lua/5.1/feed/lualine.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/feed.nvim/lib/lua/5.1/feed/lualine.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/feed.nvim/lib64/lua/5.1/feed/lualine.so'
        no file './feed.so'
        no file '/usr/local/lib/lua/5.1/feed.so'
        no file '/opt/homebrew/lib/lua/5.1/feed.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/nvim-dap-python/lib/lua/5.1/feed.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/nvim-dap-python/lib64/lua/5.1/feed.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/telescope.nvim/lib/lua/5.1/feed.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/telescope.nvim/lib64/lua/5.1/feed.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/feed.nvim/lib/lua/5.1/feed.so'
        no file '/Users/bebr/.local/share/nvim/lazy-rocks/feed.nvim/lib64/lua/5.1/feed.so'
stack traceback:
        [C]: in function 'require'
        ...r/.local/share/nvim/lazy/feed.nvim/lua/feed/commands.lua:373: in function <...r/.local/share/nvim/lazy/feed.nvim/lua/feed/commands.lua:371>
        [C]: in function 'nvim_set_current_buf'
        ...ebr/.local/share/nvim/lazy/feed.nvim/lua/feed/render.lua:35: in function 'show'
        ...ebr/.local/share/nvim/lazy/feed.nvim/lua/feed/render.lua:56: in function 'show_index'
        ...ebr/.local/share/nvim/lazy/feed.nvim/lua/feed/render.lua:117: in function 'refresh'
        ...r/.local/share/nvim/lazy/feed.nvim/lua/feed/commands.lua:155: in function 'show_index'
        /Users/bebr/.local/share/nvim/lazy/feed.nvim/lua/feed.lua:24: in function </Users/bebr/.local/share/nvim/lazy/feed.nvim/lua/feed.lua:7>
stack traceback:
        [C]: in function 'nvim_set_current_buf'
        ...ebr/.local/share/nvim/lazy/feed.nvim/lua/feed/render.lua:35: in function 'show'
        ...ebr/.local/share/nvim/lazy/feed.nvim/lua/feed/render.lua:56: in function 'show_index'
        ...ebr/.local/share/nvim/lazy/feed.nvim/lua/feed/render.lua:117: in function 'refresh'
        ...r/.local/share/nvim/lazy/feed.nvim/lua/feed/commands.lua:155: in function 'show_index'
        /Users/bebr/.local/share/nvim/lazy/feed.nvim/lua/feed.lua:24: in function </Users/bebr/.local/share/nvim/lazy/feed.nvim/lua/feed.lua:7>

and the current logs:

[INFO  Wed Oct 23 21:32:36 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Wed Oct 23 21:34:26 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 21:16:22 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 21:16:22 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 21:16:22 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 21:21:58 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 21:21:58 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 21:21:58 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:07:21 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:07:21 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:07:21 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:05 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:05 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:05 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:05 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:32 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:32 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:32 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Thu Oct 24 23:08:32 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:98: server invalid response err for hackernews.com/rss
[INFO  Fri Oct 25 22:33:35 2024] ...bebr/.local/share/nvim/lazy/feed.nvim/lua/feed/fetch.lua:102: server invalid response err for nil
neo451 commented 3 weeks ago
  1. lualine error was a foolish mistake of mine, leaving a experimental line in the new release, I fixed it in a new version.
  2. invalid response from hackernews is because I did not thought of 301 as a valid response, in the new version should be ok now. I have managed to add hackernews.com/rss to my feeds now.