1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Add long_description from README.md (#287)

* Add readme to API

* update name
This commit is contained in:
Pascal Vizeli
2017-12-26 01:31:24 +01:00
committed by GitHub
parent e59e2fc8d7
commit 38a599011e
4 changed files with 17 additions and 1 deletions

View File

@@ -167,6 +167,19 @@ class Addon(object):
"""Return description of addon."""
return self._mesh[ATTR_DESCRIPTON]
@property
def long_description(self):
"""Return README.md as long_description."""
readme = Path(self.path_location, 'README.md')
# If readme not exists
if not readme.exists():
return None
# Return data
with readme.open('r') as readme_file:
return readme_file.read()
@property
def repository(self):
"""Return repository of addon."""