Skip to content

Commit

Permalink
[update] add compatibility with miko 2.0 and generate API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Oct 31, 2023
1 parent 7ae9641 commit 5f9a749
Show file tree
Hide file tree
Showing 223 changed files with 32,186 additions and 1,205 deletions.
2 changes: 2 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import sys
import typing

import miko
from rich.prompt import Confirm
from rich.progress import Progress

Expand Down Expand Up @@ -138,6 +139,7 @@ def remove(directory: pathlib.Path):

remove(path / "server")
translatepy.server.make_docs(path / "server", localization=localization)
miko.markdown.make_docs(pathlib.Path(translatepy.__file__), path / "reference")

logger.debug(f"Copying the main README to {docs_path / translatepy.ENGLISH.id / 'README.md'}")
shutil.copyfile(str(pathlib.Path(__file__).parent / "README.md"),
Expand Down
4 changes: 3 additions & 1 deletion docs/eng/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
> **Warning**
> You are currently on the `next` branch. This branch contains the most up-to-date code for `translatepy` but might be unstable and is not suitable for anything other than development.
### An aggregation of multiple translation API
## An aggregation of multiple translation API

***Translate, transliterate, get the language of texts in no time with the help of numerous APIs!***

![Social Banner](assets/Social%20Banner/Social%20Banner%20—%20Translation%20Input.png)

[![PyPI version](https://badge.fury.io/py/translatepy.svg)](https://pypi.org/project/translatepy/)
[![Downloads](https://static.pepy.tech/personalized-badge/translatepy?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/translatepy)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/translatepy)](https://pypistats.org/packages/translatepy)
Expand Down
5 changes: 5 additions & 0 deletions docs/eng/reference/__info__.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# *module* **__info__**

> [Source: ../../../translatepy/__info__.py @ line 0](../../../translatepy/__info__.py#L0)
Stores information on the current module version
141 changes: 141 additions & 0 deletions docs/eng/reference/exceptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# *module* **exceptions**

> [Source: ../../../translatepy/exceptions.py @ line 0](../../../translatepy/exceptions.py#L0)
A list of exceptions used throughout translatepy

## *class* **TranslatepyException**

> [Source: ../../../translatepy/exceptions.py @ line 5-9](../../../translatepy/exceptions.py#L5-L9)
### *attr* TranslatepyException.**LOG**

> [Source: ../../../translatepy/exceptions.py @ line 6](../../../translatepy/exceptions.py#L6)
## *class* **NoResult**

> [Source: ../../../translatepy/exceptions.py @ line 12-18](../../../translatepy/exceptions.py#L12-L18)
### *attr* NoResult.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 13](../../../translatepy/exceptions.py#L13)
### *attr* NoResult.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 14](../../../translatepy/exceptions.py#L14)
### *attr* NoResult.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 15](../../../translatepy/exceptions.py#L15)
## *class* **ParameterTypeError**

> [Source: ../../../translatepy/exceptions.py @ line 21-27](../../../translatepy/exceptions.py#L21-L27)
### *attr* ParameterTypeError.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 22](../../../translatepy/exceptions.py#L22)
### *attr* ParameterTypeError.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 23](../../../translatepy/exceptions.py#L23)
### *attr* ParameterTypeError.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 24](../../../translatepy/exceptions.py#L24)
## *class* **UnknownLanguage**

> [Source: ../../../translatepy/exceptions.py @ line 30-38](../../../translatepy/exceptions.py#L30-L38)
### *attr* UnknownLanguage.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 31](../../../translatepy/exceptions.py#L31)
### *attr* UnknownLanguage.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 32](../../../translatepy/exceptions.py#L32)
### *attr* UnknownLanguage.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 33](../../../translatepy/exceptions.py#L33)
## *class* **UnknownTranslator**

> [Source: ../../../translatepy/exceptions.py @ line 41-49](../../../translatepy/exceptions.py#L41-L49)
### *attr* UnknownTranslator.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 42](../../../translatepy/exceptions.py#L42)
### *attr* UnknownTranslator.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 43](../../../translatepy/exceptions.py#L43)
### *attr* UnknownTranslator.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 44](../../../translatepy/exceptions.py#L44)
## *class* **UnsupportedMethod**

> [Source: ../../../translatepy/exceptions.py @ line 52-58](../../../translatepy/exceptions.py#L52-L58)
### *attr* UnsupportedMethod.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 53](../../../translatepy/exceptions.py#L53)
### *attr* UnsupportedMethod.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 54](../../../translatepy/exceptions.py#L54)
### *attr* UnsupportedMethod.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 55](../../../translatepy/exceptions.py#L55)
## *class* **UnsupportedLanguage**

> [Source: ../../../translatepy/exceptions.py @ line 61-67](../../../translatepy/exceptions.py#L61-L67)
### *attr* UnsupportedLanguage.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 62](../../../translatepy/exceptions.py#L62)
### *attr* UnsupportedLanguage.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 63](../../../translatepy/exceptions.py#L63)
### *attr* UnsupportedLanguage.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 64](../../../translatepy/exceptions.py#L64)
## *class* **ServiceURLError**

> [Source: ../../../translatepy/exceptions.py @ line 70-76](../../../translatepy/exceptions.py#L70-L76)
### *attr* ServiceURLError.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 71](../../../translatepy/exceptions.py#L71)
### *attr* ServiceURLError.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 72](../../../translatepy/exceptions.py#L72)
### *attr* ServiceURLError.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 73](../../../translatepy/exceptions.py#L73)
## *class* **RateLimitPrevention**

> [Source: ../../../translatepy/exceptions.py @ line 79-82](../../../translatepy/exceptions.py#L79-L82)
### *attr* RateLimitPrevention.**STATUS_CODE**

> [Source: ../../../translatepy/exceptions.py @ line 80](../../../translatepy/exceptions.py#L80)
### *attr* RateLimitPrevention.**MESSAGE**

> [Source: ../../../translatepy/exceptions.py @ line 81](../../../translatepy/exceptions.py#L81)
### *attr* RateLimitPrevention.**EXCEPTION_NAME**

> [Source: ../../../translatepy/exceptions.py @ line 82](../../../translatepy/exceptions.py#L82)
Loading

0 comments on commit 5f9a749

Please sign in to comment.