diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-22 15:14:08 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-22 15:14:08 +0300 |
| commit | aeb772bccd3d29ed5e9d93229af1ea7d158e00d5 (patch) | |
| tree | d45c0c31a73bd62fe97c663011caae5e1cdb2cf6 | |
| parent | a9c82dc7ec525358c3ff417f32f116f760b92a65 (diff) | |
Reorganize assets and bump version to 0.7.3v0.7.3
- Move totalrecall.desktop, install-icon.sh, and config.yaml.example to assets/ directory
- Update all references in README.md and install-icon.sh
- Add file organization guidelines to AGENTS.md
- Clean up root directory structure
π€ Generated with [opencode](https://opencode.ai)
Co-Authored-By: opencode <noreply@opencode.ai>
| -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" |
