juftin / camply

camply, the campsite finder ⛺️ - a tool to find campsites at sold out campgrounds through sites like recreation.gov
https://juftin.com/camply/
MIT License
486 stars 94 forks source link

Allow searching across multiple providers by allowing multiple YAML files in same query (Enhancement Suggestion) #335

Open moememes opened 7 months ago

moememes commented 7 months ago

Enhancement suggestion

Problem: One common situation with regards to booking campgrounds is that often there are multiple campgrounds spread between multiple providers that users may be alright with. For instance, in the greater Lake Tahoe region, there are RecDotGov sites as well as Reserve California sites. Currently, to run a camply search session for all campsites in the greater Lake Tahoe region, the user must run two different yaml files, one for RecDotGov and one for ReserveCalifornia, and thus run two Camply sessions at once.

While this isn't too much of a problem overall and can be solved via a cron job that only searches Camply once every X interval (instead of continuous searching) it would be more elegant and provide for a better user experience if Camply could process multiple yaml files, or the yaml file structure could support multiple entries.

Proposal:

Option 1:

In this Lake Tahoe situation, there are two different providers we would like to search, one from ReserveCalifornia and the other one from RecreationDotGov:

tahoe_rescal.yaml

campgrounds: 
        - 472 #emerald bay lower eagle pt
        - 786 #emerald bay upper eagle pt
    ...

tahoe_recgov.yaml

campgrounds: 
        - 232768 #nevada beach
        - 232769 #fallen leaf
    ...

We can then run something like camply campsites --yml-config tahoe_recdotgov.yaml,tahoe_rescal.yaml

Option 2: Alternatively, a better way may be to allow for multiple searches within the same yaml file:

tahoe_campsites.yaml

provider: ReserveCalifornia 
campgrounds: 
        - 472 #emerald bay lower eagle pt
        - 786 #emerald bay upper eagle pt
    ...

--- # <- denotes new yaml block

provider: RecreationDotGov 
campgrounds: 
        - 232768 #nevada beach
        - 232769 #fallen leaf
    ...

camply campsites --yml-config tahoe_campsites.yaml would then search everything in order.

Other Benefits: The other pros is that such a search would allow a user to search multiple camping dates as well, or have other alternatives if they don't think cancellations will happen on their main search. Either way, it would give great flexibility to those who are looking to secure cancellations and aren't picky about the specifics, or even those who go camping often and have multiple trips they are trying to look for.

Thank you!