Fix docs for readthedocs.org

This commit is contained in:
Ben 2019-12-03 00:17:56 +00:00
parent 25c380b765
commit b2b3d9c236
6 changed files with 62 additions and 58 deletions

View File

@ -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']
html_static_path = ['_static']
master_doc = 'contents'

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!