
git.sr.ht/~lattis/rss/commit/fddc167294157f89da52d36399db2982f7630a91.patch
Preview meta tags from the git.sr.ht website.
General Meta Tags
1- title- only operate on feeds with this title + # COMMANDS +*help* + display basic help + *fetch* - download feeds using curl(1), with a blank *TARGET* all feeds are - downloaded. Multiple downloads are parallelized with a fixed jobs - limit. This limit may be modified by changing the *concurrent_limit* - variable in _rss_. + download feeds using curl(1) + + Multiple downloads are parallelized with a fixed jobs limit. This limit + may be modified by changing the *concurrent_limit* variable in _rss_. *feeds* list feeds. This prints out all feed urls, preceded by their respective group +*pop* + read new posts. *TARGET* is an integer specifying how many posts to read + +*rm* + remove feed data + *list* - list all posts. If the stdout of rss is connected to a tty, the output - of all list\* commands is formatted to look nicer. Otherwise raw paths - are output. + list all posts. *list_read* list read posts -*list_unread*, *new* +*list_unread* list unread posts -*read* - read posts. If *TARGET* is a directory, display the most recent post in - that directory (if the directory contains many feeds, this will display - the most recent post of the last feed alphabetically). If *TARGET* is - a file relative to *$XDG_DATA_HOME*/rss/feeds, display that file. If - *TARGET* is an absolute path, display *TARGET*. Otherwise you are - gonna get an error. - -*pop* - read new posts. If *TARGET* is a directory, display the oldest unread - post in that directory (if the directory contains many feeds, this will - display the oldest post of the first feed alphabetically). The - remaining behavior is the same as *read* - -*help* - display basic help +*show* + read all posts matching *TARGET* # CONFIGURATION @@ -71,11 +70,13 @@ _rss_ is configured by modifying *$XDG_CONFIG_HOME*/rss/feeds.sh. This is a shell script that is sourced by _rss_. Feeds are added by calling the *feed* function. -*feed* [-g <*GROUP*>] -u <*URL*> +*feed* [-g <*GROUP*>] [-t <*TITLE*>] -u <*URL*> *GROUP*, if given, is a path that is prepended to the path where the feed is stored. +*TITLE*, if not given, is the url stripped of the protocol specifier + e.g. *feed* -g cooking -u https://www.justonecookbook.com/feed/ @@ -88,15 +89,11 @@ with *rss_*. The remainder of the function name can be used to call that function from the command line. You could also potentially override a builtin function if you wanted I guess. -Here is a simple extension to read all new messages one by one: +Here is a simple extension to read all new messages: ``` rss_popall() { - local new="$(rss_list_unread | wc -l)" - - [ "$new" -eq 0 ] && { echo "empty."; exit; } - - for ((;new>0;new--)) { rss_pop; } + rss_pop 999 } ``` @@ -120,8 +117,7 @@ _rss_ puts all of its data in *XDG_DATA_HOME*/rss/, which defaults to Within that directory there is `feeds/` which contains all downloaded posts, a file named `read` which contains the full path of what you have read. Removing -lines from this file is the same as marking the post "unread". Finally, there -may be a file named `tmp`. This is just a temporary file :). +lines from this file is the same as marking the post "unread". _rss_ reads all configuration data from *XDG_CONFIG_HOME*/rss/, which defaults to *$HOME*/.config/rss/. @@ -140,7 +136,7 @@ $ rss fetch Listing unread posts ``` -$ rss new +$ rss list_unread ``` Reading the oldest unread post