No description
| bruno/Gemlog | ||
| gemlog | ||
| internal | ||
| .gitignore | ||
| build.sh | ||
| dev.sh | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| README.md | ||
Gemlog CLI Tool
Quick tool to write gemtext posts for my gemlog.
=> gemini://travisshears.com/gemlog
Install
Build and link. Remember to setup config file as well.
$ go build -o bin/gemlog
$ ln -s /Users/xxxxxxxx/_projects/gemlog-cli/bin/gemlog-cli ~/bin/gemlog
Config setup
This app relys on a config file at ~/.config/gemlog-cli/config.yml
With the following format:
couchdb:
host: http://myhost
port: 1234
user: gemlog-cli
password: xxxxxxxxxxxxxxxxxxxxxxxxxxx
Dev
To run command locally:
$ go run .
Entites
Gemlog
- id, uuid
- title
- slug
- date
- gemtxt
- short? gemtxt < 250 char
Arch
For DB planning to use couch db
Use-cases
Create gemlog entry
Open editor with pre-filled template with frontmatter. Set example date (now), title, slug
Delete gemlog entry
Select from list then delete.
Edit gemlog entry
Select from list then edit.
Creating db
This project is backed by a nosql database, couchdb.
docs on couchbase permissions and users
Here is how to create the db and give user gemlog-cli access:
$ curl -X PUT http://admin:xxxxxxxxxxxxxxxxxxxxxxxxxxx@eisenhorn:5023/gemlog
$ curl -X PUT http://admin:xxxxxxxxxxxxxxxxxxxxxxxxxxx@eisenhorn:5023/gemlog/_security \
-H "Content-Type: application/json" \
-d '{"admins": { "names": [], "roles": [] }, "members": { "names": ["gemlog-cli"], "roles": [] } }'