Tool code
These small Python tools built this site, looked up public transport, ordered the places of a day and found photos for each place. They are published under the MIT licence (the Transitous data terms ask projects that use its API to be open source). The trip data itself is not here, and the code comments are in Chinese.
- build_site.py: builds the static site from the trip files and scans the result for private details before it is published.
- check.py: checks the trip files (day pages, place database, bookings) for format errors; it reports and does not change anything.
- images.py: finds candidate photos for a place on Wikipedia, Wikimedia Commons and Openverse, and records the licence of the chosen one.
- plan_day.py: orders a day from a start point, a latest return and candidate places, using real timetables; it gives a recommended order, alternatives and the reason each dropped place was dropped.
- privacy.py: replaces or blocks listed words, masks email addresses and scans the built site.
- transit.py: looks up stops, connections and full-day timetables from Transitous.
- tripdata.py: reads the trip data (places, day pages, to-dos, decisions, image credits); the site and the agent use the same functions.
- LICENSE
The open-source project that rebuilds this approach as a service for AI assistants is tripwright; see About this page.