Cthulhu is no longer a fork. Now it is a screen reader written in Golang.
This commit is contained in:
1 parent
a998fe67de
commit
069fc674dc
708 files changed
+112482
-532
No files matched your search
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2026 Storm Dragon
|
||||
// Authors: Storm Dragon, Angus Kola
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
package app
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.stormux.org/storm/cthulhu/internal/config"
|
||||
"git.stormux.org/storm/cthulhu/internal/datetime"
|
||||
"git.stormux.org/storm/cthulhu/internal/input"
|
||||
)
|
||||
|
||||
// The command worker supplies local wall time and one immutable settings snapshot.
|
||||
func presentDateTime(speech speechEnqueuer, settings config.Settings, command input.Command, now time.Time) {
|
||||
text, cause := "", "current-time"
|
||||
if command == input.PresentDate {
|
||||
cause = "current-date"
|
||||
text, _ = datetime.FormatDate(settings.DateFormat, now)
|
||||
} else {
|
||||
text, _ = datetime.FormatTime(settings.TimeFormat, now)
|
||||
}
|
||||
speech.Interrupt()
|
||||
speech.Enqueue(speechRequest{Text: text, Role: "system", Cause: cause})
|
||||
}
|
||||
Reference in new issue
Block a user