Add weather string

This commit is contained in:
Archie Fox
2025-07-18 21:05:29 +03:00
parent 03f8c05905
commit 6ec9f6dbc0
2 changed files with 86 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"fmt"
"goclock/dict"
"goclock/weather"
"log"
"os/exec"
"time"
@@ -18,8 +19,9 @@ func main() {
minute := now.Minute()
timeStr := dict.WeekdayRussian(weekday) + " " + dict.DayRussian(day) + " " + dict.MonthRussian(month) + " " + dict.HourRussian(hour) + " " + dict.MinuteRussian(minute)
strWeather := weather.CompilationWeatherString("KUM")
command := exec.Command("sh", "-c", fmt.Sprintf("echo '%s' | RHVoice-test -p Anna", timeStr))
command := exec.Command("sh", "-c", fmt.Sprintf("echo '%s' | RHVoice-test -p Anna", timeStr+" "+strWeather))
err := command.Run()
if err != nil {