summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-21 08:25:37 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-21 08:25:37 +0100
commit4eb59923486b8ee9f4d253315db9d0ff4c9668bd (patch)
tree7cbe78e0512e548c2658a4746de7623bffb678b6
parent44e98c9ad92bc0260866ea6c94851f5cfc65f6e3 (diff)
initialize format documentation
-rw-r--r--README.md39
1 files changed, 33 insertions, 6 deletions
diff --git a/README.md b/README.md
index d61927d..0762cd7 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,38 @@
# db-wagenreihung-to-json - Convert wagon order PDFs to JSON
-db-wagenreihung-to-json converts a wagon order (“Zugbildungsplan”) PDF obtained
-from
+db-wagenreihung-to-json converts a train composition (“Zugbildungsplan”) PDF
+obtained from
[data.deutschebahn.com](https://data.deutschebahn.com/dataset/zugbildungsplanzugbildungsplan-zpar)
to JSON. At the moment, conversion is limited to a map of train numbers to
-IC/ICE types (ICE 1, ICE 3, ICE 3 Redesign, ...). Train composition, exceptions
-on certain dates and other details are lost.
+estimated IC/ICE types (ICE 1, ICE 3, ICE 3 Redesign, ...), partial train
+composition / wagon order data, and cycles ("Umlaufpläne").
-The latest JSON produced by d-wagenreihung-to-json is available online at
-[dbdb/ice\_type.json](https://lib.finalrewind.org/dbdb/ice_type.json).
+The PDF-to-JSON conversion is somewhat fragile, so errors are expected. If you
+find a bug or inconsistency in the JSON file, please first compare it with the
+corresponding PDF on
+[data.deutschebahn.com](https://data.deutschebahn.com/dataset/zugbildungsplanzugbildungsplan-zpar).
+If it is indeed a bug in db-wagenreihung-to-json, please [open an issue on
+GitHub](https://github.com/derf/db-wagenreihung-to-json/issues/new).
+
+The latest JSON produced by db-wagenreihung-to-json is available online at
+[dbdb/zugbildungsplan\_v0.json](https://lib.finalrewind.org/dbdb/zugbildungsplan_v0.json).
+
+## Data Format
+
+This README documents **version 0** of the format.
+
+```js
+{
+ "deprecated": false,
+ "source": "2021_ZpAR_Wi_Endstück.pdf",
+ "train": {
+ "4": { /* train details */ },
+ "5": { /* train details */ }
+ // ...
+ },
+ "valid": {
+ "from": "YYYY-MM-DD",
+ "through": "YYYY-MM-DD"
+ }
+}
+```