正文增加合并后替换规则

pull/279/head
gedoor 4 years ago
parent 83af11a251
commit 3009513585
  1. 7
      app/src/main/AndroidManifest.xml
  2. 3
      app/src/main/java/io/legado/app/data/entities/rule/ContentRule.kt
  3. 4
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt
  4. 1
      app/src/main/res/values-zh-rHK/strings.xml
  5. 1
      app/src/main/res/values-zh-rTW/strings.xml
  6. 1
      app/src/main/res/values-zh/strings.xml
  7. 1
      app/src/main/res/values/strings.xml

@ -295,13 +295,18 @@
android:launchMode="singleTop"> android:launchMode="singleTop">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file"/>
<data
android:scheme="file"
android:host="*" />
<data android:scheme="content" /> <data android:scheme="content" />
<data android:mimeType="text/plain" /> <data android:mimeType="text/plain" />
<data android:mimeType="application/json" /> <data android:mimeType="application/json" />
<data android:mimeType="application/epub" /> <data android:mimeType="application/epub" />
<data android:pathPattern=".*\\.json" />
</intent-filter> </intent-filter>
</activity> </activity>

@ -9,5 +9,6 @@ data class ContentRule(
var nextContentUrl: String? = null, var nextContentUrl: String? = null,
var webJs: String? = null, var webJs: String? = null,
var sourceRegex: String? = null, var sourceRegex: String? = null,
var imageStyle: Int = 0 //0默认大小居中,1最大宽度 var replaceRegex: String? = null,
var imageStyle: String? = null //默认大小居中,1最大宽度
) : Parcelable ) : Parcelable

@ -233,6 +233,8 @@ class BookSourceEditActivity :
add(EditEntity("nextContentUrl", cr?.nextContentUrl, R.string.rule_next_content)) add(EditEntity("nextContentUrl", cr?.nextContentUrl, R.string.rule_next_content))
add(EditEntity("webJs", cr?.webJs, R.string.rule_web_js)) add(EditEntity("webJs", cr?.webJs, R.string.rule_web_js))
add(EditEntity("sourceRegex", cr?.sourceRegex, R.string.rule_source_regex)) add(EditEntity("sourceRegex", cr?.sourceRegex, R.string.rule_source_regex))
add(EditEntity("replaceRegex", cr?.replaceRegex, R.string.replace))
add(EditEntity("imageStyle", cr?.imageStyle, R.string.rule_image_style))
} }
//发现 //发现
val er = source?.getExploreRule() val er = source?.getExploreRule()
@ -332,6 +334,8 @@ class BookSourceEditActivity :
"nextContentUrl" -> contentRule.nextContentUrl = it.value "nextContentUrl" -> contentRule.nextContentUrl = it.value
"webJs" -> contentRule.webJs = it.value "webJs" -> contentRule.webJs = it.value
"sourceRegex" -> contentRule.sourceRegex = it.value "sourceRegex" -> contentRule.sourceRegex = it.value
"replaceRegex" -> contentRule.replaceRegex = it.value
"imageStyle" -> contentRule.imageStyle = it.value
} }
} }
source.ruleSearch = searchRule source.ruleSearch = searchRule

@ -724,4 +724,5 @@
<string name="restore_ignore">恢复忽略列表</string> <string name="restore_ignore">恢复忽略列表</string>
<string name="restore_ignore_summary">恢复时忽略一些内容不恢复,方便不同手机配置不同</string> <string name="restore_ignore_summary">恢复时忽略一些内容不恢复,方便不同手机配置不同</string>
<string name="read_config">阅读界面设置</string> <string name="read_config">阅读界面设置</string>
<string name="rule_image_style">图片样式(imageStyle)</string>
</resources> </resources>

@ -724,5 +724,6 @@
<string name="restore_ignore">恢复忽略列表</string> <string name="restore_ignore">恢复忽略列表</string>
<string name="restore_ignore_summary">恢复时忽略一些内容不恢复,方便不同手机配置不同</string> <string name="restore_ignore_summary">恢复时忽略一些内容不恢复,方便不同手机配置不同</string>
<string name="read_config">阅读界面设置</string> <string name="read_config">阅读界面设置</string>
<string name="rule_image_style">图片样式(imageStyle)</string>
</resources> </resources>

@ -724,4 +724,5 @@
<string name="restore_ignore">恢复忽略列表</string> <string name="restore_ignore">恢复忽略列表</string>
<string name="restore_ignore_summary">恢复时忽略一些内容不恢复,方便不同手机配置不同</string> <string name="restore_ignore_summary">恢复时忽略一些内容不恢复,方便不同手机配置不同</string>
<string name="read_config">阅读界面设置</string> <string name="read_config">阅读界面设置</string>
<string name="rule_image_style">图片样式(imageStyle)</string>
</resources> </resources>

@ -410,6 +410,7 @@
<string name="rule_next_content">正文下一页URL规则(nextContentUrl)</string> <string name="rule_next_content">正文下一页URL规则(nextContentUrl)</string>
<string name="rule_web_js">webJs</string> <string name="rule_web_js">webJs</string>
<string name="rule_source_regex">资源正则(sourceRegex)</string> <string name="rule_source_regex">资源正则(sourceRegex)</string>
<string name="rule_image_style">图片样式(imageStyle)</string>
<string name="source_icon">图标(sourceIcon)</string> <string name="source_icon">图标(sourceIcon)</string>
<string name="r_articles">列表规则(ruleArticles)</string> <string name="r_articles">列表规则(ruleArticles)</string>

Loading…
Cancel
Save