From af7b1616e74e07712dc2f56600b6610de5a91d45 Mon Sep 17 00:00:00 2001 From: codingfabi Date: Sat, 4 May 2024 20:29:36 +0200 Subject: [PATCH] some more markdown enhancements --- docs/index.rst | 2 +- docs/tutorial.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 docs/tutorial.md diff --git a/docs/index.rst b/docs/index.rst index 7fda410..5abad77 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,7 +8,6 @@ Welcome to co2calculator's documentation! **co2calculator** is a Python package to calculate work related CO2 emissions from heating and electricity consumption as well as business trips and commuting. - Contents ================== @@ -19,6 +18,7 @@ Contents :includehidden: documentation + tutorial businesstrips commuting calculate/heating_electricity diff --git a/docs/tutorial.md b/docs/tutorial.md new file mode 100644 index 0000000..d404493 --- /dev/null +++ b/docs/tutorial.md @@ -0,0 +1,17 @@ +# Tutorial + +The co2calculator package is available via pip: + +```python +pip install co2calculator +``` + +For a simple and basic emission calculation, import the calculation function and define some emission cause: + +```python + +from co2calculator import calculate_trip +from co2calculator.enums import TransportationMode + +co2e = calculate_trip(distance=200,transportation_mode=TransportationMode.CAR) +```