25 lines
765 B
Python
25 lines
765 B
Python
import sys
|
|
sys.path.insert(0, "../src")
|
|
from huizenbot import fiets_minuten, ov_minuten, geocode
|
|
from config import *
|
|
|
|
# --- change these to test different postcodes ---
|
|
POSTCODE_FROM = "3028GE"
|
|
POSTCODE_FROM_9292 = "rotterdam/" + POSTCODE_FROM
|
|
|
|
if __name__ == "__main__":
|
|
print("=== Geocode ===")
|
|
origin = geocode(POSTCODE_FROM)
|
|
dest = geocode(MARK_WERK_POSTCODE)
|
|
print(f" {POSTCODE_FROM} → {origin}")
|
|
print(f" {MARK_WERK_POSTCODE} → {dest}")
|
|
if not origin or not dest:
|
|
print("Geocode mislukt, stop.")
|
|
sys.exit(1)
|
|
|
|
print("\n=== Fiets (OSRM) ===")
|
|
print(f" {fiets_minuten(origin, dest)} minuten")
|
|
|
|
print("\n=== OV (9292) ===")
|
|
print(f" {ov_minuten(POSTCODE_FROM_9292, MARK_WERK_9292)} minuten")
|