Skip to content

Commit

Permalink
v2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Dec 27, 2020
1 parent 874b5f9 commit e956375
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion arrangement/recover_mulitiple_downloaded_bad_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ do {

node_fs.writeSync(target_fd, from_buffer_list[0], 0, max_buffer_index);
process_to += max_buffer_index;
process.stdout.write(`${process_to / max_size * 100 | 0}% ${CeL.show_KiB(process_to)} / ${CeL.show_KiB(max_size)} ...\r`);
process.stdout.write(`${process_to / max_size * 100 | 0}% ${CeL.to_KiB(process_to)} / ${CeL.to_KiB(max_size)} ...\r`);
} while (not_ended);

node_fs.closeSync(target_fd);
Expand Down
4 changes: 2 additions & 2 deletions arrangement/renamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ cache_file = base_directory + 'data.json',
//
cache_data = CeL.get_JSON(cache_file),
// file / folder name
PATTERN_latin_fso_name = /^([\u0020-\u007Fūûōôō]+?)(\.[a-z\d]{2,9})?$/i,
PATTERN_latin_fso_name = /^([\u0020-\u007Fūûōôō@]+?)(\.[a-z\d]{2,9})?$/i,
// [[en:Numerals_in_Unicode#Roman_numerals]]
PATTERN_full_latin_or_sign = /^[\u0020-\u00FFūûōôō’★☆♥♡Ⅰ-ↈ①-⑳⑴-⑽㈠-㈩/]+$/;
PATTERN_full_latin_or_sign = /^[\u0020-\u00FFūûōôō@’★☆♥♡Ⅰ-ↈ①-⑳⑴-⑽㈠-㈩/]+$/;

if (target_directory) {
if (!/[\\\/]$/.test(target_directory)) {
Expand Down
6 changes: 3 additions & 3 deletions gui_electron/gui_electron_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,15 @@ var force_convert = [ 'en' ];
// @see setup_language_menu()
// for i18n: define gettext() user domain resource location.
// gettext() will auto load (CeL.env.domain_location + language + '.js').
// e.g., resource/cmn-Hant-TW.js, resource/ja-JP.js
// e.g., resources/cmn-Hant-TW.js, resources/ja-JP.js
CeL.env.domain_location = function() {
is_installation_package = CeL.is_installation_package();

return CeL.env.domain_location
// CeL.env.script_base_path: 形如 ...'/work_crawler/gui_electron/'
= CeL.env.script_base_path.replace(/gui_electron[\\\/]$/, '')
// resource/
+ CeL.env.resource_directory_name + '/';
// resources/
+ CeL.env.resources_directory_name + '/';
// 在安裝包中, `process.cwd()` 可能為
// C:\Users\user\AppData\Local\Programs\work_crawler
// 因此 CeL.env.domain_location 必須提供完整路徑。
Expand Down
6 changes: 6 additions & 0 deletions novel.cmn-Hans-CN/qidian.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ function fix_HTML_error(html) {
//
// 然而每次展示頁面會加載不同字型,因此解析特定字型檔無效,
// 恐怕需要解析字型數據本身,從 glyphs 數據判斷對應哪個字,再作 mapping。
// 或可參考 https://github.com/foliojs/fontkit
// https://github.com/trevordixon/ttfinfo
// https://github.com/fontello/svg2ttf
// https://github.com/aui/font-spider
// https://github.com/kekee000/fonteditor-core/tree/master/src/ttf
// https://github.com/fontello/ttf2woff/blob/master/index.js
html = html.replace(/&#(58\d{3});/g, function(entity, code) {
if (+code in char_mapper)
return char_mapper[+code];
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "work_crawler",
"title" : "CeJS online novels and comics downloader",
"version" : "v2.9.0",
"version" : "v2.10.0",
"description" : "A tool using CeJS library to download online novels / comics.",
"keywords" : [ "comic-downloader", "novel-downloader", "cejs",
"downloader", "download-comic", "epub", "ebook", "comics",
Expand Down Expand Up @@ -42,7 +42,7 @@
"owner" : "kanasimi",
"repo" : "work_crawler"
} ],
"files" : [ "package.json", "node_modules/*", "resource/*",
"files" : [ "package.json", "node_modules/*", "resources/*",
"_CeL.loader.nodejs.js", "gui_electron/**/*",
"work_crawler_loader.js",
"work_crawler.default_configuration.js", "comic.*/**/*",
Expand Down
2 changes: 1 addition & 1 deletion resource/cmn-Hans-CN.js → resources/cmn-Hans-CN.js

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion resource/en-US.js → resources/en-US.js

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion resource/pt-BR.js → resources/pt-BR.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions work_crawler_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ if (!CeL.random_id)
var is_CLI = CeL.platform.is_CLI;

if (is_CLI) {
// for i18n: define gettext() user domain resource location.
// for i18n: define gettext() user domain resources location.
// gettext() will auto load (CeL.env.domain_location + language + '.js').
// e.g., resource/cmn-Hant-TW.js, resource/ja-JP.js
CeL.env.domain_location = module.filename.replace(/[^\\\/]*$/, 'resource'
// e.g., resources/cmn-Hant-TW.js, resources/ja-JP.js
CeL.env.domain_location = module.filename.replace(/[^\\\/]*$/, 'resources'
+ CeL.env.path_separator);
}

Expand Down

0 comments on commit e956375

Please sign in to comment.