MountainProject icon indicating copy to clipboard operation
MountainProject copied to clipboard

[BOT] Add protection?

Open derekantrican opened this issue 6 years ago • 1 comments
trafficstars

/u/ClimbingRouteBot comments with the "Protection" section. Maybe we can do this also? I don't want it to take up too much space. Maybe we can just parse the important stuff like "# bolts", etc

derekantrican avatar Jul 19 '19 01:07 derekantrican

Here's a start on regular expressions for protection: https://regex101.com/r/DqGZTg/1 (note that trad stuff is still untouched). Also note that before this we should call Utilities.EnforceWordConsistency so that number words (eg "one") become numbers (eg "1").

We should probably also choose whether or not to return specific protection types based on the type of the problem (because, for instance, this route is a top rope route but has the word "bolts" in the protection section

  • Boulder: return "pads" and "spotter" protection info
  • Sport: return "bolts" and "perma draw" protection info
  • Trad: return "rack" protection info (and all the same stuff as "Sport"?)
  • Top Rope: don't return protection info

derekantrican avatar Oct 28 '19 04:10 derekantrican