Compare commits
No commits in common. "main" and "v1.0.1" have entirely different histories.
8 changed files with 4 additions and 19 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1 @@
|
||||||
debug.log
|
debug.log
|
||||||
/bin
|
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,6 @@ Quick tool to write gemtext posts for my gemlog.
|
||||||
|
|
||||||
=> gemini://travisshears.com/gemlog
|
=> gemini://travisshears.com/gemlog
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Build and link. Remember to setup config file as well.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ go build -o bin/gemlog
|
|
||||||
$ ln -s /Users/xxxxxxxx/_projects/gemlog-cli/bin/gemlog-cli ~/bin/gemlog
|
|
||||||
```
|
|
||||||
|
|
||||||
## Config setup
|
## Config setup
|
||||||
|
|
||||||
This app relys on a config file at `~/.config/gemlog-cli/config.yml`
|
This app relys on a config file at `~/.config/gemlog-cli/config.yml`
|
||||||
|
|
|
||||||
5
build.sh
5
build.sh
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
go build -o ./bin/gemlog-cli
|
|
||||||
|
|
@ -17,7 +17,7 @@ func genBasicAuthHeader(user, password string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ListGemLogs(config *Config) ([]GemlogListEntry, error) {
|
func ListGemLogs(config *Config) ([]GemlogListEntry, error) {
|
||||||
url := fmt.Sprintf("%s:%d/gemlog/_design/gemlog-cli/_view/list?descending=true", config.CouchDB.Host, config.CouchDB.Port)
|
url := fmt.Sprintf("%s:%d/gemlog/_design/gemlog-cli/_view/list", config.CouchDB.Host, config.CouchDB.Port)
|
||||||
req, err := http.NewRequest("GET", url, nil)
|
req, err := http.NewRequest("GET", url, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to create request: %w", err)
|
return nil, fmt.Errorf("failed to create request: %w", err)
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ func (m model) View() string {
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
var enableLogs bool = false
|
var enableLogs bool = true
|
||||||
|
|
||||||
func Run(config *gemlog.Config) {
|
func Run(config *gemlog.Config) {
|
||||||
if enableLogs {
|
if enableLogs {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ func (m EntryListPageModel) Update(msg tea.Msg, active bool, ctx *context) (Entr
|
||||||
m.cursor--
|
m.cursor--
|
||||||
}
|
}
|
||||||
case "down", "j":
|
case "down", "j":
|
||||||
if m.cursor < len(m.entries)-1 {
|
if m.cursor < len(actions)-1 {
|
||||||
m.cursor++
|
m.cursor++
|
||||||
}
|
}
|
||||||
case "left", "h":
|
case "left", "h":
|
||||||
|
|
|
||||||
2
main.go
2
main.go
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
config "git.travisshears.com/travisshears/gemlog-cli/internal/config"
|
|
||||||
ui "git.travisshears.com/travisshears/gemlog-cli/internal/ui"
|
ui "git.travisshears.com/travisshears/gemlog-cli/internal/ui"
|
||||||
|
config "git.travisshears.com/travisshears/gemlog-cli/internal/ui/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue