From 3fd6ab5675959b9c80e57d30fc9dde5000b4ebf3 Mon Sep 17 00:00:00 2001 From: Hazel Noack Date: Tue, 15 Jul 2025 14:04:42 +0200 Subject: [PATCH] finished up caching of website icons --- README.md | 10 +++++++--- internal/rendering/config.go | 2 +- main.go | 6 ++---- tmp/build-errors.log | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8a202aa..143b87c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To configure this new tab page as website, you can install the firefox extension ## Config and Profiles -This tool works with profiles. The default profile is `startpage`. If you want to load another profile just write it as command line arg after the command. To write a config File you can create the files here: +This tool works with profiles. The default profile is `default`. If you want to load another profile just write it as command line arg after the command. To write a config File you can create the files here: - `{profile}.toml` - `.{profile}.toml` @@ -43,8 +43,12 @@ air dev ## TODO -- implement fetching website logos, to run at the start of the program and serve it from the temp directory +- implementing proper command line args + - clear cache +- use `os.UserConfigDir()` instead of the current library - implement fetching in intervals + - host this website on a demo page - implement ctl -- writing documentation - implement autocomplete with a nice go backend and fast communication. Since it all runs locally nobody should have privacy concerns NEEDS TO BE ABLE TO TOGGLED OFF FOR DEMO PAGE + +WRITE DOCUMENTATION diff --git a/internal/rendering/config.go b/internal/rendering/config.go index c4ae6d7..3192031 100644 --- a/internal/rendering/config.go +++ b/internal/rendering/config.go @@ -139,7 +139,7 @@ func (rc *Config) LoadConfigFile(file string) error { func (c *Config) Init() error { fmt.Print("downloading website icons") - for i, _ := range c.Template.Websites { + for i := range c.Template.Websites { fmt.Print(".") c.Template.Websites[i].Cache() } diff --git a/main.go b/main.go index 21638c7..96f3d47 100644 --- a/main.go +++ b/main.go @@ -61,13 +61,11 @@ func getFileSystem() http.FileSystem { } func main() { - fmt.Println("running transfem startpage") - - profile := "startpage" + profile := "default" if len(os.Args) > 1 { profile = os.Args[1] } - fmt.Println("loading profile " + profile + "...") + fmt.Println("loading profile " + profile) err := CurrentConfig.ScanForConfigFile(profile) if err != nil { diff --git a/tmp/build-errors.log b/tmp/build-errors.log index 8cdaa4e..d5790f6 100644 --- a/tmp/build-errors.log +++ b/tmp/build-errors.log @@ -1 +1 @@ -exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1 \ No newline at end of file +exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1 \ No newline at end of file