From d7bd94e1643d3db31b322c3780c9570ff8c1e1e8 Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Mon, 2 Jan 2023 22:42:12 -0800 Subject: [PATCH] Restructure and revise README --- README.md | 72 ++++++++++++++++--------------------------------------- 1 file changed, 21 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 5a896f4..03890cf 100644 --- a/README.md +++ b/README.md @@ -55,57 +55,6 @@ Note: `--allow-untrusted` is required because ITD isn't part of a repository, an --- -### Socket - -This daemon creates a UNIX socket at `/tmp/itd/socket`. It allows you to directly control the daemon and, by extension, the connected watch. - -The socket uses my [lrpc](https://gitea.arsenm.dev/Arsen6331/lrpc) library for requests. This library accepts requests in msgpack, with the following format: - -```json -{"Receiver": "ITD", "Method": "Notify", "Arg": {"title": "title1", "body": "body1"}, "ID": "some-id-here"} -``` - -It will return a msgpack response, the format of which can be found [here](https://gitea.arsenm.dev/Arsen6331/lrpc/src/branch/master/internal/types/types.go#L30). The response will have the same ID as was sent in the request in order to allow the client to keep track of which request the response belongs to. - ---- - -### Transliteration - -Since the PineTime does not have enough space to store all unicode glyphs, it only stores the ASCII space and Cyrillic. Therefore, this daemon can transliterate unsupported characters into supported ones. Since some languages have different transliterations, the transliterators to be used must be specified in the config. Here are the available transliterators: - -- eASCII -- Scandinavian -- German -- Hebrew -- Greek -- Russian -- Ukranian -- Arabic -- Farsi -- Polish -- Lithuanian -- Estonian -- Icelandic -- Czech -- French -- Armenian -- Korean -- Chinese -- Romanian -- Emoji - -Place the desired map names in an array as `notifs.translit.use`. They will be evaluated in order. You can also put custom transliterations in `notifs.translit.custom`. These take priority over any other maps. The `notifs.translit` config section should look like this: - -```toml -[notifs.translit] - use = ["eASCII", "Russian", "Emoji"] - custom = [ - "test", "replaced" - ] -``` - ---- - ### `itctl` This daemon comes with a binary called `itctl` which uses the socket to control the daemon from the command line. As such, it can be scripted using bash. @@ -139,6 +88,17 @@ GLOBAL OPTIONS: In `cmd/itgui`, there is a gui frontend to the socket of `itd`. It uses the [Fyne library](https://fyne.io/) for Go. +#### Easy Installation + +The easiest way to install `itgui` is to use my other project, [LURE](https://gitea.arsenm.dev/Arsen6331/lure). LURE will only work if your package manager is `apt`, `dnf`, `yum`, `zypper`, `pacman`, or `apk`. + +Instructions: + +1. Install LURE. This can be done with the following command: `curl https://www.arsenm.dev/lure.sh | bash`. +2. Check to make sure LURE is properly installed by running `lure ref`. +3. Run `lure in itgui`. This process may take a while as it will compile `itgui` from source and package it for your distro. +4. Once the process is complete, you should be able to open and use `itgui` like any other app. + #### Compilation Before compiling, certain prerequisites must be installed. These are listed on the following page: https://developer.fyne.io/started/#prerequisites @@ -188,6 +148,16 @@ make && sudo make install --- +### Socket + +This daemon creates a UNIX socket at `/tmp/itd/socket`. It allows you to directly control the daemon and, by extension, the connected watch. + +The socket uses tge [DRPC](https://github.com/storj/drpc) library for requests. The code generated by this framework is located in [`internal/rpc`](/internal/rpc) + +The API description is located in the [`internal/rpc/itd.proto`](/internal/rpc/itd.proto) file. + +--- + ### Starting To start the daemon, run the following **without root**: