$schema: https://taskfile.dev/schema.json version: '3' vars: OTP_JAR: otp-shaded-2.8.1.jar tasks: download-otp: desc: "Download the OpenTripPlanner JAR file" cmds: - curl -L -o {{.OTP_JAR}} https://github.com/opentripplanner/OpenTripPlanner/releases/download/v2.8.1/otp-shaded-2.8.1.jar download-pbf: desc: "Download a sample PBF file for building the graph" cmds: - curl -sLo galicia-latest.osm.pbf https://download.geofabrik.de/europe/spain/galicia-latest.osm.pbf download-xunta: desc: "Download Xunta de Galicia GTFS data (NAP MITRAMS)" cmds: - "curl -H \"ApiKey: {{.NAP_API_KEY}}\" -sLo feeds/xunta.zip https://nap.transportes.gob.es/api/Fichero/download/1584" download-renfe: desc: "Download Renfe GTFS data (NAP MITRAMS)" cmds: - uv --directory build_renfe run ./build_static_feed.py {{.NAP_API_KEY}} - cp build_renfe/gtfs_renfe_galicia_general*.zip feeds/renfe.zip - cp build_renfe/gtfs_renfe_galicia_feve*.zip feeds/feve.zip download-coruna: desc: "Download A Coruña city GTFS data (NAP MITRAMS)" cmds: - uv --directory build_coruna run ./build_static_feed.py {{.NAP_API_KEY}} - cp build_coruna/gtfs_coruna.zip feeds/coruna.zip download-vitrasa: desc: "Download Vitrasa GTFS data (Vigo Open Data)" cmds: - "curl -sLo feeds/vitrasa.zip https://datos.vigo.org/data/transporte/gtfs_vigo.zip" download-feeds: desc: "Download all required data files" deps: - download-xunta - download-renfe - download-coruna - download-vitrasa build-osm: desc: "Build OSM data for OpenTripPlanner" sources: - galicia-latest.osm.pbf cmds: - java -Xmx4G -jar {{.OTP_JAR}} --buildStreet . build-transit: desc: "Build transit data for OpenTripPlanner" cmds: - java -Xmx4G -jar {{.OTP_JAR}} --loadStreet --save . build: desc: "Build OpenTripPlanner and save the graph for future runs" cmds: - task: build-osm - task: build-transit run: desc: "Run the OpenTripPlanner server using the saved graph from the build task" cmds: - java -Xmx4G -jar {{.OTP_JAR}} --load . --serve proxy-renfe-rt: desc: "Run the Renfe releases proxy server" cmds: - uv --directory proxy_rt_renfe run ./main.py aio: desc: "Build and run OpenTripPlanner without saving the graph" cmds: - java -Xmx4G -jar {{.OTP_JAR}} --build . --serve