Pull Request Builder
make it easier to contribute new tracks
The existing google form will accept measurements for a new track. The entry gets saved in a google sheet. There are some calculations which get run in an enriched worksheet in that google sheet.
Generate a new page for the track using the hugo
cli. I then move the values from the spreadsheet to front matter yaml in the new page.
one time setup
for each new track
git checkout -b add-uc-berkeley
git commit -am 'add new track UC Berkeley'
git push -u origin add-uc-berkeley
inputs
required:
optional:
calculations
note: speed rating is pre-computed and saved in track front matter still because of a technical limitation. The inability to sort hugo pages in a list page using a computed field
output
---
title: "American River"
date: 2018-05-17T18:58:14-07:00
tags: ["juco"]
latitude: 38.6466618
longitude: -121.34779
elevation_meters: 24.69
distance_meters: 400.00
lap_lanes: 9
home_lanes: 10
surface_type: artificial
surface_color: red
turn_diameter_meters: 68.16
turn_radius_b_meters: 34.16
speed_rating: 14.13
steeple_water_location: inside
---
ARC Stadium. 4700 College Oak Dr, Sacramento, CA 95841
<!--more-->
options:
hugo
archetypesmake
feed raw input values into the command. run calculations. output the complete page.
this workflow still requires technical capability and tools in order to contribute a track. it is too complicated.
pure web workflow would be preferable.
one time setup
for each new track
next step is for me to package up the calculations and page generation code in a way somebody can drive on the web. receive the inputs via a web form. output is the complete yaml text of the new page.
more advanced could be to write a github.com integration which would drive the pull request creation when you submit the input form, rather than just dumping out the generated content. it would ask the user to authorize access to their github account to perform the necessary actions