Implement opal-task Phase 1: Database foundation
- Add SQLite database with schema for tasks, tags, and working_set - Implement config management with Viper (opal.yml) - Create Task struct with proper types (*time.Time, Priority int) - Add database migration system - Implement recurrence pattern parsing (1d, 1w, 1m, 1y) - Setup project structure with cmd/ and internal/engine/ - Add dependencies: sqlite3, uuid, cobra, viper, color
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.jnss.me/joakim/opal/internal/engine"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Initialize database
|
||||
if err := engine.InitDB(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error initializing database: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer engine.CloseDB()
|
||||
|
||||
// Load config
|
||||
if _, err := engine.LoadConfig(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error loading config: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
fmt.Println("Opal task manager initialized successfully!")
|
||||
fmt.Println("Database and configuration ready.")
|
||||
}
|
||||
Reference in New Issue
Block a user