Giter VIP home page Giter VIP logo

api_button-personnal's Introduction

Api按钮 / Api BUTTON

本项目基于https://github.com/blacktunes/kaguranana-button 修改而成

相关链接:

参与完善本项目

  • 您可以在Issues提出您的建议。

    • 若是请求添加新语音,请使用指定的issues模板
  • 如果您可以进行开发,那么请Fork本项目进行修改,完成修改后在本项目中发起一个Pull Request,详细说明请查看以下条目

添加或修改音频/完善翻译

音频文件推荐使用mp3格式,请先音量标准化,然后放入public/voices/目录

所有的音频信息都存储在src/setting/translate/voices.json中,添加或修改音频信息完善翻译,你同样需要修改这个文件中对应的内容

  • 添加usePicture字段可以添加鼠标悬浮时显示的图片(请放到public/voices/img目录)

  • 添加mark字段可以添加音频出处信息

voices.json结构示例如下:

{
  // 语音分类列表
  "category": [
    {
      // 分类命名
      "name": "分类名",
      "translate": {
        // 分类中文翻译
        "zh-CN": "分类中文名",
        // 分类英文翻译
        "en-US": "name"
      }
    }
  ],
  // 语音列表
  "voices": [
    {
      // 语音命名
      "name": "123",
      // 语音文件名
      "path": "123.mp3",
      "translate": {
        // 语音中文翻译
        "zh-CN": "一二三",
        // 语音英文翻译
        "en-US": "123"
      },
      // 语音所属分类(对应category的name)
      "category": "名言",
      // 以下属性为可选
      // 添加时间
      "date": "2020-11-11",
      // 语音出处
      "mark": {
        "title": "【XX】xxxxxxXXX",
        "time": "0:01~0:03",
        "url": "https://www.bilibili.com/video/BVXXXXXX"
      }
    }
  ]
}

参与网页开发

本项目使用Vue3.0进行开发,使用yarn进行包管理 要部署本地开发环境,请先安装较新版的Node

  1. ForkClone代码到本地
  2. 进入代码目录,运行yarn以安装依赖项目
  3. 开启本地开发服务器,运行yarn serve,这将会在localhost:8080启动,在代码修改过程中,本地开发服务器可以即时反映修改的结果
  4. 要编译可供部署的文件,请运行yarn build,这将会在dist目录下生成可以直接部署到静态网站托管(GitHub Pages等)或服务器的文件

使用模板

若想使用网站模板开发新的语音按钮,可以选择以下方式:

  • 修改publicscr/setting目录下的文件以及package.json

api_button-personnal's People

Contributors

dys763 avatar sakura18017 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.