parent
18c649c2ab
commit
70f872f074
@ -1,5 +0,0 @@ |
||||
package io.legado.app.data.entities |
||||
|
||||
class Rule { |
||||
|
||||
} |
@ -0,0 +1,8 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class BaseRule( |
||||
var selector: String, |
||||
var template: String?, |
||||
var attr: String?, |
||||
var type: RuleType |
||||
) |
@ -0,0 +1,11 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class BookInfoRule ( |
||||
var name: Rule, |
||||
var author: Rule, |
||||
var desc: Rule, |
||||
var meta: Rule, |
||||
var updateTime: Rule, |
||||
var tocUrl: Rule, |
||||
var store: List<PutRule> |
||||
) |
@ -0,0 +1,9 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class ChapterRule ( |
||||
var chapterList: Rule, |
||||
var title: Rule, |
||||
var contentUrl: Rule, |
||||
var resourceUrl: Rule, |
||||
var isAllInOne: Boolean = false |
||||
) |
@ -0,0 +1,6 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class ContentRule ( |
||||
var fulltext: Rule, |
||||
var resourceUrl: Rule |
||||
) |
@ -0,0 +1,11 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class ExploreRule ( |
||||
var bookList: Rule, |
||||
var name: Rule, |
||||
var author: Rule, |
||||
var desc: Rule, |
||||
var meta: Rule, |
||||
var bookUrl: Rule, |
||||
var store: PutRule |
||||
) |
@ -0,0 +1,7 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class PutRule ( |
||||
var selector: BaseRule, |
||||
var type: RuleType, |
||||
var key: String |
||||
) |
@ -0,0 +1,19 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class Rule ( |
||||
var selectors: List<BaseRule>, |
||||
var mode: RuleMode, |
||||
var type: RuleType, |
||||
var regex: String?, |
||||
var replacement: String?, |
||||
var javascript: String?, |
||||
var extra: String? |
||||
) |
||||
|
||||
enum class RuleMode { |
||||
FIRST, ALL, CROSS |
||||
} |
||||
|
||||
enum class RuleType { |
||||
CSS, XPATH, JSON, REGEX, CONST, JS, HYBRID |
||||
} |
@ -0,0 +1,11 @@ |
||||
package io.legado.app.data.entities.rule |
||||
|
||||
data class SearchRule ( |
||||
var bookList: Rule, |
||||
var name: Rule, |
||||
var author: Rule, |
||||
var desc: Rule, |
||||
var meta: Rule, |
||||
var bookUrl: Rule, |
||||
var store: List<PutRule> |
||||
) |
Loading…
Reference in new issue