From b2b3d9c2362a23a56dcf0fa00926a216d2547b5d Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 3 Dec 2019 00:17:56 +0000 Subject: [PATCH] Fix docs for readthedocs.org --- docs/source/conf.py | 4 ++- docs/source/{index.rst => contents.rst} | 0 docs/source/intro/getting-started.md | 12 ------- docs/source/intro/getting-started.rst | 13 +++++++ docs/source/plugins/introduction.md | 45 ------------------------ docs/source/plugins/introduction.rst | 46 +++++++++++++++++++++++++ 6 files changed, 62 insertions(+), 58 deletions(-) rename docs/source/{index.rst => contents.rst} (100%) delete mode 100644 docs/source/intro/getting-started.md create mode 100644 docs/source/intro/getting-started.rst delete mode 100644 docs/source/plugins/introduction.md create mode 100644 docs/source/plugins/introduction.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 586ce36..5179abf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -49,4 +49,6 @@ html_theme = 'alabaster' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = ['_static'] + +master_doc = 'contents' \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/contents.rst similarity index 100% rename from docs/source/index.rst rename to docs/source/contents.rst diff --git a/docs/source/intro/getting-started.md b/docs/source/intro/getting-started.md deleted file mode 100644 index 39d07a1..0000000 --- a/docs/source/intro/getting-started.md +++ /dev/null @@ -1,12 +0,0 @@ -# Getting started with Houdini - -Houdini can be installed like any other Python program: - -```py -git clone https://github.com/solero/houdini-asyncio -cd houdini-asyncio -pip install -r requirements.txt -python bootstrap.py login -``` - -This page is a WIP! \ No newline at end of file diff --git a/docs/source/intro/getting-started.rst b/docs/source/intro/getting-started.rst new file mode 100644 index 0000000..a291b36 --- /dev/null +++ b/docs/source/intro/getting-started.rst @@ -0,0 +1,13 @@ +Getting started with Houdini +============================ + +Houdini can be installed like any other Python program: + +.. code-block:: bash + + git clone https://github.com/solero/houdini-asyncio + cd houdini-asyncio + pip install -r requirements.txt + python bootstrap.py login + +This page is a WIP! \ No newline at end of file diff --git a/docs/source/plugins/introduction.md b/docs/source/plugins/introduction.md deleted file mode 100644 index df0ba44..0000000 --- a/docs/source/plugins/introduction.md +++ /dev/null @@ -1,45 +0,0 @@ -# Plugins: An introduction - -Plugins provide a neat way to extend Houdini's functionality. Here is an example! - -```python -from houdini import handlers -from houdini.handlers import XTPacket - -from houdini.plugins import IPlugin -from houdini import commands - -from houdini import permissions - -class Example(IPlugin): - author = "Ben" - description = "Example plugin for developers" - version = "1.0.0" - - def __init__(self, server): - super().__init__(server) - - async def ready(self): - self.server.logger.info('Example.ready()') - # await self.server.permissions.insert(name='houdini.ping') - - async def message_cooling(self, p): - print(f'{p}, Message was sent during cooldown') - - @handlers.handler(XTPacket('m', 'sm')) - @handlers.cooldown(1, callback=message_cooling) - async def handle_send_message(self, p, penguin_id: int, message: str): - print(f'Do stuff with {message}') - - @commands.command('ping') - @permissions.has('houdini.ping') - async def ping(self, p): - await p.send_xt('cprompt', 'Pong') - - @commands.command('ac') - async def add_coins(self, p, amount: int = 100): - await p.add_coins(amount, stay=True) - -``` - -This page is a WIP! \ No newline at end of file diff --git a/docs/source/plugins/introduction.rst b/docs/source/plugins/introduction.rst new file mode 100644 index 0000000..cf1d83b --- /dev/null +++ b/docs/source/plugins/introduction.rst @@ -0,0 +1,46 @@ +Plugins: An introduction +======================== + +Plugins provide a neat way to extend Houdini's functionality. Here is an example! + + +.. code-block:: python + + from houdini import handlers + from houdini.handlers import XTPacket + + from houdini.plugins import IPlugin + from houdini import commands + + from houdini import permissions + + class Example(IPlugin): + author = "Ben" + description = "Example plugin for developers" + version = "1.0.0" + + def __init__(self, server): + super().__init__(server) + + async def ready(self): + self.server.logger.info('Example.ready()') + await self.server.permissions.insert(name='houdini.ping') + + async def message_cooling(self, p): + print(f'{p}, Message was sent during cooldown') + + @handlers.handler(XTPacket('m', 'sm')) + @handlers.cooldown(1, callback=message_cooling) + async def handle_send_message(self, p, penguin_id: int, message: str): + print(f'Do stuff with {message}') + + @commands.command('ping') + @permissions.has('houdini.ping') + async def ping(self, p): + await p.send_xt('cprompt', 'Pong') + + @commands.command('ac') + async def add_coins(self, p, amount: int = 100): + await p.add_coins(amount, stay=True) + +This page is a WIP! \ No newline at end of file