forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ec6eaf
commit a5faa85
Showing
11 changed files
with
420 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
""" | ||
Sphinx extension to add ReadTheDocs-style "Edit on GitHub" links to the | ||
sidebar. | ||
Loosely based on https://github.com/astropy/astropy/pull/347 | ||
""" | ||
|
||
import os | ||
import warnings | ||
|
||
|
||
__licence__ = 'BSD (3 clause)' | ||
|
||
|
||
def get_github_url(app, view, path): | ||
return ( | ||
'https://github.com/{project}/{view}/{branch}/{src_path}{path}'.format( | ||
project=app.config.edit_on_github_project, | ||
view=view, | ||
branch=app.config.edit_on_github_branch, | ||
src_path=app.config.edit_on_github_src_path, | ||
path=path)) | ||
|
||
|
||
def html_page_context(app, pagename, templatename, context, doctree): | ||
if templatename != 'page.html': | ||
return | ||
|
||
if not app.config.edit_on_github_project: | ||
warnings.warn("edit_on_github_project not specified") | ||
return | ||
if not doctree: | ||
warnings.warn("doctree is None") | ||
return | ||
path = os.path.relpath(doctree.get('source'), app.builder.srcdir) | ||
show_url = get_github_url(app, 'blob', path) | ||
edit_url = get_github_url(app, 'edit', path) | ||
|
||
context['show_on_github_url'] = show_url | ||
context['edit_on_github_url'] = edit_url | ||
|
||
|
||
def setup(app): | ||
app.add_config_value('edit_on_github_project', '', True) | ||
app.add_config_value('edit_on_github_branch', 'master', True) | ||
app.add_config_value('edit_on_github_src_path', '', True) # 'eg' "docs/" | ||
app.connect('html-page-context', html_page_context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<ul> | ||
<li><a href="https://community.home-assistant.io">📌 Community Forums</a></li> | ||
<li><a href="https://github.com/home-assistant/home-assistant">🚀 GitHub</a></li> | ||
<li><a href="https://home-assistant.io/">🏡 Homepage</a></li> | ||
<li><a href="https://gitter.im/home-assistant/home-assistant">💬 Gitter</a></li> | ||
<li><a href="https://pypi.python.org/pypi/homeassistant">💾 Download Releases</a></li> | ||
</ul> | ||
<hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{%- if show_source and has_source and sourcename %} | ||
<h3>{{ _('This Page') }}</h3> | ||
<ul class="this-page-menu"> | ||
{%- if show_on_github_url %} | ||
<li><a href="{{ show_on_github_url }}" | ||
rel="nofollow">{{ _('Show on GitHub') }}</a></li> | ||
{%- endif %} | ||
{%- if edit_on_github_url %} | ||
<li><a href="{{ edit_on_github_url }}" | ||
rel="nofollow">{{ _('Edit on GitHub') }}</a></li> | ||
{%- endif %} | ||
</ul> | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.. _bootstrap_module: | ||
|
||
:mod:`homeassistant.bootstrap` | ||
------------------------- | ||
|
||
.. automodule:: homeassistant.bootstrap | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. _components_device_tracker_module: | ||
|
||
:mod:`homeassistant.components.device_tracker` | ||
---------------------------------------------- | ||
|
||
.. automodule:: homeassistant.components.device_tracker | ||
:members: | ||
|
||
.. autoclass:: Device | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
homeassistant.helpers package | ||
============================= | ||
|
||
Submodules | ||
---------- | ||
|
||
homeassistant.helpers.condition module | ||
-------------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.condition | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.config_validation module | ||
---------------------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.config_validation | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.discovery module | ||
-------------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.discovery | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.entity module | ||
----------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.entity | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.entity_component module | ||
--------------------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.entity_component | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.event module | ||
---------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.event | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.event_decorators module | ||
--------------------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.event_decorators | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.location module | ||
------------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.location | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.script module | ||
----------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.script | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.service module | ||
------------------------------------ | ||
|
||
.. automodule:: homeassistant.helpers.service | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.state module | ||
---------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.state | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.template module | ||
------------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.template | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.helpers.typing module | ||
----------------------------------- | ||
|
||
.. automodule:: homeassistant.helpers.typing | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: homeassistant.helpers | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
homeassistant package | ||
===================== | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
|
||
helpers | ||
util | ||
|
||
Submodules | ||
---------- | ||
|
||
bootstrap module | ||
------------------------------ | ||
|
||
.. automodule:: homeassistant.bootstrap | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
config module | ||
--------------------------- | ||
|
||
.. automodule:: homeassistant.config | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
const module | ||
-------------------------- | ||
|
||
.. automodule:: homeassistant.const | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
core module | ||
------------------------- | ||
|
||
.. automodule:: homeassistant.core | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
exceptions module | ||
------------------------------- | ||
|
||
.. automodule:: homeassistant.exceptions | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
loader module | ||
--------------------------- | ||
|
||
.. automodule:: homeassistant.loader | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
remote module | ||
--------------------------- | ||
|
||
.. automodule:: homeassistant.remote | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: homeassistant | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
homeassistant.util package | ||
========================== | ||
|
||
Submodules | ||
---------- | ||
|
||
homeassistant.util.color module | ||
------------------------------- | ||
|
||
.. automodule:: homeassistant.util.color | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.util.distance module | ||
---------------------------------- | ||
|
||
.. automodule:: homeassistant.util.distance | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.util.dt module | ||
---------------------------- | ||
|
||
.. automodule:: homeassistant.util.dt | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.util.location module | ||
---------------------------------- | ||
|
||
.. automodule:: homeassistant.util.location | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.util.package module | ||
--------------------------------- | ||
|
||
.. automodule:: homeassistant.util.package | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.util.temperature module | ||
------------------------------------- | ||
|
||
.. automodule:: homeassistant.util.temperature | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.util.unit_system module | ||
------------------------------------- | ||
|
||
.. automodule:: homeassistant.util.unit_system | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
homeassistant.util.yaml module | ||
------------------------------ | ||
|
||
.. automodule:: homeassistant.util.yaml | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: homeassistant.util | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Oops, something went wrong.