Coder Social home page Coder Social logo

maimemo-export's Introduction

maimemo-export

中文含义并非导出自墨墨背单词,而是使用 ECDICT 的数据,无法做到与墨墨背单词一致。

用于导出墨墨背单词的词库,并生成适用于 List 背单词,不背单词,欧陆词典等的自定义词库

Usage

必须使用 Android 手机,并且必须 Root,小白勿试。后面有导出好的,直接下载。没有想要的可以去知乎付费咨询。

Install

需要 node v14

git clone https://github.com/ourongxing/maimemo-export.git
cd maimemo-export
pnpm i

Get Database

  1. 下载词典数据库,点击下载,解压得到 ultimate.db,放入 database 文件夹中(没有就自己新建)。
  2. 获取手机上的数据库文件,连接好手机,打开 USB 调试,命令行输入
    pnpm adb

Option

// src/index.ts
const exportThesaurus = async (
  // 词库名
  books: string[],
  // MaimemoDB 为本地词库,NotePad 为云词库
  db: MaimemoDB | NotePad,
  option?: ExportOpt
) => {
type ExportOpt = {
  // 导出文件类型
  types?: ("txt" | "csv" | "list")[] // default: ["txt","csv","list"]

  // 导出路径
  dir?: string // ./thesaurus

  // 1.词库中仅背过的单词 2.仅没背的单词 3. false 为全部
  memorized?: // default: false
    | {
        type: "memorized" | "unmemorized"
        data: string[]
      }
    | string[]
    | false

  // 1.仅单词 2.仅短语 3. true 为单词,false 为全部
  word?: "word" | "phrase" | boolean // default: false

  // 覆盖已有文件
  override?: boolean // default: false
  bookOpt?: BookOption
}
type BookOption = {
  // 1. 首字母 2. 书上默认顺序
  order?: "initials" | "book" // default: "book"

  // 顺序反转
  reverse?: boolean // default: false
}

Export

pnpm dev

Download

仓库内已经导出墨墨背单词所有本地词库,包括联网更新的词库,不包括云词库,多达上千种词库,可以在仓库中选择需要的下载(下载单个文件的方法),也可以去 蓝奏云 下载打包好的文件。

  • csv:带有中文含义,可导入 List 背单词。
  • list:带有 List 分组,可导入欧陆词典。
  • txt:仅单词,可导入不背单词。

Acknowledgements

  1. 导出方法来自于 怎么把墨墨背单词里的词库导出来? - 你说什么的回答
  2. 词典来自于 skywind3000/ECDICT-ultimate
  3. 词库来自于 墨墨背单词

License

MIT © ourongxing

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.