Giter Site home page Giter Site logo

dongfangxh / tikuadapter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dokidoki1103/tikuadapter

0.0 0.0 0.0 1.24 MB

大学生网课题库接口适配器:将不同的题库整合为一个API接口。

License: MIT License

Shell 0.13% JavaScript 4.28% Go 63.53% Vue 31.27% Dockerfile 0.78%

tikuadapter's Introduction

这是什么?

这是一个题库适配器,可以将各种的题库接口转换为统一的标准格式,同时这将会是 题库接口的一个规范

image.png

市面上有很多题库接口,比如您想要在 【万能】全平台自动答题脚本 使用言溪enncy题库您就可以通过此题库适配器轻松实现。

功能

1.支持多种题库接口输入源

排名顺序为免费优先于付费。

2.支持多种文件自动解析到题库

  • Word题库将您的word文档自动解析到本地数据库,方便您的搜索。

3. 支持多种输出源:

  • tikuAdapter标准格式 强烈推荐 您为您的软件适配标准格式
  • 微信公众号 微信开发者后台填写tikuAdapter的url即可

4.个性化配置

如何部署使用

自行部署

GitHub Releases 下载对应的版本,解压后运行即可

使用在线服务

在线服务均不能保证稳定性,并可能会泄漏您的Token,强烈建议自行部署。

  • 【v0.1.0-alpha.13】xmig提供 http://adapter.xmig6.cn/adapter-service/search

使用API接口

POST http://localhost:8060/adapter-service/search

请求体

{
  "question": "违反安全保障义务责任属于()",
  "options": [
    "公平责任",
    "特殊侵权责任",
    "过错推定责任",
    "连带责任"
  ],
  "type": 1 // 单选0多选1填空2判断3问答4
}

URL 请求参数

参数 描述 是否必须 示例值 Token获取方式
use 你想要使用哪些题库,不填写默认使用所有免费题库 local,icodef,buguake,wanneng
wannengToken 万能付费题库的Token值(10位) E196FD8B49 https://lyck6.cn/pay
icodefToken Icodef 题库Token值 UafYcHViJMGzSVNh 关注微信公众号"一之哥哥"发送"token"获取
enncyToken enncy 题库Token值 a21ae2403b414b94b512736c30c69940 https://tk.enncy.cn
aidianYToken 爱点题库(亿级题库API)Token值 cvor7f3HxZ7nF2M3ljmA https://www.51aidian.com
lemonToken 柠檬题库 Token值 8a3debe92e2ba83d6786e186bef2a424 https://www.lemtk.xyz

例如您想使用万能题库和icodef题库,您的url应为http://localhost:8060/adapter-service/search?use=wanneng,icodef&icodefToken=UafYcHViJMGzSVNh

响应示例

{
  "plat": 0,
  "question": "违反安全保障义务责任属于()",
  "options": [
    "公平责任",
    "特殊侵权责任",
    "过错推定责任",
    "连带责任"
  ],
  "type": 1,
  "answer": {
    "answerKey": [
      "B",
      "C"
    ],
    "answerKeyText": "BC",
    "answerIndex": [
      1,
      2
    ],
    "answerText": "特殊侵权责任#过错推定责任",
    "bestAnswer": [
      "特殊侵权责任",
      "过错推定责任"
    ],
    "allAnswer": [
      [
        "特殊侵权责任",
        "过错推定责任"
      ],
      [
        "A特殊侵权责任",
        "B过错推定责任"
      ]
    ]
  }
}

如何贡献

提出您的issue

将您的题库接口提issue我们为您增加上去。

提出您的pr

您可以参与开发,提交pr。

  • 您可以参考 internal/search/wanneng.go 来实现 internal/search/search.go接口
  • 编写 internal/search/search_test.go 来测试您的接口

贡献者

谢谢以下开源贡献者~

tikuadapter's People

Contributors

dokidoki1103 avatar olixn avatar xiaoming-spec avatar xuzhonglin12138 avatar

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.