semvec/pypi-packages huggingface dataset:
templatebot 1.0.3
A template Discord bot
License: MIT
Requires Python: >=3.6

# vcokltfre/template-bot-v2

## A rewrite of [TemplateBot](https://github.com/vcokltfre/TemplateBot) with improvements

Usage:
```py
from templatebot import Bot

bot = Bot(name="MyBot", command_prefix="!")
bot.load_initial_cogs() # Required, even when empty, to load the default cog and jishaku
bot.run("token")
```

### Logging

The bot has two types of logging, synchronoush and asynchronous. Generally speaking you will want to use async logging, since it won't block while you're running the bot, however if you're logging something before running the bot, you may want to use the sync methods. These methods can be accessed through `templatebot.Bot.logger`

```py
class WebhookLogger:
    ...

    ## Synchronous methods

    def debug_s(self, content):
        self.send("debug", content)

    def info_s(self, content):
        self.send("info", content)

    def warn_s(self, content):
        self.send("warn", content)

    def error_s(self, content):
        self.send("error", content)

    def critical_s(self, content):
        self.send("critical", content)

    ## Asynchronous methods

    async def debug(self, content):
        await self.send_async("debug", content)

    async def info(self, content):
        await self.send_async("info", content)

    async def warn(self, content):
        await self.send_async("warn", content)

    async def error(self, content):
        await self.send_async("error", content)

    async def critical(self, content):
        await self.send_async("critical", content)
```
font2img 2.2
Drawing glyph in font file (woff, tff ..)
License: MIT
Requires Python: >=3.5

# 安装

```Python
pip install font2img
```

# 使用

```Python
from font2img import ParseTTFFont

p = ParseTTFont("font_file.woff") # 载入当前目录下的 font_file.woff 字体文件
glyphnames = p.get_glyphnames() # 获取字体文件中所有有效字形的代号

# im 类型为 PIL.Image
im = p.one_to_image(glphnames[10]) # 获取第 11 个字形的图像
im.show()

# 将所有字形整合成一张图像, 所有图像类型为 PIL.Image
# image: 包含所有字形的图形
# name_list: 包含所有字形的代号
# image_dict: 各字形图像同其代号的字典
image, name_list, image_dict = p.all_to_image() 
```