Coder Social home page Coder Social logo

echobot's Introduction

Hi, Satoshi Jek there.

Greetings friends! I'm Satoshi Jek (金光楠 as legal name*), an interest-driven programmer from China Mainland.

APPEAL: Technology neutrality mattered for FOSS communities.

About me

  • 🔭 Currently working on Python full-stack engineering.
  • 🌱 Currently learning: Python, TypeScript, Vue.js.
  • ⏳ Pending learning: Flutter.
  • 🌏 Speaking in Chinese (native), English, and Japanese (amateur).
  • 📫 Email me at [email protected].

Languages and tools

Python Visual Studio Code Git GitHub Actions

Language stats

* Though I showed my legal name up there, I'm not willing to be called with that name if we are not familiar enough. Just feel free to call me anything friendly you want except my legal name, appreciate it.


Satoshi Jek, we've done here.

Last updated: 6 Mar, 2022 (CST).

echobot's People

Contributors

jks15satoshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

fossabot

echobot's Issues

Bug:申请头衔时分析操作词词性错误导致申请失败

原因

对于申请头衔功能的部分操作词,jieba 对其的词性定义不一定是 v(动词),例如操作词“设置”即被判断为 vn(动名词)。然而在判断操作词类型时,由于只检查词性为 v 的词语,导致无法判断有效的操作词,因而导致申请失败。

for word, flag in words:
if flag == 'v':
action = word

解决方案

检查词性是否包含 v,以确保能够判断所有的操作词:

for word, flag in words:
    if 'v' in flag:
        action = word

同时进行异常处理,若判断无有效操作词(抛出 UnboundLocalError),宜由 bot 发送消息提示该消息指令无法被准确解析。

参考

编写文档

项目文档:

  • 项目文档(README.md
    (项目文档仅负责介绍项目概要,详细的功能介绍等应定向至项目官网。)
    • 项目介绍
    • 功能概要
    • 安装与使用方式
    • LICENSE
    • 开源程序协议列表(考虑定向至项目官网
  • 贡献规范(CONTRIBUTING.md
    (贡献规范负责介绍其他用户协助维护本项目时须知的注意事项。)
  • 社区行为准则(CODE_OF_CONDUCT.md待定
  • 项目开发规范(GUIDELINE.md
    (项目开发规范负责介绍项目开发细节时需遵守的基本规范,侧重开发规范。)

项目官网:
(规划中,计划使用 VuePress 作为页面框架。)

功能:通过 CLI 管理 bot

新增 CLI 管理模块,用户可以使用该模块实现 bot 初始化、插件管理、运行等功能。

使用 click 实现 CLI 管理模块,参考 nonebot/nb-cli 进行设计。(明目张胆地抄作业)

该模块面向 Echobot 使用者设计,目标是便于使用者配置与管理 Echobot;对于 Echobot 项目维护与 Echomod 开发,仍建议使用 nb-cli。

echobot

  • 初始化 bot:echobot init
    • 生成 .env.* 配置文件;
    • 从 pip 安装 Echomod;
    • 初始化加载插件。
  • 运行 bot:echobot (run | start)
    • 兼容以 nb (run | start) 运行 bot;
    • .env.* 不存在时进行初始化。
  • 部署至 Docker:echobot deploy#15
    • 兼容以 nb (deploy | up) 部署。
  • 更新 bot:echobot update
  • 可选参数:
    • 帮助信息:echobot [-h | --help]
    • 版本信息:echobot [-V | --version]

echomod

  • 管理 Echomod:
    • 安装/卸载 Echomod:
      echomod (add | install) <modname>
      echomod (remove | uninstall) <modname>
    • 启用/禁用 Echomod:echomod (enable | disable) <modname>
    • 显示 Echomod 状态:echomod list

适配 Nonebot v2.0.0a10

  • CLI 指令事件适配 on_shell_command
  • 分离一般指令事件与 CLI 指令事件。
  • 分离一般指令事件响应与数据获取逻辑,前者移至 __init__.py
  • 移除 utils.argv_parser

将风格化输出功能独立为插件

占位符应为一个由英字母、数字或下划线组成的占位符名称以及包围占位符名称的 $ 字符组成,例如 $PLACEHOLDER$。占位符名称不区分大小写,长度在 24 个字符以内。

  • styledstr 方法添加占位符替换参数。

将风格化输出功能独立为插件。

  • 将风格化输出功能独立为 nonebot-plugin-styledstr 插件。
  • 发布至 PyPI 和 Nonebot 插件广场。
  • 更改依赖关系。

功能:用户自定义 bot 昵称

用户可以设置自定义昵称,以使用自定昵称呼叫 bot。

  • 增加匹配用户自定义称谓的规则 to_me_custom
  • 兼容内置规则 to_me
  • 提供对应的 matcher 以便用户管理自定义称谓。

功能:提供 Docker 支持

为 bot 提供 Docker 支持。

  • 借助 GitHub Actions,当发布 Release 时自动发布 Docker image 至 GitHub Packages 和 Docker Hub。
    • 考虑区别 Pre-release 与 Stable 为不同的 image。

Echobot 1.0.0a1 更新规划

Echobot 1.0.0a1 功能特性冻结,除 bug 修复以外的 issue 不再新增至此列,未在此列出的 issue 将不在该版本予以处理。

重要变更与优化

  • 项目文件结构重构;
  • 提供合理的插件分发方式。

新功能

Bug 修复

该版本作为 Echobot 的首个版本提交至 PyPI,是否提交至 NoneBot 商店待定。

将冷却任务模块独立为插件

将冷却任务模块 (utils.cooldown) 独立为 Nonebot 插件,以便其他插件的调用。必要时可适当重写代码。

  • 定时任务换用 apscheduler 实现。
  • 上传插件至 PyPI 及 Nonebot 插件广场。
  • 添加 nonebot-plugin-cooldown 依赖。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.