Compare commits
No commits in common. "3396109e00819016358f508bef2b68485220375d" and "808ce89dfcc59198f5c3b9c8fb7f7b446a797029" have entirely different histories.
3396109e00
...
808ce89dfc
@ -118,7 +118,7 @@ func (rc *Config) ScanForConfigFile(profile string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return errors.New("no config file found")
|
||||
return errors.New("No config file found")
|
||||
}
|
||||
|
||||
func (rc *Config) LoadConfigFile(file string) error {
|
||||
@ -138,12 +138,10 @@ func (rc *Config) LoadConfigFile(file string) error {
|
||||
}
|
||||
|
||||
func (c *Config) Init() error {
|
||||
fmt.Print("downloading website icons")
|
||||
for i, _ := range c.Template.Websites {
|
||||
fmt.Print(".")
|
||||
for i, w := range c.Template.Websites {
|
||||
c.Template.Websites[i].Cache()
|
||||
fmt.Println(w.ImageUrl)
|
||||
}
|
||||
fmt.Print("\n")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package rendering
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@ -48,7 +49,8 @@ func (w *Website) Cache() error {
|
||||
return err
|
||||
}
|
||||
|
||||
filename := hashUrl(w.ImageUrl) + filepath.Ext(w.ImageUrl)
|
||||
filename := hashUrl(w.ImageUrl)
|
||||
fmt.Println(w.ImageUrl + " => " + filename)
|
||||
targetPath := filepath.Join(cacheDir, filename)
|
||||
resp, err := http.Get(w.ImageUrl)
|
||||
if err != nil {
|
||||
|
@ -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
|
||||
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 1
|
Loading…
x
Reference in New Issue
Block a user