Parses graphs and other data from camelcamelcamel.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

25 lines
444 B

3 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "time"
  5. )
  6. func main() {
  7. maxPrice, minPrice := 59.99, 9.99
  8. startDate, endDate := time.Date(2015, 10, 29, 0, 0, 0, 0, time.Local), time.Date(2019, 05, 15, 0, 0, 0, 0, time.Local)
  9. img, err := loadPNG("graph.png")
  10. if err != nil {
  11. panic(err)
  12. }
  13. parsed, err := ParseGraph(img, maxPrice, minPrice, startDate, endDate)
  14. if err != nil {
  15. panic(err)
  16. }
  17. for _, p := range parsed {
  18. fmt.Println(p.String())
  19. }
  20. }