summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-22 15:14:08 +0300
committerPaul Buetow <paul@buetow.org>2025-07-22 15:14:08 +0300
commitaeb772bccd3d29ed5e9d93229af1ea7d158e00d5 (patch)
treed45c0c31a73bd62fe97c663011caae5e1cdb2cf6
parenta9c82dc7ec525358c3ff417f32f116f760b92a65 (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.md16
-rw-r--r--README.md10
-rw-r--r--assets/config.yaml.example (renamed from config.yaml.example)0
-rwxr-xr-xassets/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.go9
-rw-r--r--internal/version.go2
7 files changed, 31 insertions, 8 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 6ed9514..13d65cf 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -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
diff --git a/README.md b/README.md
index 4c57640..6060f17 100644
--- a/README.md
+++ b/README.md
@@ -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"