From a4db9e25282a947b3c88e4c44313d58738ebfe66 Mon Sep 17 00:00:00 2001 From: Artem30801 Date: Thu, 15 Oct 2020 15:45:05 +0300 Subject: [PATCH] builder-tools: fixed links for github --- builder/builder-tools/generate_api_docs.py | 2 +- docs/en/api/client_core.md | 18 +++--- docs/en/api/messaging.md | 64 +++++++++++----------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/builder/builder-tools/generate_api_docs.py b/builder/builder-tools/generate_api_docs.py index a6516ec..d7a4fc7 100644 --- a/builder/builder-tools/generate_api_docs.py +++ b/builder/builder-tools/generate_api_docs.py @@ -96,7 +96,7 @@ class DocsGenerator: relpath = os.path.sep.join( os.path.relpath(module.__file__, output_path).split(os.path.sep)[1:] ) - docs = self.get_full_markdown(module, relpath) + docs = self.get_full_markdown(module, relpath.replace(os.path.sep, "/")) with open(output_path, 'w') as f: for line in docs: f.write(line.replace("\n", os.linesep) + '\n') diff --git a/docs/en/api/client_core.md b/docs/en/api/client_core.md index 6e7b534..7453773 100644 --- a/docs/en/api/client_core.md +++ b/docs/en/api/client_core.md @@ -1,6 +1,6 @@ -# Module [drone.modules.client_core](..\..\..\drone\modules\client_core.py) +# Module [drone.modules.client_core](../../../drone/modules/client_core.py) ## Module functions -## Class [Client](..\..\..\drone\modules\client_core.py#L25) +## Class [Client](../../../drone/modules/client_core.py#L25) Client base class provides config loading, communication with server (including automatic reconnection, broadcast listening and binding). Attributes: @@ -9,17 +9,17 @@ Attributes: client_id (string) - ID of the client. config (ConfigManager) - contains loaded client configuration. config_path (string) - path to configuration file. There also should be config specification file at 'config_path\config\configspec_client.ini'. -### [\_\_init\_\_](..\..\..\drone\modules\client_core.py#L37) +### [\_\_init\_\_](../../../drone/modules/client_core.py#L37) ```py def __init__(self, config_path='C:\\Users\\artem\\Documents\\GitHub\\COEX-clever-swarm\\clever-show\\drone\\modules\\..\\config\\client.ini') ``` Initialize self. See help(type(self)) for accurate signature. -### [broadcast\_bind](..\..\..\drone\modules\client_core.py#L160) +### [broadcast\_bind](../../../drone/modules/client_core.py#L160) ```py def broadcast_bind(self, timeout=2.0, attempt_limit=3) ``` -### [get\_ntp\_time](..\..\..\drone\modules\client_core.py#L72) +### [get\_ntp\_time](../../../drone/modules/client_core.py#L72) ```py def get_ntp_time(ntp_host, ntp_port) ``` @@ -31,24 +31,24 @@ Args: Returns: int: Current time recieved from the NTP server -### [load\_config](..\..\..\drone\modules\client_core.py#L53) +### [load\_config](../../../drone/modules/client_core.py#L53) ```py def load_config(self) ``` Loads or reloads config from file specified in 'config_path'. -### [on\_broadcast\_bind](..\..\..\drone\modules\client_core.py#L197) +### [on\_broadcast\_bind](../../../drone/modules/client_core.py#L197) ```py def on_broadcast_bind(self) ``` Method called on binding to the server by broadcast. Override that method in order to add functionality. -### [start](..\..\..\drone\modules\client_core.py#L105) +### [start](../../../drone/modules/client_core.py#L105) ```py def start(self) ``` Reloads config and starts infinite loop of connecting to the server and processing said connection. Calling of this method will indefinitely halt execution of any subsequent code. -### [time\_now](..\..\..\drone\modules\client_core.py#L93) +### [time\_now](../../../drone/modules/client_core.py#L93) ```py def time_now(self) ``` diff --git a/docs/en/api/messaging.md b/docs/en/api/messaging.md index 03bf9f3..6254745 100644 --- a/docs/en/api/messaging.md +++ b/docs/en/api/messaging.md @@ -1,6 +1,6 @@ -# Module [lib.messaging](..\..\..\lib\messaging.py) +# Module [lib.messaging](../../../lib/messaging.py) ## Module functions -### [get\_ip\_address](..\..\..\lib\messaging.py#L39) +### [get\_ip\_address](../../../lib/messaging.py#L39) ```py def get_ip_address() ``` @@ -8,7 +8,7 @@ Returns the IP address of current computer or `localhost` if no network connecti Returns: string: IP address of current computer or `localhost` if no network connection present -### [message\_callback](..\..\..\lib\messaging.py#L232) +### [message\_callback](../../../lib/messaging.py#L232) ```py def message_callback(action_string) ``` @@ -16,12 +16,12 @@ Callback decorator. Functions registered by this decorator will be called upon r Args: action_string ([type]): [description] -### [request\_callback](..\..\..\lib\messaging.py#L250) +### [request\_callback](../../../lib/messaging.py#L250) ```py def request_callback(string_command) ``` -### [set\_keepalive](..\..\..\lib\messaging.py#L54) +### [set\_keepalive](../../../lib/messaging.py#L54) ```py def set_keepalive(sock, after_idle_sec=1, interval_sec=3, max_fails=5) -> None ``` @@ -35,77 +35,77 @@ Args: Raises: NotImplementedError: for unknown platform -## Class [ConnectionManager](..\..\..\lib\messaging.py#L263) +## Class [ConnectionManager](../../../lib/messaging.py#L263) ... -### [\_\_init\_\_](..\..\..\lib\messaging.py#L267) +### [\_\_init\_\_](../../../lib/messaging.py#L267) ```py def __init__(self, whoami='computer') ``` Initialize self. See help(type(self)) for accurate signature. -### [close](..\..\..\lib\messaging.py#L324) +### [close](../../../lib/messaging.py#L324) ```py def close(self) ``` -### [connect](..\..\..\lib\messaging.py#L306) +### [connect](../../../lib/messaging.py#L306) ```py def connect(self, client_selector, client_socket, client_addr) ``` -### [get\_file](..\..\..\lib\messaging.py#L566) +### [get\_file](../../../lib/messaging.py#L566) ```py def get_file(self, client_filepath, filepath=None, callback=None, callback_args=(), callback_kwargs=None) ``` -### [get\_response](..\..\..\lib\messaging.py#L543) +### [get\_response](../../../lib/messaging.py#L543) ```py def get_response(self, requested_value, callback, request_args=(), request_kwargs=None, callback_args=(), callback_kwargs=None) ``` -### [process\_events](..\..\..\lib\messaging.py#L360) +### [process\_events](../../../lib/messaging.py#L360) ```py def process_events(self, mask) ``` -### [process\_received](..\..\..\lib\messaging.py#L408) +### [process\_received](../../../lib/messaging.py#L408) ```py def process_received(self, message) ``` -### [read](..\..\..\lib\messaging.py#L372) +### [read](../../../lib/messaging.py#L372) ```py def read(self) ``` -### [send\_file](..\..\..\lib\messaging.py#L595) +### [send\_file](../../../lib/messaging.py#L595) ```py def send_file(self, filepath, dest_filepath) ``` -### [send\_message](..\..\..\lib\messaging.py#L589) +### [send\_message](../../../lib/messaging.py#L589) ```py def send_message(self, action, args=(), kwargs=None) ``` -### [write](..\..\..\lib\messaging.py#L509) +### [write](../../../lib/messaging.py#L509) ```py def write(self) ``` -## Class [MessageManager](..\..\..\lib\messaging.py#L105) +## Class [MessageManager](../../../lib/messaging.py#L105) MessageManager class represents single incoming by TCP stream message and contains methods to decode and extract data from incoming data. It also contains static class methods for encoding various types of messages. Attributes: income_raw (bytes string) - Append incoming data to this attribute. content: Would be populated when receiving and processing of the message will be completed. Deafults to None. -### [\_\_init\_\_](..\..\..\lib\messaging.py#L112) +### [\_\_init\_\_](../../../lib/messaging.py#L112) ```py def __init__(self) ``` Initialize self. See help(type(self)) for accurate signature. -### [process\_message](..\..\..\lib\messaging.py#L217) +### [process\_message](../../../lib/messaging.py#L217) ```py def process_message(self) ``` @@ -113,59 +113,59 @@ def process_message(self) -## Class [Namespace](..\..\..\lib\messaging.py#L22) +## Class [Namespace](../../../lib/messaging.py#L22) ... -### [\_\_init\_\_](..\..\..\lib\messaging.py#L23) +### [\_\_init\_\_](../../../lib/messaging.py#L23) ```py def __init__(self, **kwargs) ``` Initialize self. See help(type(self)) for accurate signature. -## Class [NotifierSock](..\..\..\lib\messaging.py#L607) +## Class [NotifierSock](../../../lib/messaging.py#L607) ... -### [\_\_init\_\_](..\..\..\lib\messaging.py#L608) +### [\_\_init\_\_](../../../lib/messaging.py#L608) ```py def __init__(self) ``` Initialize self. See help(type(self)) for accurate signature. -### [close](..\..\..\lib\messaging.py#L651) +### [close](../../../lib/messaging.py#L651) ```py def close(self) ``` -### [get\_sock](..\..\..\lib\messaging.py#L631) +### [get\_sock](../../../lib/messaging.py#L631) ```py def get_sock(self) ``` -### [init](..\..\..\lib\messaging.py#L619) +### [init](../../../lib/messaging.py#L619) ```py def init(self, selector, port=26000) ``` -### [notify](..\..\..\lib\messaging.py#L634) +### [notify](../../../lib/messaging.py#L634) ```py def notify(self) ``` -### [process\_events](..\..\..\lib\messaging.py#L641) +### [process\_events](../../../lib/messaging.py#L641) ```py def process_events(self, mask) ``` -## Class [PendingRequest](..\..\..\lib\messaging.py#L33) +## Class [PendingRequest](../../../lib/messaging.py#L33) ... -### [\_\_init\_\_](..\..\..\lib\messaging.py#L23) +### [\_\_init\_\_](../../../lib/messaging.py#L23) ```py def __init__(self, **kwargs) ``` Initialize self. See help(type(self)) for accurate signature. -## Class [Singleton](..\..\..\lib\messaging.py#L102) +## Class [Singleton](../../../lib/messaging.py#L102) ...