Giter VIP home page Giter VIP logo

dedao-gui's Introduction

得到课程下载桌面端

wails + go + vue 构建的《得到》APP 课程下载桌面客户端

技术栈如下:

  1. wails快速入门
  2. Vue3.x
  3. Vue Router 4.x
  4. vue3 element-plus
  5. typeScript
  6. Vite
  7. pinia

GitHub go.mod Go version Go Report Card

特别声明

仅供个人学习使用,请尊重版权,内容版权均为得到所有,请勿传播内容!!!

仅供个人学习使用,请尊重版权,内容版权均为得到所有,请勿传播内容!!!

仅供个人学习使用,请尊重版权,内容版权均为得到所有,请勿传播内容!!!

特性

  • 展示首页内容
  • 可扫码登录
  • 可查看购买的课程,课程详情,课程文章列表,可播放课程音频
  • 可查看听书书架列表,听书文稿,可播放每天听本书音频
  • 可查看电子书架列表,电子书详情,书评,可加入书架
  • 可查看已购买的锦囊
  • 可查看知识城邦
  • 课程可生成PDF,文稿生成 Markdown 文档,也可生成 mp3 文件
  • 每天听本书可下载音频,文稿生成 pdf、 Markdown 文档
  • 电子书可下载 pdf,html, epub 等格式

注:

  1. 下载均在后台执行,下载完毕弹框会关闭,等待弹窗关闭或者点击确定下载后关闭,均会在后台执行下载程序。
  2. 如果遇到 496 NoCertificate 消息提示,请登录网页版进行图形验证码验证。
  3. 本应用上登录后再登录官方网页版会导致保存的 cookie 失效,使用 rm -rf ~/.config/dedao/config.json 删除配置信息后重新登陆本应用即可。

安装

构建请查看wails 文档

  1. 运行 go install github.com/wailsapp/wails/v2/cmd/wails@latest 安装 Wails CLI。
  2. clone 该项目,从项目目录,执行 wails build,即可构建二进制文件

安装依赖

wails 构建需要安装以下依赖:

  • Go 1.18+
  • NPM (Node 15+)

如果需要下载相应格式的内容,请按照下载需求,安装下列依赖:

pdf下载

  • google chrome

    课程生成 PDF 需要借助 Google-Chrome的渲染引擎

  • wkhtmltopdf

    电子书转 PDF 需要借助wkhtmltopdf

音频下载

  • ffmpeg

    音频需要借助 ffmpeg 合成

功能截图如下:

Stargazers over time

Stargazers over time

License

MIT © yann0917


dedao-gui's People

Contributors

dependabot[bot] avatar yann0917 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

dedao-gui's Issues

登录时候生成二维码失败

很长时间不用,需要重新 登录,就一直是生成失败了。具体是什么原因?
微信截图_20240416152338

此外,课程和电子书能不能增加一个搜索功能啊,经常找不到想下载的资源,谢谢!

无法登录, 没有QR Code, 烦请帮忙。 感恩!

大佬, 有个问题, 桌面版本没有QR code 去scan, 你在教程里说

本应用上登录后再登录官方网页版会导致保存的 cookie 失效,使用 rm -rf ~/.config/dedao/config.json 删除配置信息后重新登陆本应用即可。

我在node, npm, go 里输入这个指令都说找不到文件, 自己搜了C盘也没有找到这个 .config/dedao/config.json

请问如何解决, 感激不尽!

Windows登录生成的配置文件会在磁盘根目录,看着很别扭

config.go这个文件修改如下代码

// GetConfigDir config file dir
func GetConfigDir() string {
	configDir, ok := os.LookupEnv(EnvConfigDir)
	if ok {
		if filepath.IsAbs(configDir) {
			return configDir
		}
	}
	// 获取当前工作目录,即执行文件所在的目录
	currentDir, err := os.Getwd()
	if err != nil {
		// 如果无法获取当前目录,回退到默认逻辑
		home, ok := os.LookupEnv("HOME")
		if ok {
			return filepath.Join(home, ".config", "dedao")
		}

		return filepath.Join("/tmp", "dedao")
	}
	return filepath.Join(currentDir, "config") // 这里假设配置目录名为"config"
}

我给改成在执行文件的目录下,强迫症可以试试

Build时出现如下报错

`Done.
• Installing frontend dependencies: Done.
• Compiling frontend:
> [email protected] build
> vue-tsc --noEmit && vite build

✘ [ERROR] Expected "," in JSON but found "\"workspaces\""

    ../../../package.json:7:0:
      7 │ "workspaces": {
        │ ~~~~~~~~~~~~
        ╵ ,

failed to load config from /Users/xxxx/Downloads/dedao-gui-main/frontend/vite.config.ts
error during build:
Error: Build failed with 1 error:
../../../package.json:7:0: ERROR: Expected "," in JSON but found "\"workspaces\""
    at failureErrorWithLog (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1575:15)
    at /Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1033:28
    at runOnEndCallbacks (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1447:61)
    at buildResponseToResult (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1031:7)
    at /Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1143:14
    at responseCallbacks.<computed> (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:680:9)
    at handleIncomingPacket (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:735:9)
    at Socket.readFromStdout (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:656:7)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12)`

您好 请问我该怎么做

Done.
• Installing frontend dependencies: Done.
• Compiling frontend:
> [email protected] build
> vue-tsc --noEmit && vite build

'vue-tsc' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

ERROR exit status 1

ERROR exit status 1
Uploading e8f2565c2b6b8897c649c9e7bd64641.png…

能增加另外一种epub格式吗【把每章的注释放于每章后面】

现在的epub的注释都穿插在正文里了
如果某本的注释比较多,感觉有点影响阅读

