Skip to main content

maida

目前:

  1. 用于发送邮件
  2. 小说图片转文字

安装

可以直接 pip 安装

pip install maida

mail

EmailSender

基于 smtplib 的发送邮件脚本

1. 可以发送文本
2. 可以发送图片
3. 可以发送附件(图片、文件等),附件文件名可以包含中文
4. 可以群发邮件
5. 可以设置邮件优先级(如标红)

demo

from maida import EmailSender

email_sender = EmailSender(email_host='smtp.qq.com', email_port=465, from_addr='xxx@qq.com', email_pass='xxx')
content = '这是 maida 发送过来的邮件。请注意查收!'
email_sender.attach_text(text=content)
email_sender.attach_file(r'C:\xxx\xx.jpg')
email_sender.attach_file(r'C:\xxx\xx.txt')
email_sender.send(to_addrs=['xxx@qq.com'], subject='测-试')

ocr【可选】

安装方式

pip install maida[ocr]

win 平台安装时若报 python-levenshtein 安装失败请根据提示安装相应环境

或在 https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-levenshtein 使用 whl 安装

img_2_cn

基于 cnocr 的小说图片转中文文字脚本

这里提供了一个来源于网上的小说图片样例

可以看出识别效果还是不错的

demo

from maida.ocr import img_2_cn

print(img_2_cn('xxx.gif'))

版本历程

详见 history.md

Release files for maida 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maida 0.2.1
File Size Uploaded
maida-0.2.1.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maida 0.2.1
File Interpreter ABI Platform
maida-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / maida-0.2.1.tar.gz

Download URL maida-0.2.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f0ca1a0ee9e159b1a6891a206eaeb7c1d05735b10f6768f605c0bc9d027fea46
BLAKE2b-256 checksum
How to use checksums
d86aa9dda7e5e6013bdb32bf7b18e30e2d96514b31d88f9ac25bd9aa1d4d593c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / maida-0.2.1-py3-none-any.whl

Download URL maida-0.2.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58ddc0de2421812af5bd2e0e09b3638924efd874ad50b856f2afb75f6a24e54a
BLAKE2b-256 checksum
How to use checksums
ee465c78ebecdf27cecb2005b792682438f8d4b08a1a94bdee7d81cd18842927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2

2 release files

0.1.17

2 release files

0.1.14

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page