Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lua
 
 
 
 
 
 
 
 
 
 

NVIM-RSS

A simple rss reader for neovim written in lua.


Project Goals

I aim for it to be similar to the excellent vnews and, if you squint hard enough while looking sideways, then perhaps elfeed.

Ideally, if you have a bunch of feeds and simply wish to view the latest entries in neovim instead of browsers or dedicated apps, then this plugin should help you out.

Showcase (v0.2)

nvim-rss-v0.2.mp4

Pre-requisites (installation cmd for yay on arch-like systems)

  1. neovim | yay -S neovim
  2. curl | yay -S curl | Usually pre-installed on most systems
  3. sqlite3 | yay -S sqlite3 | Usually pre-installed on some systems
  4. feed-parser | luarocks install feedparser
  5. sqlite.lua | luarocks install sqlite

Installation

Tested on linux, may work on macos. Probably won't work on windows.

If vim-plug then

Plug 'empat94/nvim-rss'

Else your usual way of installing plugins

Setup

Inside init.lua

require("nvim-rss").setup({
  feeds_dir = "/home/user/.config/nvim", -- ensure has write permissions
})

If using init.vim, wrap the code inside lua << EOF ... EOF

Usage

By default, no mappings/commands present. All functions are exposed so you may use them as you like!

  • Open RSS file: open_feeds_tab()

Opens nvim.rss file where all the feeds are listed. By default ~/nvim.rss, see Setup to change default dir.

  • Fetch and view a feed: fetch_feed()

Pulls updates for the feed under cursor and opens a vertical split to show the entries.

  • Fetch all feed: fetch_all_feeds()

Fetches data for all feeds in nvim.rss and updates the corresponding counts if nvim.rss is loaded in a buffer.

  • View a feed: view_feed()

Opens entries for feed under cursor in a vertical split. This does not refreshes data from server, instead pulling stored content from database.

  • Import OPML file: import_opml(opml_file)

Parses the supplied file, extracts feed links if they exist and dumps them under "OPML Import" inside nvim.rss. They are not added to database unless you explicitly fetch feeds for the links!


To use above functions, write the usual mapping or command syntax. Example -

command! OpenRssView lua require("nvim-rss").open_feeds_tab()

command! FetchFeed lua require("nvim-rss").fetch_feed()

command! FetchAllFeeds lua require("nvim-rss").fetch_all_feeds()

command! ViewFeed lua require("nvim-rss").view_feed()

command! -nargs=1 ImportOpml lua require("nvim-rss").import_opml(<args>)
:OpenRssView

:FetchFeed

:FetchAllFeeds

:ViewFeed

:ImportOpml "/home/user/Documents/rss-file.opml"

NOTE: The command ImportOpml requires a full path and surrounding quotes.

Checkout my feeds list here

Roadmap

v0.1

  • Fetch & parse feeds
  • Setup a database
  • Update UI for new feed data
  • Clean up Rssview for better reading
  • Check multiple streams for different data structures
  • Release v0.1 (Deadline: 13th Oct 2021)

v0.2

  • OPML import
  • Latest entries feed count
  • Refresh all feeds
  • View feed (without fetching data from server)
  • Release v0.2 (Deadline: 7th Nov 2021)

v0.3

  • Clean database, reset everything
  • Mark favorite feeds, star entries
  • Fetch inside category
  • Fetch inside visual range (selected lines)
  • OPML export
  • Release v0.3 (Deadline: 3rd Dec 2021)

v0.4 and above (Tentative)

  • Use to expose functions
  • Console browser intergation
  • Most viewed, most recent, favorite feeds view
  • Highlight entries (new, read, starred)
  • Windows support

Personal Goals

  1. Learn lua (I plan to make a few more plugins!)
  2. Learn how to make a neovim plugin
  3. Contribute to the awesome neovim ecosystem
  4. Share some opensource love <3

About

A simple rss reader plugin for neovim

Resources

License

Packages

No packages published