6 Commits

Author SHA1 Message Date
395cded975 Build for riscv64
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-08-05 12:54:44 -07:00
254b675f2c Fix invalid user agent error
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-06-28 21:53:00 -07:00
669788034f Run formatter
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-06-28 21:49:44 -07:00
ac7c626f56 Use select statement to prevent blocking on context status check
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-06-28 21:49:07 -07:00
1c623051ec Fix README links
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-22 19:34:31 +00:00
cec539f85b Add LURE badges to README
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-16 20:07:58 +00:00
7 changed files with 16 additions and 15 deletions

View File

@@ -14,6 +14,7 @@ builds:
- amd64 - amd64
- arm - arm
- arm64 - arm64
- riscv64
goarm: goarm:
- 7 - 7
- id: itctl - id: itctl

View File

@@ -6,6 +6,8 @@
[![status-badge](https://ci.elara.ws/api/badges/Elara6331/itd/status.svg)](https://ci.elara.ws/Elara6331/itd) [![status-badge](https://ci.elara.ws/api/badges/Elara6331/itd/status.svg)](https://ci.elara.ws/Elara6331/itd)
[![itd-git AUR package](https://img.shields.io/aur/version/itd-git?label=itd-git&logo=archlinux)](https://aur.archlinux.org/packages/itd-git/) [![itd-git AUR package](https://img.shields.io/aur/version/itd-git?label=itd-git&logo=archlinux)](https://aur.archlinux.org/packages/itd-git/)
[![itd-bin AUR package](https://img.shields.io/aur/version/itd-bin?label=itd-bin&logo=archlinux)](https://aur.archlinux.org/packages/itd-bin/) [![itd-bin AUR package](https://img.shields.io/aur/version/itd-bin?label=itd-bin&logo=archlinux)](https://aur.archlinux.org/packages/itd-bin/)
[![LURE badge for itd-git package](https://api.lure.elara.ws/badge/default/itd-git)](https://lure.elara.ws/pkg/default/itd-git)
[![LURE badge for itd-bin package](https://api.lure.elara.ws/badge/default/itd-bin)](https://lure.elara.ws/pkg/default/itd-bin)
--- ---
@@ -36,19 +38,19 @@ Use the `itd-bin` or `itd-git` AUR packages.
#### Debian/Ubuntu #### Debian/Ubuntu
- Go to the [latest release](https://gitea.arsenm.dev/Arsen6331/itd/releases/latest) and download the `.deb` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal. - Go to the [latest release](https://gitea.elara.ws/Elara6331/itd/releases/latest) and download the `.deb` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal.
- Run `sudo apt install <package>`, replacing `<package>` with the path to the downloaded file. Note: relative paths must begin with `./`. - Run `sudo apt install <package>`, replacing `<package>` with the path to the downloaded file. Note: relative paths must begin with `./`.
- Example: `sudo apt install ~/Downloads/itd-0.0.7-linux-aarch64.deb` - Example: `sudo apt install ~/Downloads/itd-0.0.7-linux-aarch64.deb`
#### Fedora #### Fedora
- Go to the [latest release](https://gitea.arsenm.dev/Arsen6331/itd/releases/latest) and download the `.rpm` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal. - Go to the [latest release](https://gitea.elara.ws/Elara6331/itd/releases/latest) and download the `.rpm` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal.
- Run `sudo dnf install <package>`, replacing `<package>` with the path to the downloaded file. - Run `sudo dnf install <package>`, replacing `<package>` with the path to the downloaded file.
- Example: `sudo dnf install ~/Downloads/itd-0.0.7-linux-aarch64.rpm` - Example: `sudo dnf install ~/Downloads/itd-0.0.7-linux-aarch64.rpm`
#### Alpine (and postmarketOS) #### Alpine (and postmarketOS)
- Go to the [latest release](https://gitea.arsenm.dev/Arsen6331/itd/releases/latest) and download the `.apk` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal. - Go to the [latest release](https://gitea.elara.ws/Elara6331/itd/releases/latest) and download the `.apk` package for your CPU architecture. You can find your architecture by running `uname -m` in the terminal.
- Run `sudo apk add --allow-untrusted <package>`, replacing `<package>` with the path to the downloaded file. - Run `sudo apk add --allow-untrusted <package>`, replacing `<package>` with the path to the downloaded file.
- Example: `sudo apk add --allow-untrusted ~/Downloads/itd-0.0.7-linux-aarch64.apk` - Example: `sudo apk add --allow-untrusted ~/Downloads/itd-0.0.7-linux-aarch64.apk`
@@ -91,11 +93,11 @@ In `cmd/itgui`, there is a gui frontend to the socket of `itd`. It uses the [Fyn
#### Easy Installation #### 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`. The easiest way to install `itgui` is to use my other project, [LURE](https://gitea.elara.ws/Elara6331/lure). LURE will only work if your package manager is `apt`, `dnf`, `yum`, `zypper`, `pacman`, or `apk`.
Instructions: Instructions:
1. Install LURE. This can be done with the following command: `curl https://www.arsenm.dev/lure.sh | bash`. 1. Install LURE. This can be done with the following command: `curl https://www.elara.ws/lure.sh | bash`.
2. Check to make sure LURE is properly installed by running `lure ref`. 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. 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. 4. Once the process is complete, you should be able to open and use `itgui` like any other app.

View File

@@ -27,7 +27,6 @@ import (
"os/signal" "os/signal"
"strconv" "strconv"
"sync" "sync"
"syscall" "syscall"
"time" "time"

View File

@@ -4,7 +4,6 @@ import (
"context" "context"
"database/sql" "database/sql"
"path/filepath" "path/filepath"
"time" "time"
"go.elara.ws/infinitime" "go.elara.ws/infinitime"

View File

@@ -21,7 +21,6 @@ package main
import ( import (
"context" "context"
"go.elara.ws/infinitime" "go.elara.ws/infinitime"
"go.elara.ws/itd/mpris" "go.elara.ws/itd/mpris"
"go.elara.ws/itd/translit" "go.elara.ws/itd/translit"

View File

@@ -25,7 +25,6 @@ import (
"net" "net"
"os" "os"
"path/filepath" "path/filepath"
"time" "time"
"go.elara.ws/drpc/muxserver" "go.elara.ws/drpc/muxserver"

View File

@@ -9,7 +9,6 @@ import (
"net/url" "net/url"
"strconv" "strconv"
"strings" "strings"
"time" "time"
"go.elara.ws/infinitime" "go.elara.ws/infinitime"
@@ -86,9 +85,12 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
go func() { go func() {
defer wg.Done("weather") defer wg.Done("weather")
for { for {
_, ok := <-ctx.Done() select {
if !ok { case _, ok := <-ctx.Done():
return if !ok {
return
}
default:
} }
// Attempt to get weather // Attempt to get weather
@@ -257,7 +259,7 @@ func getWeather(ctx context.Context, lat, lon float64) (*METResponse, error) {
} }
// Set identifying user agent as per NMI requirements // Set identifying user agent as per NMI requirements
req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", version)) req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", strings.TrimSpace(version)))
// Perform request // Perform request
res, err := http.DefaultClient.Do(req) res, err := http.DefaultClient.Do(req)