比如这本【置身事内】
能增加另外一种epub格式吗【每章的注释放于每章后面】
【注释可以互相跳转:
把【注】这个图片换成【字体大一点】的1 2 3 4 5 6.......的数字【带超链接】,
具体注释依次列于每章后面,依次加上【字体大一点】的1 2 3 4 5 6.......的数字【也带超链接】,
点击1 2 3 4 5 6.......数字可以来回互相跳转

就像下面这个epub文件的注释一样
epub下载地址:
https://thanks.lanzn.com/i3nA71xjdxpa

另外1本【撒马尔罕的金桃】注释倒是1 2 3 4 5 6.......的这种形式,但是好像无法互相跳转

不支持Apple芯片?

M3 pro芯片编译完成打开闪退,换用intel芯片Macbook解决,似乎有这个缺陷

无法下载课程

登录以后,选择课程tab,点击下载,选择Makrdown格式,提示没有购买。进入章节列表,单独下载文稿是可以正常下载的。

image

无法保存文件

image

app运行的方式无法下载文件,提示信息如上。通过命令行执行./dedao-gui.app/Contents/MacOS/dedao-gui,可以正常下载。

epub下载不全,少了一章

“计算机程序的构造和解释 JavaScript版”这本书下载epub,少了最后一章;下载PDF版本则是正常的。

编译报错

• Compiling frontend:
> [email protected] build
> vue-tsc --noEmit && vite build

src/main.ts(16,9): error TS2345: Argument of type 'Pinia' is not assignable to parameter of type 'Plugin_2'.
  Type 'Pinia' is not assignable to type '{ install: PluginInstallFunction; }'.
    Types of property 'install' are incompatible.
      Type '(app: App<any>) => void' is not assignable to type 'PluginInstallFunction'.
        Types of parameters 'app' and 'app' are incompatible.

......

Build时报错

[commonjs--resolver] Failed to resolve entry for package "vue". The package may have incorrect main/module/exports specified in its package.json.
检查了/dedao-gui-main/node_modules/vue-tsc/package.json
内容为
{
"name": "vue-tsc",
"version": "1.8.22",
"main": "out/index.js",
"license": "MIT",
"files": [
"bin",
"out//*.js",
"out/
/.d.ts"
],
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
"directory": "packages/tsc"
},
"bin": {
"vue-tsc": "./bin/vue-tsc.js"
},
"dependencies": {
"@volar/typescript": "~1.10.5",
"@vue/language-core": "1.8.22",
"semver": "^7.5.4"
},
"peerDependencies": {
"typescript": "
"
},
"gitHead": "1e8d09af0282c42dd816671ffcd5a2321276e3c3"
}
没有发现错误的地方

想请问一下这个 wails buid 报错怎么处理

夸夸up主,这个功能真的很需要。个人不是学习开发的,不太能理解这个问题,想请问一下该怎么处理。

dedao-dl login -q
这种方式好像是可以的,但不是界面模块,个人使用起来有些难度。

问题描述:
使用 MacBook Air M2 在 iterm2 中进行 wails build 时,有如下错误信息,想请教一下怎么更改,或者能使用什么方法进行解决。
使用 wails dev 也会报错。

不确定是环境配置问题,还是流程上有错误。

Done.
• Installing frontend dependencies: Done.
• Compiling frontend:
> [email protected] build
> vue-tsc --noEmit && vite build

src/components/QrLogin.vue(89,1): error TS2322: Type 'Timer' is not assignable to type 'number'.

ERROR exit status 2

ERROR exit status 2

扫码登录的二维码无法正常显示(加载失败)

环境:Windows
系统:Windows 11
go版本:go1.12.5
dedao-gui版本:最新
问题出现频率:从过年至今

不知道为什么,GUI端的二维码不能显示(dedao-dl能够显示二维码并且正常使用)。

同时打开dedao.cn,官网的二维码能够正常显示。

但是客户端的GUI就无法显示,希望作者能够帮忙找到问题。

image

大神,能帮忙看看问题出现在哪吗

PS C:\Users\Administrator\myproject\dedao-gui-main\dedao-gui-main> wails build
Wails CLI v2.7.1

Build Options

Platform(s) | windows/amd64
Compiler | C:\Program Files\Go\bin\go.exe
Skip Bindings | false
Build Mode | production
Devtools | false
Frontend Directory | C:\Users\Administrator\myproject\dedao-gui-main\dedao-gui-main\frontend
Obfuscated | false
Skip Frontend | false
Compress | false
Package | true
Clean Bin Dir | false
LDFlags |
Tags | []
Race Detector | false
Warning: go.mod is using Wails '2.6.0' but the CLI is 'v2.7.1'. Consider updating your project's go.mod file.

Building target: windows/amd64

• Generating bindings: ERROR
go: downloading golang.org/x/exp v0.0.0-20231006140011-7918f672742d
go: downloading github.com/labstack/echo/v4 v4.11.2
go: downloading github.com/go-ole/go-ole v1.3.0
go: downloading github.com/google/uuid v1.3.1
go: github.com/PuerkitoBio/[email protected] requires
github.com/andybalholm/[email protected]: Get "https://proxy.golang.org/github.com/andybalholm/cascadia/@v/v1.3.1.mod": dial tcp 142.251.43.17:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

      exit status 1

ERROR
go: downloading golang.org/x/exp v0.0.0-20231006140011-7918f672742d
go: downloading github.com/labstack/echo/v4 v4.11.2
go: downloading github.com/go-ole/go-ole v1.3.0
go: downloading github.com/google/uuid v1.3.1
go: github.com/PuerkitoBio/[email protected] requires
github.com/andybalholm/[email protected]: Get "https://proxy.golang.org/github.com/andybalholm/cascadia/@v/v1.3.1.mod": dial tcp 142.251.43.17:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

      exit status 1

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.