Skip to content

Commit

Permalink
v1.5
Browse files Browse the repository at this point in the history
[+] support customizing fonts
[*] remove regex title character limit
  • Loading branch information
henryxrl committed Oct 16, 2024
1 parent b832d49 commit 4ac4330
Show file tree
Hide file tree
Showing 18 changed files with 602 additions and 99 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**/KX_47043_14.woff
**/dist/
# **/publish_extension.py
.vscode/

# Ignore Mac DS_Store files
**/.DS_Store
Expand Down
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

![主界面](assets/4_bookshelf1.png)

易笺是一款简单纯粹的文本文件阅读器(Web App)
易笺是一款简单纯粹的文本文件阅读器(Web App)

官网: [https://reader.yijian.app](https://reader.yijian.app)

Expand All @@ -21,6 +21,7 @@
## 特性

1. 百兆文件秒开,支持自动识别文件编码(我在国外系统是英文,打开中文小说简直是痛苦)

2. 中英文小说名、作者名自动识别:

`《书名》作者:作者名.txt`
Expand All @@ -30,12 +31,19 @@
`Bookname by author.txt`

3. 中英文标题正则自动识别 —— 自信的说,标题抓取几乎很少有超过易笺的了,看官们可以自行和别的阅读器对比

4. 支持自动抓取小说中的脚注(支持的脚注格式可以参考我修改的《逍遥游》[百度网盘|提取码: qehd](https://pan.baidu.com/s/1p8WAzB8dMWW7WH6Acf3Ulw?pwd=qehd)

5. 界面语言随着拖进来的文件而改变(中英自动切换,别的语言咱也不会……)

6. 自动去除文字中的一些广告,目前只对塞班和知轩藏书的小说进行了优化

7. 自动制作扉页,显示识别出的标题名和作者名,再戳上一个藏书章(中英文藏书章是不同的哦!)

8. 自动储存阅读进度,精确到每一行!

9. 书架功能,自动生成书籍封面

10. 颜值高,颜值高,颜值高

## 重大更新
Expand All @@ -52,21 +60,23 @@

### v1.1

易笺可以在任何基于 Chromium 内核的浏览器里安装为 PWA 应用
易笺可以在任何基于 Chromium 内核的浏览器里安装为 PWA 应用

### v1.2

![黑暗模式](assets/2_darkmode.png)
支持暗黑模式

![黑暗模式](assets/2_darkmode.png)

### v1.3

支持行高,字体大小,主题颜色等参数的自定义

<div float="left">
<img src="assets/3_settings1.png" width="30%" />
<img src="assets/3_settings2.png" width="37.4%" />
<img src="assets/3_settings3.png" width="30%" />
</div>
支持行高,字体大小,主题颜色等参数的自定义

### v1.4

Expand Down Expand Up @@ -109,19 +119,25 @@
<img src="assets/4_bookshelf4_zh.png" width="49%" />
</div>

### v1.5

1. 支持设置书籍的标题字体和正文字体

2. 移除了检测章节标题的字符限制

## 使用

火狐插件:

1. [易笺正常版 (v1.4.9.1)](https://addons.mozilla.org/zh-CN/firefox/addon/yijian/)
1. [易笺正常版 (v1.5)](https://addons.mozilla.org/zh-CN/firefox/addon/yijian/)

2. [易笺无界面版 (v1.2.8.1)](https://addons.mozilla.org/zh-CN/firefox/addon/yijian_nogui/)
2. [易笺无界面版 (v1.2.9)](https://addons.mozilla.org/zh-CN/firefox/addon/yijian_nogui/)

Chrome插件:

1. [易笺正常版 (v1.4.9.1)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA/dbanahlbopbjpgdkecmclbbonhpohcaf?hl=en&authuser=0)
1. [易笺正常版 (v1.5)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA/dbanahlbopbjpgdkecmclbbonhpohcaf?hl=en&authuser=0)

2. [易笺无界面版 (v1.2.8.1)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA%EF%BC%88%E6%97%A0%E7%95%8C%E9%9D%A2%E7%89%88%EF%BC%89/mifnkjlmnnaamfgmhmjdjiplaaladjlo?hl=en&authuser=0)
2. [易笺无界面版 (v1.2.9)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA%EF%BC%88%E6%97%A0%E7%95%8C%E9%9D%A2%E7%89%88%EF%BC%89/mifnkjlmnnaamfgmhmjdjiplaaladjlo?hl=en&authuser=0)

---

Expand Down
28 changes: 22 additions & 6 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Big thanks to [Manjusaka](https://github.com/Zheaoli) for his amazing help and h
## Highlights

1. Open large text files in a split second; automatic detection of text encoding

2. Auto detection of file name:

`《书名》作者:作者名.txt`
Expand All @@ -30,12 +31,19 @@ Big thanks to [Manjusaka](https://github.com/Zheaoli) for his amazing help and h
`Bookname by author.txt`

3. Auto detection of chapter titles using Regular Expressions

4. Auto styling of footnotes

5. UI language depends on the text file opened in SimpleTextReader (English vs. Chinese)

6. Auto detection and removal of text ads in the file

7. Auto generation of book seal stamps for fun

8. Auto save reading process

9. Auto generation of book cover arts in the bookshelf

10. Modern-looking UI design

## Important Updates
Expand All @@ -56,17 +64,19 @@ Now SimpleTextReader can be installed as a PWA in supported browsers (Chromium-b

### v1.2

![Darkmode](assets/2_darkmode.png)
Enable dark mode.

![Darkmode](assets/2_darkmode.png)

### v1.3

Support for customized settings such as font size, line height, theme colors and much more.

<div float="left">
<img src="assets/3_settings5.png" width="31%" />
<img src="assets/3_settings4.png" width="34%" />
<img src="assets/3_settings6.png" width="31%" />
</div>
Support for customized settings such as font size, line height, theme colors and much more.

### v1.4

Expand Down Expand Up @@ -109,21 +119,27 @@ Support for customized settings such as font size, line height, theme colors and
<img src="assets/4_bookshelf4_en.png" width="49%" />
</div>

### v1.5

1. Support customizing fonts for book title and body.

2. Removed the character limitation for detecting chapter titles.

## Usage

### Download from online stores

Firefox:

1. [Regular (v1.4.9.1)](https://addons.mozilla.org/en-US/firefox/addon/yijian/)
1. [Regular (v1.5)](https://addons.mozilla.org/en-US/firefox/addon/yijian/)

2. [No-UI (v1.2.8.1)](https://addons.mozilla.org/en-US/firefox/addon/yijian_nogui/)
2. [No-UI (v1.2.9)](https://addons.mozilla.org/en-US/firefox/addon/yijian_nogui/)

Chrome:

1. [Regular (v1.4.9.1)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA/dbanahlbopbjpgdkecmclbbonhpohcaf?hl=en&authuser=0)
1. [Regular (v1.5)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA/dbanahlbopbjpgdkecmclbbonhpohcaf?hl=en&authuser=0)

2. [No-UI (v1.2.8.1)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA%EF%BC%88%E6%97%A0%E7%95%8C%E9%9D%A2%E7%89%88%EF%BC%89/mifnkjlmnnaamfgmhmjdjiplaaladjlo?hl=en&authuser=0)
2. [No-UI (v1.2.9)](https://chrome.google.com/webstore/detail/%E6%98%93%E7%AC%BA%EF%BC%88%E6%97%A0%E7%95%8C%E9%9D%A2%E7%89%88%EF%BC%89/mifnkjlmnnaamfgmhmjdjiplaaladjlo?hl=en&authuser=0)

---

Expand Down
27 changes: 24 additions & 3 deletions css/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ dialog::backdrop {
padding: 10px 0px;
overflow-y: unset !important;
display: flex;
justify-content: center; /* Align horizontal */
/* justify-content: center; /* Align horizontal */
align-items: center; /* Align vertical */
}
.settingItem-span {
Expand Down Expand Up @@ -598,15 +598,19 @@ input[type="color"]:not(:hover) {
border-radius: 5px;
-webkit-box-shadow: var(--shadowColor) 0 0 5px;
-moz-box-shadow: 0 0 5px var(--shadowColor);
max-height: 150px;
overflow-y: auto;
}
.select-options li {
margin: 0;
padding: 10px 0;
/* padding: 10px 0; */
padding: 8px 10px;
/* text-indent: 15px; */
background-color: color-mix(in srgb,var(--bgColor),#000 0%);
transition: all 0.15s ease-in;
border-radius: 5px;
text-align: center;
/* text-align: center; */
font-size: 0.95rem;
}
.select-options li:hover,
.select-options li .is-selected {
Expand All @@ -616,6 +620,23 @@ input[type="color"]:not(:hover) {
.select-options li[rel="hide"] {
display: none;
}
/* Style the optgroup labels differently */
.optgroup-label {
color: var(--fontInfoColor);
font-size: 0.8rem !important;
padding: 0;
margin: 0;
/* font-weight: bold; */
cursor: default;
/* padding: 8px 15px; */
/* background-color: #f0f0f0; */
/* margin-top: 5px; */
pointer-events: none;
}
.optgroup-option {
/* padding-left: 20px; */
cursor: pointer;
}


/* Book Shelf */
Expand Down
75 changes: 66 additions & 9 deletions css/ui_variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@
url(../fonts/FZKTK.woff2) format('woff2'); /* Fallback */
font-display: swap;
}
@font-face {
font-family:"fzkai";
src:local("方正楷体"), local("FZKai"), local("FZKaiTi"), local("FZKai-Z03S"),
url(../fonts/FZKTK.woff2) format('woff2');
font-display: swap;
}
/* @font-face {
font-family:"康熙字典體傳承版";
src:local("康熙字典體傳承版"),
url(../fonts/KX_47043_14.woff) format('woff');
font-display: swap;
} */
/* @font-face {
font-family:"方正宋刻本秀楷_GBK";
src:local("方正宋刻本秀楷_GBK"),
url(../fonts/FZSKBXKK.woff2) format('woff2');
font-display: swap;
} */



:root {
Expand Down Expand Up @@ -131,11 +130,32 @@
--ui_darkMode_fontColor_en: "Dark Mode Font Color";
--ui_darkMode_bgColor_zh: "夜间背景颜色";
--ui_darkMode_bgColor_en: "Dark Mode BG Color";
--ui_title_font_zh: "标题字体";
--ui_title_font_en: "Title Font";
--ui_body_font_zh: "正文字体";
--ui_body_font_en: "Body Font";
--ui_pagination2pageBottom_dist_zh: "分页条与底部距离";
--ui_pagination2pageBottom_dist_en: "Pagination-Bottom Distance";
--ui_pagination_opacity_zh: "分页条透明度";
--ui_pagination_opacity_en: "Pagination Opacity";

/* UI font settings strings */
--ui_font_group_system: "";
--ui_font_group_system_zh: 系统字体;
--ui_font_group_system_en: OS Font;
--ui_font_group_custom: "";
--ui_font_group_custom_zh: 易笺字体;
--ui_font_group_custom_en: WebApp Font;
--ui_font_ui_label: "";
--ui_font_ui_label_zh: 霞鹜文楷;
--ui_font_ui_label_en: LXGW WenKai;
--ui_font_title_label: "";
--ui_font_title_label_zh: 黄令东齐伋复刻体;
--ui_font_title_label_en: QIJIC;
--ui_font_body_label: "";
--ui_font_body_label_zh: 方正宋刻本秀楷;
--ui_font_body_label_en: FZSongKeBenXiuKai;

/* UI bookshelf strings */
--ui_tooltip_removeBook: "";
--ui_tooltip_removeBook_zh: 删除书籍;
Expand Down Expand Up @@ -233,12 +253,14 @@

/* Font variables */
--fontFamily_title: "";
--fontFamily_title_zh: title, ui;
--fontFamily_title_zh: title;
--fontFamily_title_en: ui;
--fontFamily_body: "";
--fontFamily_body_zh: body, ui;
--fontFamily_body_zh: body;
--fontFamily_body_en: ui;
--fontFamily_ui: ui, Arial, Helvetica, sans-serif;
--title_font: title;
--body_font: body;

/* Dark mode variables */
--darkMode_init_animation: all 0s ease;
Expand Down Expand Up @@ -296,6 +318,13 @@
--ui_darkMode_mainColor: var(--ui_darkMode_mainColor_zh);
--ui_darkMode_fontColor: var(--ui_darkMode_fontColor_zh);
--ui_darkMode_bgColor: var(--ui_darkMode_bgColor_zh);
--ui_title_font: var(--ui_title_font_zh);
--ui_body_font: var(--ui_body_font_zh);
--ui_font_group_system: var(--ui_font_group_system_zh);
--ui_font_group_custom: var(--ui_font_group_custom_zh);
--ui_font_ui_label: var(--ui_font_ui_label_zh);
--ui_font_title_label: var(--ui_font_title_label_zh);
--ui_font_body_label: var(--ui_font_body_label_zh);
--ui_pagination2pageBottom_dist: var(--ui_pagination2pageBottom_dist_zh);
--ui_pagination_opacity: var(--ui_pagination_opacity_zh);
--ui_settingMenuFontSize: var(--ui_settingMenuFontSize_zh);
Expand Down Expand Up @@ -342,6 +371,13 @@
--ui_darkMode_mainColor: var(--ui_darkMode_mainColor_en);
--ui_darkMode_fontColor: var(--ui_darkMode_fontColor_en);
--ui_darkMode_bgColor: var(--ui_darkMode_bgColor_en);
--ui_title_font: var(--ui_title_font_en);
--ui_body_font: var(--ui_body_font_en);
--ui_font_group_system: var(--ui_font_group_system_en);
--ui_font_group_custom: var(--ui_font_group_custom_en);
--ui_font_ui_label: var(--ui_font_ui_label_en);
--ui_font_title_label: var(--ui_font_title_label_en);
--ui_font_body_label: var(--ui_font_body_label_en);
--ui_pagination2pageBottom_dist: var(--ui_pagination2pageBottom_dist_en);
--ui_pagination_opacity: var(--ui_pagination_opacity_en);
--ui_settingMenuFontSize: var(--ui_settingMenuFontSize_en);
Expand Down Expand Up @@ -399,6 +435,27 @@
#settingLabel-setting_dark_bgColor::before {
content: var(--ui_darkMode_bgColor);
}
#settingLabel-setting_title_font::before {
content: var(--ui_title_font);
}
#settingLabel-setting_body_font::before {
content: var(--ui_body_font);
}
#settingLabel-setting_font_group_system::before {
content: var(--ui_font_group_system);
}
#settingLabel-setting_font_group_custom::before {
content: var(--ui_font_group_custom);
}
#settingLabel-setting_font_ui_label::before {
content: var(--ui_font_ui_label);
}
#settingLabel-setting_font_title_label::before {
content: var(--ui_font_title_label);
}
#settingLabel-setting_font_body_label::before {
content: var(--ui_font_body_label);
}
#settingLabel-setting_pagination_bottom::before {
content: var(--ui_pagination2pageBottom_dist);
}
Expand Down
Binary file modified fonts/LXGWWenKai-Regular.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion manifests/Chrome/regular/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "易笺",
"description": "txt(小说)阅读器:支持秒开本地的所有txt文件,自动排版,自动分页,自动生成目录,记录阅读进度。",
"version": "1.4.9.1",
"version": "1.5",
"background": {
"service_worker": "scripts_extension/Chrome/regular/activate.js"
},
Expand Down
2 changes: 1 addition & 1 deletion manifests/Firefox/regular/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "易笺",
"description": "txt(小说)阅读器:支持秒开本地的所有txt文件,自动排版,自动分页,自动生成目录,记录阅读进度。",
"version": "1.4.9.1",
"version": "1.5",
"background": {
"scripts": [
"scripts_extension/Firefox/regular/activate.js"
Expand Down
Loading

0 comments on commit 4ac4330

Please sign in to comment.