From e9c84e437b1ede6c21f740742e34d37520ac4840 Mon Sep 17 00:00:00 2001 From: vijay-jaisankar Date: Mon, 25 Apr 2022 01:34:31 +0530 Subject: [PATCH] docs: updated readme, added basic usage instructions --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index e14d2c8..75c1ae1 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,31 @@ - `python -m pip install --upgrade pip` - `pip install trafficinterventions xml` +--- ## Documentation All relevant files can be found [here](https://github.com/WSL-IIITB/Traffic-Interventions/tree/main/docs) + +--- + +### Sample Usage : Edge Manipulation +```py +import trafficinterventions + +ce = trafficinterventions.ChangeEdges.ChangeEdges(fileName="sample.xml") + +# Sample Intervention +ce.disallowAppendTypes(["bus"], ["-100"], "new_file.xml") + +``` +--- + +### Sample Usage : Lane Manipulation +```py +import trafficinterventions + +cl = trafficinterventions.ChangeLanes.ChangeLanes(fileName="sample.xml") + +# Sample Intervention +ce.changePriorityLanes(["highway.cycleway"], 100, "new_file.xml") + +```