Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
780f26245c | ||
|
c9ba058ae6 |
17
README.md
17
README.md
@@ -13,10 +13,7 @@ View RSS feeds from the terminal.
|
|||||||
### via releases
|
### via releases
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
VERSION='0.1.0'; \
|
curl -fsSL https://raw.githubusercontent.com/davegallant/srv/master/install.sh | bash
|
||||||
sudo curl --progress-bar \
|
|
||||||
-L "https://github.com/davegallant/srv/releases/download/v${VERSION}/srv_${VERSION}_$(uname -s)_x86_64.tar.gz" | \
|
|
||||||
sudo tar -C /usr/bin --overwrite -xvzf - srv
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### via go
|
### via go
|
||||||
@@ -44,11 +41,13 @@ cp ./config-example.yml ~/.config/srv/config.yml
|
|||||||
|
|
||||||
Key mappings are statically defined for the time being.
|
Key mappings are statically defined for the time being.
|
||||||
|
|
||||||
- `TAB` switches between Feeds and Items.
|
| Key | Description |
|
||||||
- `UP/DOWN` navigates feeds and items`
|
|:---------:| --------------------------------------------------------------------- |
|
||||||
- `ENTER` either selects a feed or opens a feed item in an external application.
|
| `TAB` | switches between Feeds and Items. |
|
||||||
- `F5` refresh list of feeds
|
| `UP/DOWN` | navigates feeds and items` |
|
||||||
- `CTRL+C` quit
|
| `ENTER` | either selects a feed or opens a feed item in an external application.|
|
||||||
|
| `CTRL+R` | refresh list of feeds |
|
||||||
|
| `CTRL+C` | quit |
|
||||||
|
|
||||||
|
|
||||||
## build
|
## build
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
feeds:
|
|
||||||
- https://aws.amazon.com/blogs/security/feed/
|
|
||||||
- https://www.phoronix.com/rss.php
|
|
||||||
- https://www.zdnet.com/topic/security/rss.xml
|
|
||||||
path: .config/srv/config.yml
|
|
@@ -1,9 +1,8 @@
|
|||||||
---
|
---
|
||||||
feeds:
|
feeds:
|
||||||
- https://news.ycombinator.com/rss
|
- https://aws.amazon.com/blogs/security/feed/
|
||||||
- https://www.reddit.com/r/linux/.rss
|
|
||||||
- https://www.zdnet.com/topic/security/rss.xml
|
|
||||||
- https://www.phoronix.com/rss.php
|
- https://www.phoronix.com/rss.php
|
||||||
|
- https://www.zdnet.com/topic/security/rss.xml
|
||||||
|
|
||||||
# Optionally define an application to view the feeds
|
# Optionally define an application to view the feeds
|
||||||
#externalViewer: firefox
|
#externalViewer: firefox
|
||||||
|
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
// TestLoadConfiguration tests loading the example config
|
// TestLoadConfiguration tests loading the example config
|
||||||
func TestLoadConfiguration(t *testing.T) {
|
func TestLoadConfiguration(t *testing.T) {
|
||||||
exampleConfig, err := LoadConfiguration("../config-example.yaml")
|
exampleConfig, err := LoadConfiguration("../config-example.yml")
|
||||||
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ func keybindings(g *gocui.Gui) error {
|
|||||||
if err := g.SetKeybinding("Items", gocui.KeyEnter, gocui.ModNone, openItem); err != nil {
|
if err := g.SetKeybinding("Items", gocui.KeyEnter, gocui.ModNone, openItem); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := g.SetKeybinding("", gocui.KeyF5, gocui.ModNone, refreshFeeds); err != nil {
|
if err := g.SetKeybinding("", gocui.KeyCtrlR, gocui.ModNone, refreshFeeds); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@@ -76,7 +76,8 @@ func openItem(g *gocui.Gui, v *gocui.View) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func refreshFeeds(g *gocui.Gui, v *gocui.View) error {
|
func refreshFeeds(g *gocui.Gui, v *gocui.View) error {
|
||||||
Controller.Rss.Update(Controller.Config.Feeds)
|
g.Close()
|
||||||
|
Start()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
install.sh
Normal file
6
install.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
VERSION='0.1.1'; \
|
||||||
|
sudo curl --progress-bar \
|
||||||
|
-L "https://github.com/davegallant/srv/releases/download/v${VERSION}/srv_${VERSION}_$(uname -s)_x86_64.tar.gz" | \
|
||||||
|
sudo tar -C /usr/bin --overwrite -xvzf - srv
|
Reference in New Issue
Block a user