- Notifications
You must be signed in to change notification settings - Fork0
benhunter/climb_bot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
climb_bot posts links to rock climbing routes and areas onMountainProject.com. climb_bot is monitoring the subredditsr/climbing andr/test. climb_bot searches MountainProject for the closest match and links to it, so partial information can often still give a relevant reply.
If climb_bot can't find a match, it won't post a reply at all. Comments that have not been replied to by climb_bot can be edited and climb_bot will keep attempting to find a link. But once a climb_bot replies, it won't look at that comment again.
climb_bot looks for the command 'climb:' or '!climb' in comments. adding the keyword 'area' searches for areas on MountainProject. Examples:
- Climb: The Nose, Yosemite
- climb: The Nose, Yosemite
- !Climb The Nose, Yosemite
- !climb The Nose, Yosemite
- climb: area Yosemite Valley
- !climb area Yosemite Valley
climb_bot is written inPython 3 and hosted onPythonAnywhere. It requires thePRAWandBeautifulSoup4, and uses aSQLite3 database to record comments that are replied to. The configuration file for the bot is stored inJSON and loaded byConfig.py. The reddit logic is inclimb_bot.py and replies generated from MountainProject are parsed inRoute.py andArea.py.