transport-accessibility/transport_accessibility/test.py
Johannes Randerath f314bfb396 Got rid of bridge and fixed GTFS compliance
- Ported the bridge that was using a custom GTFS class and Pandas
  Dataframes to a native Django solution for and interface between db
  and csv (see api/io.py)
- Fixed some issues regarding the compliance of the exported csv files
  with the GTFS reference. I.e. now allowing times 24:00:00 <= t >=
  24:59:59
2024-06-24 14:21:53 +02:00

11 lines
372 B
Python

import pt_map.models
import api.io
import inspect
#api.io.models_csv("/home/johannes/Downloads/torun")
q = [m.objects.all() for _,m in inspect.getmembers(pt_map.models, inspect.isclass)]
for s in q:
f = f"/home/johannes/Downloads/test3/{pt_map.class_names.case_swap[s.model._meta.object_name]}.txt"
with open(f, 'w') as file:
file.write(api.io.csv_queryset(s))
quit()