Skip to content

Commit

Permalink
Header yaml struct (#18)
Browse files Browse the repository at this point in the history
* create master templates for gnuplot elevation profiles

* add migration proceedure for stripping elevation.plt

* serialize header yaml struct
  • Loading branch information
nce authored Oct 8, 2024
1 parent 2ac96e1 commit 1ec646d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions pkg/activity/header.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package activity

type Header struct {
Meta HeaderMeta `yaml:"meta"`
Activity HeaderActivity `yaml:"activity"`
Layout Layout `yaml:"layout"`
Stats Stats `yaml:"stats"`
}

type HeaderMeta struct {
Version string `yaml:"version,omitempty"`
}

type HeaderActivity struct {
Wandern bool `yaml:"wandern,omitempty"`
Type string `yaml:"type"`
Date string `yaml:"date"`
Title string `yaml:"title"`
PointOfOrigin PointOfOrigin `yaml:"pointOfOrigin"`
Season string `yaml:"season"`
Rating string `yaml:"rating"`
Company string `yaml:"company"`
Restaurant string `yaml:"restaurant"`
MaxElevation string `yaml:"maxElevation"`
}

type PointOfOrigin struct {
Name string `yaml:"name"`
Qr string `yaml:"qr"`
Region string `yaml:"region"`
}

type Stats struct {
Ascent string `yaml:"ascent"`
Distance string `yaml:"distance"`
MovingTime string `yaml:"movingTime"`
OverallTime string `yaml:"overallTime"`
StartTime string `yaml:"startTime"`
SummitTime string `yaml:"summitTime"`
Puls string `yaml:"puls,omitempty"`
}

type Layout struct {
HeadElevationProfile bool `yaml:"headElevationProfile"`
ElevationProfileType string `yaml:"elevationProfileType,omitempty"`
ElevationProfileRightMargin float32 `yaml:"elevationProfileRightMargin"`
TableSize float32 `yaml:"tableSize"`
MapSize float32 `yaml:"mapSize"`
MapHeight int `yaml:"mapHeight"`
Linespread float32 `yaml:"linespread"`
}

0 comments on commit 1ec646d

Please sign in to comment.