-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path異世界で魅了チートを使って奴隷ハーレムをつくってみた.ts
88 lines (68 loc) · 1.95 KB
/
異世界で魅了チートを使って奴隷ハーレムをつくってみた.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* Created by user on 2017/12/21/021.
*/
import lazymarks from '@node-novel/layout-pattern/lib/core/pattern/index';
import { _word_en, _word_en3, _word_jp1, _word_zh_all } from '@node-novel/layout-pattern/lib/core/word';
import { IWords, vMaybe, IWordsAll } from '@node-novel/layout-pattern/lib/core/word';
import { _zh_num2, sp, sp2, _zh_num, _full_num, EN_REGEXP } from '@node-novel/layout-pattern/lib/core/const';
import { IPatternRule } from '@node-novel/layout-pattern/lib/core/types';
import * as StrUtil from 'str-util';
/**
* 改成小說名字
*/
export const lang = '異世界で魅了チートを使って奴隷ハーレムをつくってみた';
/**
* 其他用途
*
* @type {{chapter_id: string; chapter_title: string; volume_id: string; volume_title: string}}
*/
export const value = {
chapter_id: '第{{0}}話',
chapter_title: `$t(chapter_id, [{{0}}]) {{title}}`,
volume_id: '第{{0}}章',
volume_title: `$t(chapter_id, [{{0}}]):{{title}}`,
};
/**
* 在這裡放此小說專屬的取代樣本
*/
export const words: IWords[] = _word_zh_all([
['龍|龙', '龍'],
['三浦竜太|三浦龍太', '三浦竜太'],
['玛丽|梅利娅', '梅利娅'],
['蕾奧娜|利昂娜', '利昂娜'],
['([\u4E00-\u9FFF])([Oo]+)(?=[\u4E00-\u9FFF])', function (...m)
{
return m[1] + '◯'.repeat(m[2].length);
}],
[/(\d+)/g, function (...m)
{
return StrUtil.toFullNumber(m[1]);
}],
[/^[ \t ]+/gm, ''],
[/^[\?]/gm, ''],
[/(?)[ ]([\u4E00-\u9FFF])/gm, '$1$2'],
...lazymarks['4'],
...lazymarks['0'],
...lazymarks['1'],
...lazymarks['2'],
...lazymarks['3'],
...lazymarks['5'],
]);
//console.log(words);
/**
* 需要人工確認的屏蔽字或錯字用語等等
*/
export const words_maybe: vMaybe = [
//'需要偵測的字',
] as vMaybe;
/**
* 分析取代完成後執行的代碼
*
* @param {string} text
* @returns {string}
*/
export function words_callback(text: string): string
{
return text;
}
export default exports;