发个 txt 小说阅读器
Tofloor
poster avatar
走钢丝
deepin
2020-10-12 22:42
Author
本帖最后由 lidanger 于 2020-10-26 18:59 编辑

以前一直通过 wine 用 Windows 下的一个 txt 小说阅读器,后来发现多次死机的时候都有这个程序运行,猜测或许真与它有关,就想着模仿着做一个 linux 版的。十一的时候开撸。本来以为不到一周就能做完的,结果搞了两个星期。眼高手低啊。不过这次算少的了,过去很多时候做项目花的时间比预计的要多好几倍。

主界面如下,比较简单,按钮也没有加图标。




支持快捷键



项目地址:https://gitee.com/lidanger/listera-novelreader

deb 安装包
listera-novelreader_1.1.9-4_amd64.zip

UOS 个人版也可用的包

listera-novelreader_1.2.0-1_amd64.deb


软件适用于 deepin v20 和 uos 个人版。已上架星火商店,也可以从商店下载。


Reply Favorite View the author
All Replies
2 / 2
To page
ghostry
deepin
2020-10-16 16:39
#21
https://bbs.deepin.org/post/203700
添加书签那个复现了。不过,第一次导入文件闪退这个,没重现出来。

源码哪个位置能说下吗?

c我不是很懂.
Reply View the author
走钢丝
deepin
2020-10-16 16:48
#22
https://bbs.deepin.org/post/203700
源码哪个位置能说下吗?

c我不是很懂.

bookbrowser 这个类,里面有个私有函数 _bookPaging。
其实什么 c 与 java、c#、js 都是一类语言,风格类似,刚看找不到主要是不熟悉代码结构。

Reply View the author
ghostry
deepin
2020-10-16 20:06
#23
https://bbs.deepin.org/post/203700
bookbrowser 这个类,里面有个私有函数 _bookPaging。
其实什么 c 与 java、c#、js 都是一类语言,风格类 ...
  1. do
  2.     {
  3.         auto pos = _file->pos();
  4.         auto line = _file->readLine();
  5.         auto txt = _codec->toUnicode(line).trimmed();

  6.         if(is_toc_item(txt))
  7.         {
  8.             _page_titles.push_back(txt);
  9.             _page_poses[txt] = pos;
  10.         }

  11.     } while(!_file->atEnd())
Copy the Code

是这一段吧 , 看着像循环读行,然后用 is_toc_item 去检查字符,符合的记下位置.

is_toc_item 中检查是否 第 字开头,后边是否有 章 等字,

这种的效率如何 ,比如读取一个20MB的txt会用多久.
Reply View the author
走钢丝
deepin
2020-10-16 20:29
#24
本帖最后由 lidanger 于 2020-10-16 12:30 编辑
https://bbs.deepin.org/post/203700
是这一段吧 , 看着像循环读行,然后用 is_toc_item 去检查字符,符合的记下位置.

is_toc_item 中检查是否 ...

应该需要 0.7 秒左右吧

你自己不会试试。这种事儿没必要来问我吧。
Reply View the author
a***1@163.com
deepin
2020-10-16 20:43
#25
支持原创啊,牛批了老哥
Reply View the author
ghostry
deepin
2020-10-16 21:57
#26
本帖最后由 ghostry 于 2020-10-16 13:59 编辑
https://bbs.deepin.org/post/203700
应该需要 0.7 秒左右吧

你自己不会试试。这种事儿没必要来问我吧。

谢谢谢谢,

主要是懒.
你这个应该也可以加上文本转语音功能,百度有提供免费接口, https://ai.baidu.com/ai-doc/SPEECH/fk38y8hqo
Reply View the author
走钢丝
deepin
2020-10-17 00:50
#27
https://bbs.deepin.org/post/203700
谢谢谢谢,

主要是懒.

这个还是你搞吧,我搞这个够用就行。那天心血来潮再搞吧。
Reply View the author
jiutian123
deepin
2020-11-11 08:00
#28

安装成功了 但是打不开 没反应  uos

Reply View the author
走钢丝
deepin
2020-11-11 16:29
#29
jiutian123

安装成功了 但是打不开 没反应  uos

不好意思。这个软件没有适配 uos,所以 uos 下可能无法运行。

如果有兴趣,可以下载源代码自己搞下看看。


Reply View the author
jiutian123
deepin
2020-11-12 02:23
#30
走钢丝

不好意思。这个软件没有适配 uos,所以 uos 下可能无法运行。

如果有兴趣,可以下载源代码自己搞下看看。


代码编译 就是适配么?

Reply View the author
走钢丝
deepin
2020-11-21 21:49
#31
jiutian123

代码编译 就是适配么?

刚修复一个 bug 顺便在 uos 上打了个包,你还有兴趣的话可以试试。


https://gitee.com/lidanger/listera-novelreader/attach_files/526565/download/listera-novelreader_1.2.0-1_amd64.deb


Reply View the author
jiutian123
deepin
2020-11-21 21:58
#32
走钢丝

刚修复一个 bug 顺便在 uos 上打了个包,你还有兴趣的话可以试试。


https://gitee.com/lidanger/listera-novelreader/attach_files/526565/download/listera-novelreader_1.2.0-1_amd64.deb


可以打开,好像缺少搜索功能 ,字体放大缩小,

Reply View the author
走钢丝
deepin
2020-11-21 22:12
#33
jiutian123

可以打开,好像缺少搜索功能 ,字体放大缩小,

我刚试了可以啊。可能你需要工具栏?可以在左侧书库标题栏上点右键来选择。另外,选择文字后右键是有搜索的。



Reply View the author
绿竹
deepin
2021-12-04 03:04
#34
It has been deleted!
绿竹
deepin
2021-12-04 03:09
#35
It has been deleted!
2 / 2
To page