Compare commits
10 commits
bb501c28ec
...
afd0b2f3bc
Author | SHA1 | Date | |
---|---|---|---|
afd0b2f3bc | |||
ccef788283 | |||
2aedd6140f | |||
6513472e83 | |||
f72675d7ec | |||
f511e3b5dd | |||
72b4d43a74 | |||
f0067d1d3e | |||
e6416180fe | |||
33a4f28266 |
2 changed files with 21 additions and 7 deletions
27
README.md
27
README.md
|
@ -1,13 +1,26 @@
|
||||||
# hmhm - TUI news reading client
|
# hmhm 🦞
|
||||||
|
|
||||||
hmhm (pronounced humhum is what I called lobsters when I was a little kid) is a tool I created to get a feeling how one could develop a TUI (Terminal
|
List latest news items from Hacker News and Lobste.rs in the terminal. It
|
||||||
|
refreshes automatically every 5 minutes.
|
||||||
|
|
||||||
|
hmhm is a tool I developed to get a feeling how one could develop a TUI (Terminal
|
||||||
User Interface) based app in Go.
|
User Interface) based app in Go.
|
||||||
I tried a few TUI high level libraries but settled on [tview](https://github.com/rivo/tview).
|
I tried a few TUI high level libraries but settled on [termui](https://github.com/gizak/termui).
|
||||||
|
|
||||||
hmhm in action
|
## Simple usage
|
||||||
<img src="https://git.kcbark.net/kcbark/hmhm/raw/branch/master/assets/img/hmhm-loading.png" width="400" height="400" alt="Loading news items." align="center" />
|
* Up, down, k or j- to change focus up or down.
|
||||||
<img src="assets/img/hmhm-hn.png" width="100" height="100" alt="Tab #1 - Hacker News" align="center" />
|
* Left, Right, h or l - to switch tab.
|
||||||
<img src="assets/img/hmhm-l.png" width="100" height="100" alt="Tab #2 - Lobste.rs" align="center" />
|
* Enter - open up web browser with the URL for the focused news item.
|
||||||
|
* r - refresh content for the active tab.
|
||||||
|
* Escape or q - to quit
|
||||||
|
|
||||||
|
|
||||||
|
### Loading news items.
|
||||||
![Loading news items.](assets/img/hmhm-loading.png)
|
![Loading news items.](assets/img/hmhm-loading.png)
|
||||||
|
### Tab 1 - Hacker News
|
||||||
![Tab #1 - Hacker News](assets/img/hmhm-hn.png)
|
![Tab #1 - Hacker News](assets/img/hmhm-hn.png)
|
||||||
|
### Tab 2 - Lobste.rs
|
||||||
![Tab #2 - Lobste.rs](assets/img/hmhm-l.png)
|
![Tab #2 - Lobste.rs](assets/img/hmhm-l.png)
|
||||||
|
|
||||||
|
### Why the name hmhm?
|
||||||
|
hmhm (pronounced "humhum") is what I called lobsters when I was a little kid.
|
||||||
|
|
1
main.go
1
main.go
|
@ -423,6 +423,7 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Thanks https://gist.github.com/hyg/9c4afcd91fe24316cbf0
|
||||||
func openbrowser(url string) {
|
func openbrowser(url string) {
|
||||||
var err error
|
var err error
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
|
|
Loading…
Reference in a new issue