-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build and installation instructions to readme and update dependen…
…cies
- Loading branch information
1 parent
7c71178
commit 2e5dcd3
Showing
3 changed files
with
74 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
github.com/BurntSushi/toml v1.3.0 h1:Ws8e5YmnrGEHzZEzg0YvK/7COGYtTC5PbaH9oSSbgfA= | ||
github.com/BurntSushi/toml v1.3.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= | ||
github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= | ||
github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= | ||
github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU= | ||
github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= | ||
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= | ||
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= | ||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= | ||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= | ||
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= | ||
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= | ||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= | ||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= | ||
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= | ||
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= | ||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= | ||
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= | ||
github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg= | ||
github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= | ||
golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w= | ||
golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= | ||
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= | ||
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= | ||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= | ||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | ||
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= | ||
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||
golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= | ||
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,12 @@ A command-line Fediverse client that doesn’t require a server. | |
|
||
# Installation | ||
|
||
Run `uname -ms` and, based on the output, download the latest corresponding [release](https://github.com/BentonEdmondson/servitor/releases). | ||
1. Run `uname -ms` and, based on the output, download the latest corresponding [release](https://github.com/BentonEdmondson/servitor/releases). | ||
1. `cd` into the directory that servitor is in (e.g. `cd ~/Downloads`). | ||
1. Run `mv servitor-version-arch-os servitor` to rename the binary to `servitor`. | ||
1. Run `chmod +x servitor` to make it executable. | ||
1. Run `./servitor open @[email protected]`, for example, to try it out. | ||
1. Run `mv servitor ~/.local/bin` to allow it to be run from anywhere (might not work on some distributions). | ||
|
||
I only test `Linux x86_64` releases. | ||
|
||
|
@@ -68,10 +73,10 @@ cache_size = 128 # the number of JSON responses the cache can hold | |
|
||
There are various ways to open files on Linux (`xdg-open`, `mailcap`, [`handlr`](https://github.com/chmln/handlr), bespoke scripts, etc). The `media.hook` config option allows you to configure whichever one you use. The value is a list of strings that will be executed as a command. Parameters will be substituted as follows: | ||
|
||
* `%url` — substituted with the URL being opened | ||
* `%mimetype` — substituted with the media type being opened, e.g. `image/png` | ||
* `%supertype` — substituted with the first part of the media type, e.g. `image` | ||
* `%subtype` — substituted with the subtype, e.g. `png` | ||
* `%url` — substituted with the URL being opened | ||
* `%mimetype` — substituted with the media type being opened, e.g. `image/png` | ||
* `%supertype` — substituted with the first part of the media type, e.g. `image` | ||
* `%subtype` — substituted with the subtype, e.g. `png` | ||
|
||
Here is a simple example config that opens videos and gifs in `mpv`, images in `feh`, and everything else in `firefox`: | ||
|
||
|
@@ -94,22 +99,48 @@ hook = [ | |
## Keybindings | ||
|
||
### Navigation | ||
`j` — move down\ | ||
`k` — move up\ | ||
space — select the highlighted item\ | ||
`c` — view the creator of the highlighted item\ | ||
`r` — view the recipient of the highlighted item (e.g. the group it was posted to)\ | ||
`a` — view the actor of the activity (e.g. view the retweeter of a retweet)\ | ||
`h` — move back in your browser history\ | ||
`l` — move forward in your browser history\ | ||
`g` — move to the expanded item (i.e. move to the current OP)\ | ||
`ctrl+c` — exit the program | ||
`j` — move down\ | ||
`k` — move up\ | ||
`space` — select the highlighted item\ | ||
`c` — view the creator of the highlighted item\ | ||
`r` — view the recipient of the highlighted item (e.g. the group it was posted to)\ | ||
`a` — view the actor of the activity (e.g. view the retweeter of a retweet)\ | ||
`h` — move back in your browser history\ | ||
`l` — move forward in your browser history\ | ||
`g` — move to the expanded item (i.e. move to the current OP)\ | ||
`ctrl+c` — exit the program | ||
|
||
### Media | ||
`p` — open the highlighted user's profile picture\ | ||
`b` — open the highlighted user's banner\ | ||
`o` — open the content of a post itself (e.g. open the video associated with a video post)\ | ||
number keys — open a link within the highlighted text | ||
`p` — open the highlighted user's profile picture\ | ||
`b` — open the highlighted user's banner\ | ||
`o` — open the content of a post itself (e.g. open the video associated with a video post)\ | ||
number keys — open a link within the highlighted text | ||
|
||
# Contributing | ||
|
||
## Building | ||
|
||
``` | ||
CGO_ENABLED=0 go build -ldflags "-X main.version=$(git rev-parse --short HEAD)" | ||
``` | ||
|
||
## Updating | ||
|
||
``` | ||
go get -u all && go mod tidy | ||
``` | ||
|
||
## Testing | ||
|
||
``` | ||
go test ./... | ||
``` | ||
|
||
## Formatting | ||
|
||
``` | ||
go fmt ./... | ||
``` | ||
|
||
# Where to Find Content to Follow | ||
|
||
|