bookSourceEditConfig.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. export default {
  2. base: {
  3. name: '基础',
  4. children: [
  5. {
  6. title: '源类型',
  7. id: 'bookSourceType',
  8. type: 'Array',
  9. array: ['文本', '音频', '图片', '文件'],
  10. required: true,
  11. },
  12. {
  13. title: '源域名',
  14. id: 'bookSourceUrl',
  15. type: 'String',
  16. hint: '通常填写网站主页,例: https://www.qidian.com',
  17. required: true,
  18. },
  19. {
  20. title: '源名称',
  21. id: 'bookSourceName',
  22. type: 'String',
  23. hint: '会显示在源列表',
  24. required: true,
  25. },
  26. {
  27. title: '源分组',
  28. id: 'bookSourceGroup',
  29. type: 'String',
  30. hint: '描述源的特征信息',
  31. },
  32. {
  33. title: '源注释',
  34. id: 'bookSourceComment',
  35. type: 'String',
  36. hint: '描述源作者和状态',
  37. },
  38. {
  39. title: '登录地址',
  40. id: 'loginUrl',
  41. type: 'String',
  42. hint: '填写网站登录网址,仅在需要登录的源有用',
  43. },
  44. {
  45. title: '登录界面',
  46. id: 'loginUi',
  47. type: 'String',
  48. hint: '自定义登录界面',
  49. },
  50. {
  51. title: '登录检测',
  52. id: 'loginCheckJs',
  53. type: 'String',
  54. hint: '登录检测js',
  55. },
  56. {
  57. title: '封面解密',
  58. id: 'coverDecodeJs',
  59. type: 'String',
  60. hint: '封面解密js',
  61. },
  62. {
  63. title: '链接验证',
  64. id: 'bookUrlPattern',
  65. type: 'String',
  66. hint: '书籍URL正则,当详情页URL与源URL的域名不一致时有效,用于添加网址',
  67. },
  68. {
  69. title: '请求头',
  70. id: 'header',
  71. type: 'String',
  72. hint: '客户端标识',
  73. },
  74. {
  75. title: '变量说明',
  76. id: 'variableComment',
  77. type: 'String',
  78. hint: '书源变量说明',
  79. },
  80. {
  81. title: '并发率',
  82. id: 'concurrentRate',
  83. type: 'String',
  84. hint: '并发率,如1000(访问间隔1000ms)或者1/1000(1000ms内访问1次)',
  85. },
  86. {
  87. title: 'js库',
  88. id: 'jsLib',
  89. type: 'String',
  90. hint: 'js库, 可填写js或者key-value object获取在线js文件',
  91. },
  92. ],
  93. },
  94. search: {
  95. name: '搜索',
  96. children: [
  97. {
  98. title: '搜索地址',
  99. id: 'searchUrl',
  100. type: 'String',
  101. hint: '[域名可省略]/search.php@kw={{key}}',
  102. },
  103. {
  104. title: '校验文字',
  105. namespace: 'ruleSearch',
  106. id: 'checkKeyWord',
  107. type: 'String',
  108. hint: '校验关键字,强烈建议填写',
  109. },
  110. {
  111. title: '列表规则',
  112. namespace: 'ruleSearch',
  113. id: 'bookList',
  114. type: 'String',
  115. hint: '选择书籍节点 (规则结果为List<Element>)',
  116. },
  117. {
  118. title: '书名规则',
  119. namespace: 'ruleSearch',
  120. id: 'name',
  121. type: 'String',
  122. hint: '选择节点书名 (规则结果为String)',
  123. },
  124. {
  125. title: '作者规则',
  126. namespace: 'ruleSearch',
  127. id: 'author',
  128. type: 'String',
  129. hint: '选择节点作者 (规则结果为String)',
  130. },
  131. {
  132. title: '分类规则',
  133. namespace: 'ruleSearch',
  134. id: 'kind',
  135. type: 'String',
  136. hint: '选择节点分类信息 (规则结果为String)',
  137. },
  138. {
  139. title: '字数规则',
  140. namespace: 'ruleSearch',
  141. id: 'wordCount',
  142. type: 'String',
  143. hint: '选择节点字数信息 (规则结果为String)',
  144. },
  145. {
  146. title: '最新章节',
  147. namespace: 'ruleSearch',
  148. id: 'lastChapter',
  149. type: 'String',
  150. hint: '选择节点最新章节 (规则结果为String)',
  151. },
  152. {
  153. title: '简介规则',
  154. namespace: 'ruleSearch',
  155. id: 'intro',
  156. type: 'String',
  157. hint: '选择节点书籍简介 (规则结果为String)',
  158. },
  159. {
  160. title: '封面规则',
  161. namespace: 'ruleSearch',
  162. id: 'coverUrl',
  163. type: 'String',
  164. hint: '选择节点书籍封面 (规则结果为String类型的url)',
  165. },
  166. {
  167. title: '详情地址',
  168. namespace: 'ruleSearch',
  169. id: 'bookUrl',
  170. type: 'String',
  171. hint: '选择书籍详情页网址 (规则结果为String类型的url)',
  172. },
  173. ],
  174. },
  175. find: {
  176. name: '发现',
  177. children: [
  178. {
  179. title: '发现地址',
  180. id: 'exploreUrl',
  181. type: 'String',
  182. hint: '单个发现格式<name>::<url>或者{url:<url>,title:<name>,style:...};前者用换行符或者&&连接,后者放在数组内;可用js动态生成',
  183. },
  184. {
  185. title: '列表规则',
  186. namespace: 'ruleExplore',
  187. id: 'bookList',
  188. type: 'String',
  189. hint: '选择书籍节点 (规则结果为List<Element>)',
  190. },
  191. {
  192. title: '书名规则',
  193. namespace: 'ruleExplore',
  194. id: 'name',
  195. type: 'String',
  196. hint: '选择节点书名 (规则结果为String)',
  197. },
  198. {
  199. title: '作者规则',
  200. namespace: 'ruleExplore',
  201. id: 'author',
  202. type: 'String',
  203. hint: '选择节点作者 (规则结果为String)',
  204. },
  205. {
  206. title: '分类规则',
  207. namespace: 'ruleExplore',
  208. id: 'kind',
  209. type: 'String',
  210. hint: '选择节点分类信息 (规则结果为String)',
  211. },
  212. {
  213. title: '字数规则',
  214. namespace: 'ruleExplore',
  215. id: 'wordCount',
  216. type: 'String',
  217. hint: '选择节点字数信息 (规则结果为String)',
  218. },
  219. {
  220. title: '最新章节',
  221. namespace: 'ruleExplore',
  222. id: 'lastChapter',
  223. type: 'String',
  224. hint: '选择节点最新章节 (规则结果为String)',
  225. },
  226. {
  227. title: '简介规则',
  228. namespace: 'ruleExplore',
  229. id: 'intro',
  230. type: 'String',
  231. hint: '选择节点书籍简介 (规则结果为String)',
  232. },
  233. {
  234. title: '封面规则',
  235. namespace: 'ruleExplore',
  236. id: 'coverUrl',
  237. type: 'String',
  238. hint: '选择节点书籍封面 (规则结果为String类型的url)',
  239. },
  240. {
  241. title: '详情地址',
  242. namespace: 'ruleExplore',
  243. id: 'bookUrl',
  244. type: 'String',
  245. hint: '选择书籍详情页网址 (规则结果为String类型的url)',
  246. },
  247. ],
  248. },
  249. detail: {
  250. name: '详情',
  251. children: [
  252. {
  253. title: '预处理',
  254. namespace: 'ruleBookInfo',
  255. id: 'init',
  256. type: 'String',
  257. hint: '用于加速详情信息检索,只支持AllInOne规则',
  258. },
  259. {
  260. title: '书名规则',
  261. namespace: 'ruleBookInfo',
  262. id: 'name',
  263. type: 'String',
  264. hint: '选择节点书名 (规则结果为String)',
  265. },
  266. {
  267. title: '作者规则',
  268. namespace: 'ruleBookInfo',
  269. id: 'author',
  270. type: 'String',
  271. hint: '选择节点作者 (规则结果为String)',
  272. },
  273. {
  274. title: '分类规则',
  275. namespace: 'ruleBookInfo',
  276. id: 'kind',
  277. type: 'String',
  278. hint: '选择节点分类信息 (规则结果为String)',
  279. },
  280. {
  281. title: '字数规则',
  282. namespace: 'ruleBookInfo',
  283. id: 'wordCount',
  284. type: 'String',
  285. hint: '选择节点字数信息 (规则结果为String)',
  286. },
  287. {
  288. title: '最新章节',
  289. namespace: 'ruleBookInfo',
  290. id: 'lastChapter',
  291. type: 'String',
  292. hint: '选择节点最新章节 (规则结果为String)',
  293. },
  294. {
  295. title: '简介规则',
  296. namespace: 'ruleBookInfo',
  297. id: 'intro',
  298. type: 'String',
  299. hint: '选择节点书籍简介 (规则结果为String)',
  300. },
  301. {
  302. title: '封面规则',
  303. namespace: 'ruleBookInfo',
  304. id: 'coverUrl',
  305. type: 'String',
  306. hint: '选择节点书籍封面 (规则结果为String类型的url)',
  307. },
  308. {
  309. title: '目录地址',
  310. namespace: 'ruleBookInfo',
  311. id: 'tocUrl',
  312. type: 'String',
  313. hint: '选择书籍详情页网址 (规则结果为String类型的url, 与详情页相同时可省略)',
  314. },
  315. {
  316. title: '修改书籍',
  317. namespace: 'ruleBookInfo',
  318. id: 'canReName',
  319. type: 'String',
  320. hint: '允许修改书名作者(规则结果为String类型, 默认不允许)',
  321. },
  322. {
  323. title: '下载URL',
  324. namespace: 'ruleBookInfo',
  325. id: 'downloadUrls',
  326. type: 'String',
  327. hint: '文件类书源下载地址 (规则结果为String类型的url, 多个链接返回数组)',
  328. },
  329. ],
  330. },
  331. directory: {
  332. name: '目录',
  333. children: [
  334. {
  335. title: '更新前JS',
  336. namespace: 'ruleToc',
  337. id: 'preUpdateJs',
  338. type: 'String',
  339. hint: '更新目录前调用JS 动态更新目录链接',
  340. },
  341. {
  342. title: '列表规则',
  343. namespace: 'ruleToc',
  344. id: 'chapterList',
  345. type: 'String',
  346. hint: '选择目录列表的章节节点 (规则结果为List<Element>)',
  347. },
  348. {
  349. title: '章节名称',
  350. namespace: 'ruleToc',
  351. id: 'chapterName',
  352. type: 'String',
  353. hint: '选择章节名称 (规则结果为String)',
  354. },
  355. {
  356. title: '章节地址',
  357. namespace: 'ruleToc',
  358. id: 'chapterUrl',
  359. type: 'String',
  360. hint: '选择章节链接 (规则结果为String类型的Url)',
  361. },
  362. {
  363. title: '标题处理',
  364. namespace: 'ruleToc',
  365. id: 'formatJs',
  366. type: 'String',
  367. hint: '遍历去重后的章节列表的回调,提供index(章节序号从1开始)、title(章节标题)变量,额外提供gInt(初始值0),返回值作为新的标题',
  368. },
  369. {
  370. title: '卷名标识',
  371. namespace: 'ruleToc',
  372. id: 'isVolume',
  373. type: 'String',
  374. hint: '章节名称是否是卷名 (规则结果为Bool)',
  375. },
  376. {
  377. title: '章节信息',
  378. namespace: 'ruleToc',
  379. id: 'updateTime',
  380. type: 'String',
  381. hint: '选择章节信息(如更新时间) (规则结果为String)',
  382. },
  383. {
  384. title: '收费标识',
  385. namespace: 'ruleToc',
  386. id: 'isVip',
  387. type: 'String',
  388. hint: '章节是否为VIP章节 (规则结果为Bool)',
  389. },
  390. {
  391. title: '购买标识',
  392. namespace: 'ruleToc',
  393. id: 'isPay',
  394. type: 'String',
  395. hint: '章节是否为已购买 (规则结果为Bool)',
  396. },
  397. {
  398. title: '翻页规则',
  399. namespace: 'ruleToc',
  400. id: 'nextTocUrl',
  401. type: 'String',
  402. hint: '选择目录下一页链接 (规则结果为List<String>或String)',
  403. },
  404. ],
  405. },
  406. content: {
  407. name: '正文',
  408. children: [
  409. {
  410. title: '正文规则',
  411. namespace: 'ruleContent',
  412. id: 'content',
  413. type: 'String',
  414. hint: '选择正文内容 (规则结果为String)',
  415. },
  416. {
  417. title: '标题规则',
  418. namespace: 'ruleContent',
  419. id: 'title',
  420. type: 'String',
  421. hint: '获取结果将会覆盖章节标题 (规则结果为String)',
  422. },
  423. {
  424. title: '翻页规则',
  425. namespace: 'ruleContent',
  426. id: 'nextContentUrl',
  427. type: 'String',
  428. hint: '选择下一分页(不是下一章)链接 (规则结果为String类型的Url)',
  429. },
  430. {
  431. title: '脚本注入',
  432. namespace: 'ruleContent',
  433. id: 'webJs',
  434. type: 'String',
  435. hint: '注入javascript,用于模拟鼠标点击等,必须有返回值,一般为String类型',
  436. },
  437. {
  438. title: '资源正则',
  439. namespace: 'ruleContent',
  440. id: 'sourceRegex',
  441. type: 'String',
  442. hint: '匹配资源的url特征,用于嗅探',
  443. },
  444. {
  445. title: '替换规则',
  446. namespace: 'ruleContent',
  447. id: 'replaceRegex',
  448. type: 'String',
  449. hint: '多页内容合并后替换,用于正文净化',
  450. },
  451. {
  452. title: '图片样式',
  453. namespace: 'ruleContent',
  454. id: 'imageStyle',
  455. type: 'String',
  456. hint: 'FULL:铺满 不填:默认样式',
  457. },
  458. {
  459. title: '图片解密',
  460. namespace: 'ruleContent',
  461. id: 'imageDecode',
  462. type: 'String',
  463. hint: '填写JavaScript 返回解密图片的bytes ',
  464. },
  465. {
  466. title: '购买操作',
  467. namespace: 'ruleContent',
  468. id: 'payAction',
  469. type: 'String',
  470. hint: '填写JavaScript 返回购买链接或者调用购买接口',
  471. },
  472. ],
  473. },
  474. /*
  475. review: {
  476. name: "段评",
  477. children: [
  478. {
  479. title: "段评URL",
  480. namespace: "ruleReview",
  481. id: "reviewUrl",
  482. type: "String",
  483. hint: "段评URL",
  484. },
  485. {
  486. title: "发布头像",
  487. namespace: "ruleReview",
  488. id: "avatarRule",
  489. type: "String",
  490. hint: "段评发布者头像",
  491. },
  492. {
  493. title: "段评内容",
  494. namespace: "ruleReview",
  495. id: "contentRule",
  496. type: "String",
  497. hint: "段评内容",
  498. },
  499. {
  500. title: "发布时间",
  501. namespace: "ruleReview",
  502. id: "postTimeRule",
  503. type: "String",
  504. hint: "段评发布时间",
  505. },
  506. {
  507. title: "回复URL",
  508. namespace: "ruleReview",
  509. id: "reviewQuoteUrl",
  510. type: "String",
  511. hint: "获取段评回复URL",
  512. },
  513. {
  514. title: "点赞URL",
  515. namespace: "ruleReview",
  516. id: "voteUpUrl",
  517. type: "String",
  518. hint: "点赞URL",
  519. },
  520. {
  521. title: "点踩URL",
  522. namespace: "ruleReview",
  523. id: "voteDownUrl",
  524. type: "String",
  525. hint: "点踩URL",
  526. },
  527. {
  528. title: "发送回复",
  529. namespace: "ruleReview",
  530. id: "postReviewUrl",
  531. type: "String",
  532. hint: "发送回复URL",
  533. },
  534. {
  535. title: "回复段评",
  536. namespace: "ruleReview",
  537. id: "postQuoteUrl",
  538. type: "String",
  539. hint: "发送回复段评URL",
  540. },
  541. {
  542. title: "删除段评",
  543. namespace: "ruleReview",
  544. id: "deleteUrl",
  545. type: "String",
  546. hint: "删除段评URL",
  547. },
  548. ],
  549. },*/
  550. other: {
  551. name: '其他',
  552. children: [
  553. {
  554. title: '启用搜索',
  555. id: 'enabled',
  556. type: 'Boolean',
  557. },
  558. {
  559. title: '启用发现',
  560. id: 'enabledExplore',
  561. type: 'Boolean',
  562. },
  563. // {
  564. // title: "启用段评",
  565. // id: "enabledReview",
  566. // type: "Boolean",
  567. // },
  568. {
  569. title: 'CookieJar',
  570. id: 'enabledCookieJar',
  571. type: 'Boolean',
  572. },
  573. {
  574. title: '搜索权重',
  575. id: 'weight',
  576. type: 'Number',
  577. },
  578. {
  579. title: '排序编号',
  580. id: 'customOrder',
  581. type: 'Number',
  582. },
  583. ],
  584. },
  585. }