diff --git a/img.go b/img.go index aafb83c..66f9891 100644 --- a/img.go +++ b/img.go @@ -51,8 +51,8 @@ func getBlack( rect(gc, 0, 0, 800, 480) drawTCL(gc, bus, 30) - drawTCL(gc, tram, 150) - drawVelov(gc, velovRoc, 290) + drawTCL(gc, tram, 180) + drawVelov(gc, velovRoc, 350) drawDateFete(gc, fetes, nowFunc()) return img, nil @@ -62,13 +62,12 @@ func drawVelov(gc *draw2dimg.GraphicContext, station *transports.Station, yOffse x := float64(600) text(gc, station.Name, 15, x, yOffset) text(gc, fmt.Sprintf("V : %v - P : %v", station.BikesAvailable, station.DocksAvailable), 15, x, yOffset+30) - //text(gc, fmt.Sprintf("P : %v", station.DocksAvailable), 15, x, yOffset+60) } func drawDateFete(gc *draw2dimg.GraphicContext, fetes *fete.Fete, now time.Time) { text(gc, now.Format("15:04"), 40, 20, 190) text(gc, getDate(now), 50, 20, 255) - text(gc, fetes.Name, 18, 20, 290) + text(gc, fmt.Sprintf("On fĂȘte les %s", fetes.Name), 17, 20, 400) } func drawTCL(gc *draw2dimg.GraphicContext, passages *transports.Passages, yoffset float64) { diff --git a/run_darwin_arm64.go b/run_darwin_arm64.go index 475d18a..ce0fb5a 100644 --- a/run_darwin_arm64.go +++ b/run_darwin_arm64.go @@ -20,7 +20,9 @@ func run(ctx context.Context, transportsClient *transports.Client, feteClient *f if err != nil { log.Fatal(err) } - draw2dimg.SaveToPngFile("out/black.png", img) + if err := draw2dimg.SaveToPngFile("out/black.png", img); err != nil { + log.Fatalf("error saving image: %v", err) + } log.Println("done")