charvolant / de-calixtinus

Plan stages for the Camino Santiago, based on preferences
Other
2 stars 0 forks source link

De Calixtinus

This is a program to help people plan walking stages on the Camino Santiago. You can supply a set of preferences in the form of fitness, preferred and hard limits on travel distance, accommodation etc. and the program will attempt to build a globally optimal set of stages for you. Globally, means that the program will try to find the best set of stages over the entire trip, stretching and squeezing as appropriate to try and limit the number of ludicrously long or disappointingly short stages.

I started planning this program while walking the Camino Portugués. It's partially a learning exercise. I had always wanted to learn the Haskell programming language properly but had never had that special project to make me grit through the difficulties of learning to program idiomatically. It turns out that this was sufficient motivation.

Usage

De Calixtinus runs at https://de-calixtinus.org

Sample

To see an exmaple plan, based on someone unfit who wants to walk about 20km a day and wants to go to via Fátima-Ansião, most of the Coastal/Littoral routes and then transfer to Tui, look here. Or here for a KML version displayable in Google Earth. (This route happens to correspond to the route the author took, although the planner comes up with some different stages to the ones we chose.)

Docker Image

The docker image allows you to run de calixtinus locally, if you wish to play.

Web Server

To run the web server, use

camino-server-exe [-c CONFIG] [-s STATIC] [-d] [-r ROOT] [-p PORT] CAMINO ...
Argument Description Example/default
CAMINO A list of camino descriptions in JSON form camino-portuguese.json
-c CONFIG An optional configuration file for generating the appropriate HTML output, in YAML form ./config.yaml
-s STATIC The location of static (asset) files, such as CSS, fonts and icons ./static
-r ROOT The root URL for links. http://localhost:3000
-p PORT The port to listen on 3000
-d Use debug mode

If you are using something like nginx as a front-end, you will need to set the root so that links are correctly generated.

Planner

To run the simple planner, use

camino-planner-exe CAMINO PREFERENCES BEGIN END [-r ROUTES] [-s STOPS] [-x EXCLUDED] [-c CONFIG] [-o OUTPUT]
Argument Description Example
CAMINO A camino description in JSON form camino-portuguese.json
PREFERENCES A preference file in JSON form example-preferences.json
BEGIN The identifier of the start point P1 Lisbon
END The identifier of the end point P284 Santiago
ROUTES An optional list, separated by commas, of variant routes that you wish to use. The default main route is always used. RS Spiritual Variant
STOPS An optional list, separated by commas, of places where you wish to stop for the night. If absent, the standard stops from the selected routes are used. P78,F10 Coimbra, Fátima
EXCLUDED An optional list, separated by commas, of places where you do not wish to stop for the night P63 Zambujal
CONFIG An optional configuration file for generating the appropriate HTML output, in YAML form config.yaml
OUTPUT The optional output directory to write the HTML plan to ./plan

At the moment, you have to use the location identifiers when specifying start- and end-points, etc. You will need to open the camino file and note down the id value.

By default, the planner will choose the quickest and easiest route. You can use the required stops option to control this. For example, if you want to visit Fátima add -s F10 to the command.

Sources

The Camino Planner needs data. In particular, the various waypoints, services, accommodation, distances, climbs, descents and what-have you need to be described in loving detail. The sample data has been collected by working through a number of sources. Most of these we used when walking the Camino ourselves.

Beware

This is intended to be a helpful tool for people planning their trip. Just because "Computer Says So!" doesn't mean it's a good idea. So use your own judgement. In particular, the planner doesn't really distinguish between an interesting place to stop, full of sights and entertainment, and a boring, dusty truckstop beside a major highway. Although I hasten to add that the truckstops we did stop at were wonderfully hospitable, so whatever floats your boat.

I've done my best to be accurate about the data but ... if you're relying on something to be true, check with other sources, as well. Also, things change: places to stay come and go, temporarily shut down or get filled up; roads get blocked; on Sunday everything shuts down and you need to plan accordingly. This output from this program is no substitute for either careful planning or casual resilience in the face of adversity.

A Work in Progress

The eventual aim is to have this with a nice front-end that allows users to enter preferences and get a nicely formatted plan. There's a bit of a way to go for that.

The TODO List

Some design notes

Build Notes

See doc/BUILD.md

Making Your Own Camino

See doc/CAMINO.md

Configuration

See doc/CONFIG.md