Coder Social home page Coder Social logo

mqycn / huile8 Goto Github PK

View Code? Open in Web Editor NEW
279.0 279.0 24.0 259 KB

英语差等生必备的 vscode 插件,解决 单词不会读、单词不认识的痛点

Home Page: https://marketplace.visualstudio.com/items?itemName=mqycn.huile8

JavaScript 16.45% HTML 83.55%

huile8's Introduction

会了吧

还在因为 变量中 包含不认识的单词 头大吗?

还在因为 看不懂 英文注释/文档 掉头发吗 ?

还在因为 各种机器翻译的内容 云里雾里吗 ?

您的救星来了!!!用了“会了吧”,轻松“学会啦”

使用流程

安装后,点击源码文件,会自动分析所有包含的单词,不在 已掌握单词列表 中的单词会自动添加到 陌生单词 列表

使用教程

单词后面可以显示 单词解释

鼠标悬停可以显示 音标和解释

点击单词可以朗读本单词

使用教程

已掌握单词列表文件

已掌握单词列表文件 中的单词,不会在 陌生单词 列表中显示

自动处理

陌生单词 中的单词,点击 图标 可以 将 单词添加到 已掌握单词列表文件

已掌握单词 中的单词,点击 图标 可以 将 单词 从 已掌握单词列表文件 中 删除

使用教程

禅模式

点击朗读的单词,会自动添加到当日的 单词列表 ,禅模式会循环朗读列表中的参数

使用教程

手工设置

也可以手工编辑 [用户目录]/.vscode/huile8-mastered-list.txt ,设置已掌握单词:

console
log
hello
world

离线词库

skywind3000/ECDICT

fxsjy/diaosi

功能实现

  • 源码单词分析
  • 点击播放读音
  • 悬停显示单词解释
  • 禅模式(循环播放陌生单词)
  • 陌生单词列表

二次开发

# 0、安装VS Code开发环境
npm install -g yo generator-code vsce

# 1、代码克隆
git clone https://github.com/mqycn/huile8.git

# 2、更新词库 (从 gitee.com 获取词库)
npm run dict.init
npm run dict.update

# 如果从 github.com 获取词库,请执行
npm run dict.init-github
npm run dict.update

# 3、vscode 调试
# 按 F5 启动调试

# 4、打包
npm run publish

huile8's People

Contributors

mqycn avatar zsedcbm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

huile8's Issues

能否采用有道词典发音更换现有发音方式

经过阅读作者源码,发现发音方式是通过SpeechSynthesisUtterance合成发音的。

有没有可能使用一些词典的API来发音呢?这样发音会更好听一些

例如有道的API:http://dict.youdao.com/dictvoice?type=0&audio=analogue

例如下列方式

<h1>请点击标签切换到代码页</h1>
<video id="video" controls="" autoplay name="media">
    <source src="http://dict.youdao.com/dictvoice?type=0&amp;audio=analogue">
</video>
<script>
    const $ = (selector) => {
        return document.querySelector(selector)
    }

    const vscode = acquireVsCodeApi();
    window.addEventListener('message', event => {
        log('测试event', event.data)
        $('video').play()
        const word = event.data;
        const utterance = new SpeechSynthesisUtterance(word);
        speechSynthesis.speak(utterance);
        vscode.postMessage(event.data);
    });
</script>

但我研究发现好像vscode无法支持音频格式播放,microsoft/vscode#54097

这块有可解决的空间吗或者别的思路?

单词显示异常

1
个别单词下拉显示异常,读取到了单词但无法显示。

点击无法播放声音

------- vscode版本信息 -------
版本: 1.42.1 (user setup)
提交: c47d83b293181d9be64f27ff093689e8e7aed054
日期: 2020-02-11T14:45:59.656Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.16299

------- 插件版本 -------
[v0.0.9] (2020-9-8)

------- 问题 -------
点击无法播放声音

"单词朗读页面" 也集中到侧边栏 , 会不会显示效果更好?

我就是有点强迫症,单独多出一个标签"单词朗读页面" 挺不习惯的, 如果要朗读,就不能关了.

所以我在想 是否 可以 集中到 和侧边栏一起? 这样也不会多出一个标签?

当然是个人建议! 最终还是看大众的意思!

如果不行也没事! 冒昧建议,非常抱歉! 多有叨唠, 我在这里先对您说声:"对不起".

QQ截图20230311125548

单词列表显示异常

近期Visual Studio Code自动更新版本后(已知1.72.0-1.72.2都会导致此问题,现在1.72.2是最新版本)会导致单词列表显示异常 例如#26
目前回退Visual Studio Code1.71.2则可正常显示。希望可以及时适配新版本。

建议增加每日一篇英文新闻功能

老哥你这个扩展非常有趣, 不过自己写的代码内出现的英文都是知道意思的, 不如增加每天一篇BBC新闻, 在Vscode中学英语, 岂不快哉?

增加查找或定位功能

陌生单词几百个的情况下,从编辑框不好快速定位到某个单词,建议增加搜索框或点击单词后生词部分会自动选择。

点击播放读音功能失效

VSCode1.76.0版本中(不确定是否是版本原因导致 有一段时间没用了) 点击单词播放读音功能,会出现朗读页面 但是没有发声。

老哥每次都要分析一次有哪些单词不好吧

建议增加对已翻译单词的记录,可以给文件建立一个数据结构用来保存已经分析过的单词。对于当前文件的新增内容,可以保存文档末尾的行数,并检查是否增加新行来判断是否有新的行产生,对新行的代码进行分析。还有就是已经学会的单词,可以作为减少分析次数的依据

单词列表显示异常

近期Visual Studio Code自动更新版本后(已知1.72.0-1.72.2都会导致此问题,现在1.72.2是最新版本)会导致单词列表显示异常 例如#26
目前回退Visual Studio Code1.71.2则可正常显示。希望可以及时适配新版本。

按钮显示问题

图1
图2

侧边栏达到650像素宽度的时候,按钮才能显示出来。这个宽度也过宽了吧。
电脑用的big sur 11.6

Version: 1.61.1 (Universal)
Commit: c13f1abb110fc756f9b3a6f16670df9cd9d4cf63
Date: 2021-10-14T01:23:30.274Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.6.0

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.