summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-19 23:53:49 +0300
committerPaul Buetow <paul@buetow.org>2025-07-19 23:53:49 +0300
commitc8a22dc45bb880a0fbf0ac4f0ecd9fe13f8a215d (patch)
tree5e2296145588483e8d57ebd3a911793d209e6081
parent6038d6e29d4878cccb46bf35bb9885ec7d376422 (diff)
more on this
-rw-r--r--FyneApp.toml7
-rw-r--r--README.md10
-rw-r--r--cmd/totalrecall/main.go12
-rw-r--r--totalrecall.desktop4
-rw-r--r--words.txt18
5 files changed, 31 insertions, 20 deletions
diff --git a/FyneApp.toml b/FyneApp.toml
new file mode 100644
index 0000000..f72daf1
--- /dev/null
+++ b/FyneApp.toml
@@ -0,0 +1,7 @@
+[Details]
+Icon = "assets/icons/totalrecall_256.png"
+Name = "TotalRecall"
+ID = "org.codeberg.snonux.totalrecall"
+
+[Development]
+HelperText = "Bulgarian Flashcard Generator" \ No newline at end of file
diff --git a/README.md b/README.md
index 1fd7701..5979205 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,12 @@ After installation, you may need to log out and log back in for the icon to appe
export OPENAI_API_KEY="sk-..."
```
+### GUI Mode (Default)
+When launched without arguments, totalrecall opens an interactive graphical interface:
+```bash
+totalrecall
+```
+
### CLI Mode
1. Generate materials for a single word (uses OpenAI by default):
```bash
@@ -127,6 +133,8 @@ export OPENAI_API_KEY="sk-..."
### GUI Mode
Launch the interactive graphical interface:
```bash
+totalrecall # GUI mode is now the default
+# or explicitly:
totalrecall --gui
```
@@ -179,7 +187,7 @@ totalrecall [word] [flags]
### GUI Mode
```bash
-totalrecall --gui
+totalrecall # Default mode when no arguments provided
```
### Batch file format
diff --git a/cmd/totalrecall/main.go b/cmd/totalrecall/main.go
index ab06987..1a65bf4 100644
--- a/cmd/totalrecall/main.go
+++ b/cmd/totalrecall/main.go
@@ -59,9 +59,11 @@ var rootCmd = &cobra.Command{
It creates audio pronunciation files using OpenAI TTS and downloads
representative images from web search APIs.
-Example:
- totalrecall ябълка # Generate materials for "apple"
- totalrecall --batch words.txt # Process multiple words from file`,
+Examples:
+ totalrecall # Launch interactive GUI (default)
+ totalrecall ябълка # Generate materials for "apple" via CLI
+ totalrecall --batch words.txt # Process multiple words from file
+ totalrecall --gui # Explicitly launch GUI mode`,
Args: cobra.MaximumNArgs(1),
RunE: runCommand,
Version: internal.Version,
@@ -215,8 +217,8 @@ func runCommand(cmd *cobra.Command, args []string) error {
// Single word from command line
entries = []wordEntry{{bulgarian: args[0], translation: ""}}
} else {
- // No input provided
- return fmt.Errorf("please provide a Bulgarian word or use --batch flag")
+ // No input provided - launch GUI mode by default
+ return runGUIMode()
}
// Validate words
diff --git a/totalrecall.desktop b/totalrecall.desktop
index a913b31..dfd1edf 100644
--- a/totalrecall.desktop
+++ b/totalrecall.desktop
@@ -4,10 +4,10 @@ Type=Application
Name=TotalRecall
GenericName=Bulgarian Flashcard Generator
Comment=Generate Anki flashcard materials from Bulgarian words
-Exec=totalrecall --gui
+Exec=totalrecall
Icon=totalrecall
Terminal=false
Categories=Education;Languages;
Keywords=bulgarian;flashcards;anki;language;learning;
StartupNotify=true
-StartupWMClass=Totalrecall \ No newline at end of file
+StartupWMClass=totalrecall
diff --git a/words.txt b/words.txt
index cc15dcd..e8a53b5 100644
--- a/words.txt
+++ b/words.txt
@@ -1,12 +1,6 @@
-Горе
-Филм
-Преводач
-Следващ
-Работа
-Готвя
-Светът
-Продължавам
-Правя
-Шеф
-Готвач
-Лекар
+Прабаба, прадядо = ancestor
+Тъща = mother-in-law from the woman’s side
+Свекърва = mother-in-law from husband’s side
+Кум, кума = best man/woman
+Кръстник, кръстница = godfather, godmother
+Кръщелник, кръщелница = the ones who is baptised