diff options
| -rw-r--r-- | AGENTS.md | 16 | ||||
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | assets/config.yaml.example (renamed from config.yaml.example) | 0 | ||||
| -rwxr-xr-x | assets/install-icon.sh (renamed from install-icon.sh) | 2 | ||||
| -rw-r--r-- | assets/totalrecall.desktop (renamed from totalrecall.desktop) | 0 | ||||
| -rw-r--r-- | internal/gui/app.go | 9 | ||||
| -rw-r--r-- | internal/version.go | 2 |
7 files changed, 31 insertions, 8 deletions
@@ -58,13 +58,18 @@ golangci-lint run ### Package Structure ``` totalrecall/ -├── cmd/totalrecall/ # CLI entry point +├── cmd/totalrecall/ # CLI entry point ├── internal/ # Private packages │ ├── audio/ # Audio generation (OpenAI TTS) │ ├── image/ # Image generation functionality │ ├── anki/ # Anki format generation │ ├── config/ # Configuration management │ └── version.go # Version information +├── assets/ # Static assets and configuration +│ ├── icons/ # Application icons +│ ├── config.yaml.example # Example configuration +│ ├── totalrecall.desktop # Desktop entry file +│ └── install-icon.sh # Icon installation script ``` ### Key Design Decisions @@ -102,3 +107,12 @@ package main // NOT package bulg - Input should be in Cyrillic script - Common test words: ябълка (apple), котка (cat), куче (dog) - OpenAI voices: nova, alloy, echo, shimmer (work well for Bulgarian) + +## Code Guidelines +- Whenever updating code, also update the comments in the code to reflect the reality and the reasoning. +- When a function reaches 50 lines of code or more, try to refactor it into several functions of about 30 lines each. In case of a go project, when main.go becomes too large, move code into the ./internal package. + +## File Organization +- Configuration examples, desktop files, and installation scripts should be placed in the `assets/` directory +- Icons and images go in `assets/icons/` +- Keep the root directory clean by moving non-essential files to appropriate subdirectories @@ -76,13 +76,13 @@ TotalRecall includes a desktop icon for GNOME integration. To install: **For current user only:** ```bash cd totalrecall -./install-icon.sh +./assets/install-icon.sh ``` **System-wide installation:** ```bash cd totalrecall -sudo ./install-icon.sh +sudo ./assets/install-icon.sh ``` After installation, you may need to log out and log back in for the icon to appear in GNOME's application menu. The icon will show up as "TotalRecall" in the Education category. @@ -193,7 +193,11 @@ When translations are provided, they are used directly without calling the trans ## Configuration -Create an optional `~/config/totalrecall/config.yaml` file. You can copy the example file provided. +Create an optional `~/config/totalrecall/config.yaml` file. You can copy the example file provided: + +```bash +cp assets/config.yaml.example ~/.config/totalrecall/config.yaml +``` ## Output Files diff --git a/config.yaml.example b/assets/config.yaml.example index 3988035..3988035 100644 --- a/config.yaml.example +++ b/assets/config.yaml.example diff --git a/install-icon.sh b/assets/install-icon.sh index dd5c224..b012067 100755 --- a/install-icon.sh +++ b/assets/install-icon.sh @@ -51,7 +51,7 @@ else fi # Create desktop file with proper exec path -sed "s|Exec=totalrecall|Exec=$TOTALRECALL_PATH|g" totalrecall.desktop > "$APP_DIR/totalrecall.desktop" +sed "s|Exec=totalrecall|Exec=$TOTALRECALL_PATH|g" assets/totalrecall.desktop > "$APP_DIR/totalrecall.desktop" # Update caches if command -v gtk-update-icon-cache &> /dev/null; then diff --git a/totalrecall.desktop b/assets/totalrecall.desktop index dfd1edf..dfd1edf 100644 --- a/totalrecall.desktop +++ b/assets/totalrecall.desktop diff --git a/internal/gui/app.go b/internal/gui/app.go index aa4fb74..cb1ed2d 100644 --- a/internal/gui/app.go +++ b/internal/gui/app.go @@ -185,7 +185,7 @@ func New(config *Config) *Application { // setupUI creates the main user interface func (a *Application) setupUI() { - a.window = a.app.NewWindow(fmt.Sprintf("TotalRecall v%s - Bulgarian Flashcard Generator", internal.Version)) + a.window = a.app.NewWindow("TotalRecall") a.window.SetIcon(GetAppIcon()) a.window.Resize(fyne.NewSize(880, 770)) @@ -372,8 +372,13 @@ func (a *Application) setupUI() { a.queueStatusLabel = widget.NewLabel("Queue: Empty") a.queueStatusLabel.TextStyle = fyne.TextStyle{Italic: true} + // Create version label + versionLabel := widget.NewLabel(fmt.Sprintf("v%s", internal.Version)) + versionLabel.TextStyle = fyne.TextStyle{Italic: true} + versionLabel.Alignment = fyne.TextAlignTrailing + statusSection := container.NewBorder( - nil, nil, nil, nil, + nil, nil, nil, versionLabel, container.NewVBox( a.statusLabel, widget.NewSeparator(), diff --git a/internal/version.go b/internal/version.go index a448a34..f4c9657 100644 --- a/internal/version.go +++ b/internal/version.go @@ -1,3 +1,3 @@ package internal -const Version = "0.7.2" +const Version = "0.7.3" |
