")+'"')
+;throw e.mode=_,e}if("end"===n.type){const e=x(n);if(e!==K)return e}
+if("illegal"===n.type&&""===a)return 1
+;if(B>1e5&&B>3*n.index)throw Error("potential infinite loop, way more iterations than matches")
+;return O+=a,a.length}const w=N(e)
+;if(!w)throw C(l.replace("{}",e)),Error('Unknown language: "'+e+'"')
+;const R=I(w,{plugins:a});let y="",_=o||R;const k={},M=new g.__emitter(g);(()=>{
+const e=[];for(let t=_;t!==w;t=t.parent)t.className&&e.unshift(t.className)
+;e.forEach((e=>M.openNode(e)))})();let O="",A=0,L=0,B=0,T=!1;try{
+for(_.matcher.considerAll();;){
+B++,T?T=!1:_.matcher.considerAll(),_.matcher.lastIndex=L
+;const e=_.matcher.exec(c);if(!e)break;const t=v(c.substring(L,e.index),e)
+;L=e.index+t}return v(c.substr(L)),M.closeAllNodes(),M.finalize(),y=M.toHTML(),{
+relevance:A,value:y,language:e,illegal:!1,emitter:M,top:_}}catch(t){
+if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{
+msg:t.message,context:c.slice(L-100,L+100),mode:t.mode},sofar:y,relevance:0,
+value:U(c),emitter:M};if(i)return{illegal:!1,relevance:0,value:U(c),emitter:M,
+language:e,top:_,errorRaised:t};throw t}}function p(e,t){
+t=t||g.languages||Object.keys(n);const s=(e=>{const t={relevance:0,
+emitter:new g.__emitter(g),value:U(e),illegal:!1,top:u}
+;return t.emitter.addText(e),t})(e),r=t.filter(N).filter(R).map((t=>f(t,e,!1)))
+;r.unshift(s);const a=r.sort(((e,t)=>{
+if(e.relevance!==t.relevance)return t.relevance-e.relevance
+;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1
+;if(N(t.language).supersetOf===e.language)return-1}return 0})),[i,o]=a,l=i
+;return l.second_best=o,l}const m={"before:highlightBlock":({block:e})=>{
+g.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/
/g,"\n"))
+},"after:highlightBlock":({result:e})=>{
+g.useBR&&(e.value=e.value.replace(/\n/g,"
"))}},b=/^(<[^>]+>|\t)+/gm,x={
+"after:highlightBlock":({result:e})=>{
+g.tabReplace&&(e.value=e.value.replace(b,(e=>e.replace(/\t/g,g.tabReplace))))}}
+;function E(e){let t=null;const n=(e=>{let t=e.className+" "
+;t+=e.parentNode?e.parentNode.className:"";const n=g.languageDetectRe.exec(t)
+;if(n){const t=N(n[1])
+;return t||(H(l.replace("{}",n[1])),H("Falling back to no-highlight mode for this block.",e)),
+t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>d(e)||N(e)))})(e)
+;if(d(n))return;_("before:highlightBlock",{block:e,language:n}),t=e
+;const s=t.textContent,a=n?h(n,s,!0):p(s);_("after:highlightBlock",{block:e,
+result:a,text:s}),e.innerHTML=a.value,((e,t,n)=>{const s=t?r[t]:n
+;e.classList.add("hljs"),s&&e.classList.add(s)})(e,n,a.language),e.result={
+language:a.language,re:a.relevance,relavance:a.relevance
+},a.second_best&&(e.second_best={language:a.second_best.language,
+re:a.second_best.relevance,relavance:a.second_best.relevance})}const v=()=>{
+v.called||(v.called=!0,document.querySelectorAll("pre code").forEach(E))}
+;function N(e){return e=(e||"").toLowerCase(),n[e]||n[r[e]]}
+function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e]=t
+}))}function R(e){const t=N(e);return t&&!t.disableAutodetect}function _(e,t){
+const n=e;a.forEach((e=>{e[n]&&e[n](t)}))}Object.assign(e,{highlight:h,
+highlightAuto:p,fixMarkup:e=>{
+return $("10.2.0","fixMarkup will be removed entirely in v11.0"),
+$("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),
+t=e,
+g.tabReplace||g.useBR?t.replace(o,(e=>"\n"===e?g.useBR?"
":e:g.tabReplace?e.replace(/\t/g,g.tabReplace):e)):t
+;var t},highlightBlock:E,configure:e=>{
+e.useBR&&($("10.3.0","'useBR' will be removed entirely in v11.0"),
+$("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),
+g=z(g,e)},initHighlighting:v,initHighlightingOnLoad:()=>{
+window.addEventListener("DOMContentLoaded",v,!1)},registerLanguage:(t,s)=>{
+let r=null;try{r=s(e)}catch(e){
+if(C("Language definition for '{}' could not be registered.".replace("{}",t)),
+!i)throw e;C(e),r=u}
+r.name||(r.name=t),n[t]=r,r.rawDefinition=s.bind(null,e),r.aliases&&w(r.aliases,{
+languageName:t})},listLanguages:()=>Object.keys(n),getLanguage:N,
+registerAliases:w,requireLanguage:e=>{
+$("10.4.0","requireLanguage will be removed entirely in v11."),
+$("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844")
+;const t=N(e);if(t)return t
+;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},
+autoDetection:R,inherit:z,addPlugin:e=>{a.push(e)},vuePlugin:j(e).VuePlugin
+}),e.debugMode=()=>{i=!1},e.safeMode=()=>{i=!0},e.versionString="10.5.0"
+;for(const e in y)"object"==typeof y[e]&&t(y[e])
+;return Object.assign(e,y),e.addPlugin(m),e.addPlugin(S),e.addPlugin(x),e})({})
+}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);hljs.registerLanguage("xml",(()=>{"use strict";function e(e){
+return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")}
+function a(...n){return n.map((n=>e(n))).join("")}function s(...n){
+return"("+n.map((n=>e(n))).join("|")+")"}return e=>{
+const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]+:/,")?"),/[A-Z0-9_.-]*/),i={
+className:"symbol",begin:/&[a-z]+;|[0-9]+;|[a-f0-9]+;/},r={begin:/\s/,
+contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]
+},c=e.inherit(r,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{
+className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{
+className:"meta-string"}),m={endsWithParent:!0,illegal:/,relevance:0,
+contains:[{className:"attr",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\s*/,
+relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,
+end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]
+}]};return{name:"HTML, XML",
+aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],
+case_insensitive:!0,contains:[{className:"meta",begin://,
+relevance:10,contains:[r,g,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",
+begin://,contains:[r,c,g,l]}]}]},e.COMMENT(//,{
+relevance:10}),{begin://,relevance:10},i,{
+className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",
+begin:/");
+ //scripts
+ sb.append("");
+ sb.append("");
+ sb.append("");
+ //code
+ sb.append("");
+ sb.append("")
+ .append(escapeCode)
+ .append("
\n");
+ return sb.toString();
+ }
+
+ private void executeJavaScript(String js) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ evaluateJavascript("javascript:" + js, null);
+ } else {
+ loadUrl("javascript:" + js);
+ }
+ }
+
+ private void changeFontSize(int sizeInPx) {
+ executeJavaScript("document.body.style.fontSize = '" + sizeInPx + "px'");
+ }
+
+ /**
+ * Eventos de pinça.
+ */
+ private class PinchListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
+ private float fontSize;
+
+ @Override
+ public boolean onScaleBegin(ScaleGestureDetector detector) {
+ fontSize = getFontSize();
+ return super.onScaleBegin(detector);
+ }
+
+ @Override
+ public void onScaleEnd(ScaleGestureDetector detector) {
+ CodeView.this.fontSize = fontSize;
+ super.onScaleEnd(detector);
+ }
+
+ @Override
+ public boolean onScale(ScaleGestureDetector detector) {
+ fontSize = getFontSize() * detector.getScaleFactor();
+ if (fontSize >= minFontSize) {
+ changeFontSize((int) fontSize);
+ } else {
+ fontSize = minFontSize;
+ }
+ return false;
+ }
+ }
+}
diff --git a/app/src/main/java/xyz/fycz/myreader/widget/codeview/Language.java b/app/src/main/java/xyz/fycz/myreader/widget/codeview/Language.java
new file mode 100644
index 0000000..8b4f42b
--- /dev/null
+++ b/app/src/main/java/xyz/fycz/myreader/widget/codeview/Language.java
@@ -0,0 +1,38 @@
+package xyz.fycz.myreader.widget.codeview;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum Language {
+
+ AUTO(""),
+ HTML("html"),
+ JAVA("java"),
+ JAVASCRIPT("javascript"),
+ JSON("json");
+
+ private static final Map LANGUAGES = new HashMap<>();
+ private final String name;
+
+ static {
+ for (Language language : values()) {
+ if (language != AUTO) {
+ LANGUAGES.put(language.name, language);
+ }
+ }
+ }
+
+ Language(String name) {
+ this.name = name;
+ }
+
+ public static Language getLanguageByName(String name) {
+ return LANGUAGES.get(name);
+ }
+
+ public String getLanguageName() {
+ return name;
+ }
+}
+
diff --git a/app/src/main/java/xyz/fycz/myreader/widget/page/NetPageLoader.java b/app/src/main/java/xyz/fycz/myreader/widget/page/NetPageLoader.java
index 7a69fed..929d2ce 100644
--- a/app/src/main/java/xyz/fycz/myreader/widget/page/NetPageLoader.java
+++ b/app/src/main/java/xyz/fycz/myreader/widget/page/NetPageLoader.java
@@ -9,7 +9,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import xyz.fycz.myreader.application.MyApplication;
+import xyz.fycz.myreader.application.App;
import xyz.fycz.myreader.common.APPCONST;
import xyz.fycz.myreader.entity.Setting;
import xyz.fycz.myreader.greendao.entity.Book;
@@ -228,7 +228,7 @@ public class NetPageLoader extends PageLoader {
mChapterService.saveOrUpdateChapter(chapter, (String) o);
if (isClose()) return;
if (getPageStatus() == PageLoader.STATUS_LOADING && mCurChapterPos == chapter.getNumber()) {
- MyApplication.runOnUiThread(() -> {
+ App.runOnUiThread(() -> {
if (isPrev) {
openChapterInLastPage();
} else {
@@ -243,7 +243,7 @@ public class NetPageLoader extends PageLoader {
loadingChapters.remove(chapter);
if (isClose()) return;
if (mCurChapterPos == chapter.getNumber())
- chapterError("请尝试重新加载或换源\n" + e.getLocalizedMessage());
+ App.runOnUiThread(() -> chapterError("请尝试重新加载或换源\n" + e.getLocalizedMessage()));
e.printStackTrace();
}
});
diff --git a/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java b/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java
index 47b2202..53061ff 100644
--- a/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java
+++ b/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java
@@ -20,11 +20,10 @@ import io.reactivex.SingleOnSubscribe;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import xyz.fycz.myreader.R;
-import xyz.fycz.myreader.application.MyApplication;
+import xyz.fycz.myreader.application.App;
import xyz.fycz.myreader.application.SysManager;
import xyz.fycz.myreader.common.APPCONST;
import xyz.fycz.myreader.enums.Font;
-import xyz.fycz.myreader.enums.Language;
import xyz.fycz.myreader.greendao.entity.Book;
import xyz.fycz.myreader.entity.Setting;
import xyz.fycz.myreader.greendao.entity.Chapter;
@@ -233,7 +232,7 @@ public abstract class PageLoader {
if (bgPath == null) {
return;
}
- Resources resources = MyApplication.getApplication().getResources();
+ Resources resources = App.getApplication().getResources();
DisplayMetrics dm = resources.getDisplayMetrics();
int width = dm.widthPixels;
int height = dm.heightPixels;
diff --git a/app/src/main/java/xyz/fycz/myreader/widget/page/PageMode.java b/app/src/main/java/xyz/fycz/myreader/widget/page/PageMode.java
index 5d55685..5b8f77b 100644
--- a/app/src/main/java/xyz/fycz/myreader/widget/page/PageMode.java
+++ b/app/src/main/java/xyz/fycz/myreader/widget/page/PageMode.java
@@ -1,7 +1,5 @@
package xyz.fycz.myreader.widget.page;
-import xyz.fycz.myreader.enums.BookSource;
-
/**
* Created by newbiechen on 2018/2/5.
* 作用:翻页动画的模式
diff --git a/app/src/main/res/drawable/ic_debug.xml b/app/src/main/res/drawable/ic_debug.xml
new file mode 100644
index 0000000..f0bf47a
--- /dev/null
+++ b/app/src/main/res/drawable/ic_debug.xml
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_filter.xml b/app/src/main/res/drawable/ic_filter.xml
new file mode 100644
index 0000000..77354e9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_filter.xml
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_menu.xml b/app/src/main/res/drawable/ic_menu.xml
new file mode 100644
index 0000000..b0ba0b6
--- /dev/null
+++ b/app/src/main/res/drawable/ic_menu.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_save.xml b/app/src/main/res/drawable/ic_save.xml
new file mode 100644
index 0000000..de2d35b
--- /dev/null
+++ b/app/src/main/res/drawable/ic_save.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_source.xml b/app/src/main/res/drawable/ic_source.xml
new file mode 100644
index 0000000..788d51f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_source.xml
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/app/src/main/res/layout/activity_booksource.xml b/app/src/main/res/layout/activity_booksource.xml
new file mode 100644
index 0000000..0c30753
--- /dev/null
+++ b/app/src/main/res/layout/activity_booksource.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_file_system.xml b/app/src/main/res/layout/activity_file_system.xml
index aa2300d..8313502 100644
--- a/app/src/main/res/layout/activity_file_system.xml
+++ b/app/src/main/res/layout/activity_file_system.xml
@@ -17,7 +17,7 @@
@@ -27,8 +27,8 @@
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginStart="15dp"
- android:text="全选"
- android:textSize="15dp"
+ android:text="@string/select_all"
+ android:textSize="15sp"
android:textColor="@color/textSecondary"
android:theme="@style/MyCheckBox" />
@@ -37,21 +37,21 @@
android:layout_width="wrap_content"
android:layout_height="35dp"
android:minWidth="110dp"
- android:layout_alignParentRight="true"
+ android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="@drawable/selector_btn_add"
android:textColor="@color/selector_btn_file_add"
- android:text="加入书架" />
+ android:text="@string/file_add_shelf" />
+ android:layout_toStartOf="@id/file_system_btn_add_book"
+ android:text="@string/delete"/>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_more_setting.xml b/app/src/main/res/layout/activity_more_setting.xml
index 668551a..05239ac 100644
--- a/app/src/main/res/layout/activity_more_setting.xml
+++ b/app/src/main/res/layout/activity_more_setting.xml
@@ -411,31 +411,6 @@
android:textColor="@color/textPrimary" />
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/activity_source_debug.xml b/app/src/main/res/layout/activity_source_debug.xml
new file mode 100644
index 0000000..420cf7a
--- /dev/null
+++ b/app/src/main/res/layout/activity_source_debug.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_source_edit.xml b/app/src/main/res/layout/activity_source_edit.xml
new file mode 100644
index 0000000..3bcc9fc
--- /dev/null
+++ b/app/src/main/res/layout/activity_source_edit.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_textview.xml b/app/src/main/res/layout/dialog_textview.xml
new file mode 100644
index 0000000..a35835c
--- /dev/null
+++ b/app/src/main/res/layout/dialog_textview.xml
@@ -0,0 +1,14 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_import_source.xml b/app/src/main/res/layout/fragment_import_source.xml
new file mode 100644
index 0000000..ce29b24
--- /dev/null
+++ b/app/src/main/res/layout/fragment_import_source.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_local_source.xml b/app/src/main/res/layout/fragment_local_source.xml
new file mode 100644
index 0000000..7d33635
--- /dev/null
+++ b/app/src/main/res/layout/fragment_local_source.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_mine.xml b/app/src/main/res/layout/fragment_mine.xml
index f49f246..ffc23ad 100644
--- a/app/src/main/res/layout/fragment_mine.xml
+++ b/app/src/main/res/layout/fragment_mine.xml
@@ -73,6 +73,36 @@
android:textColor="@color/textPrimary"
android:text="书架"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_local_source.xml b/app/src/main/res/layout/item_local_source.xml
new file mode 100644
index 0000000..89d61b8
--- /dev/null
+++ b/app/src/main/res/layout/item_local_source.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_replace_rule.xml b/app/src/main/res/layout/item_replace_rule.xml
index fabb87b..2d855c7 100644
--- a/app/src/main/res/layout/item_replace_rule.xml
+++ b/app/src/main/res/layout/item_replace_rule.xml
@@ -2,71 +2,72 @@
+ app:swipeEnable="true">
+ android:background="?android:attr/selectableItemBackground"
+ android:paddingStart="10dp"
+ android:paddingEnd="10dp">
+ android:maxLines="1"
+ android:text="@string/summary"
+ android:textColor="@color/textPrimary" />
+ android:layout_centerVertical="true"
+ app:srcCompat="@drawable/ic_swipe_left"
+ app:tint="@color/textAssist" />
-
-
+ android:textColor="@android:color/white" />
+
+ android:textColor="@android:color/white" />
+
+ android:textColor="@android:color/white" />
+ android:textColor="@android:color/white" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_source_edit.xml b/app/src/main/res/layout/item_source_edit.xml
new file mode 100644
index 0000000..7402f9f
--- /dev/null
+++ b/app/src/main/res/layout/item_source_edit.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/menu/menu_debug.xml b/app/src/main/res/menu/menu_debug.xml
new file mode 100644
index 0000000..3913080
--- /dev/null
+++ b/app/src/main/res/menu/menu_debug.xml
@@ -0,0 +1,12 @@
+
+
diff --git a/app/src/main/res/menu/menu_import_source.xml b/app/src/main/res/menu/menu_import_source.xml
new file mode 100644
index 0000000..f5a5794
--- /dev/null
+++ b/app/src/main/res/menu/menu_import_source.xml
@@ -0,0 +1,58 @@
+
+
diff --git a/app/src/main/res/menu/menu_rule.xml b/app/src/main/res/menu/menu_rule.xml
index 77c93e6..43da2b2 100644
--- a/app/src/main/res/menu/menu_rule.xml
+++ b/app/src/main/res/menu/menu_rule.xml
@@ -1,29 +1,34 @@
diff --git a/app/src/main/res/menu/menu_search.xml b/app/src/main/res/menu/menu_search.xml
index 03c072d..bd783dc 100644
--- a/app/src/main/res/menu/menu_search.xml
+++ b/app/src/main/res/menu/menu_search.xml
@@ -5,10 +5,16 @@
android:id="@+id/action_hot"
android:title="@string/hot_search"
android:visible="false"
- app:showAsAction="always" />
+ app:showAsAction="ifRoom" />
+
+ android:id="@+id/action_source_man"
+ android:title="@string/book_source_man"
+ app:showAsAction="never"/>
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/menu_source_edit.xml b/app/src/main/res/menu/menu_source_edit.xml
new file mode 100644
index 0000000..1c9c551
--- /dev/null
+++ b/app/src/main/res/menu/menu_source_edit.xml
@@ -0,0 +1,25 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml
index 18c87ec..5c63742 100644
--- a/app/src/main/res/values/ids.xml
+++ b/app/src/main/res/values/ids.xml
@@ -2,6 +2,8 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0801161..a68f9ac 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -344,6 +344,113 @@
更新目录
完成
热搜
+ 1、 正确填写WebDAV 服务器地址、WebDAV 账号、WebDAV 密码;
+ (要获得这三项的信息,需要注册一个坚果云账号,如果直接在手机上注册,坚果云会让你下载app,
+ 过程比较麻烦,为了一步到位,最好是在电脑上打开这个注册链接:
+ https://www.jianguoyun.com/d/signup;
+ 注册后,进入坚果云;点击右上角账户名处选择 “账户信息”,然后选择“安全选项”;
+ 在“安全选项” 中找到“第三方应用管理”,并选择“添加应用”,输入名称如“风月读书”后,会生成密码,
+ 选择完成;其中https://dav.jianguoyun.com/dav/就是填入“WebDAV 服务器地址”的内容,“使用情况”后面的邮箱地址就是你的“WebDAV 账号”,点击显示密码后得到的密码就是你的“WebDAV 密码”。)
+ \n\n2、 无需操作,APP默认每天自动云备份一次。
+ 基本
+ 搜索
+ 发现
+ 详情
+ 目录
+ 正文
+
+
+
+ 书源名称
+ 书源URL
+ 书源分组
+ 书源字符编码
+ 自定义源分组
+ 输入自定义源分组名称
+ 【%s】
+ 分类Url
+ 登录URL
+ 书源说明
+ 搜索地址
+ 搜索字符编码
+ 发现地址规则
+ 书籍列表规则
+ 书名规则
+ 详情页URL规则
+ 关联书籍详情
+ 作者规则
+ 分类规则
+ 简介规则
+ 封面规则
+ 最新章节规则
+ 字数规则
+ 连载状态规则
+ 书籍URL正则
+ 预处理规则
+ 目录URL规则
+ 目录列表区间
+ 目录下一页规则
+ 目录列表规则
+ 章节BaseURL规则
+ 章节名称(和URL)规则
+ 章节URL规则
+ VIP标识
+ 更新时间规则
+ 正文规则
+ 正文BaseURL规则
+ 正文下一页URL规则
+ webJs
+ 图片样式
+ 替换规则
+ 字体处理js
+ 资源正则
+
+
+ 图标
+ 列表规则
+ 列表下一页规则
+ 标题规则
+ guid规则
+ 时间规则
+ 类别规则
+ 描述规则
+ 图片url规则
+ 内容规则
+ 样式
+ 链接规则
+ 书源管理
+ 全选
+ 启用所选
+ 禁用所选
+ 校验所选
+ 校验
+ 新建书源
+ 导入书源
+ 书源说明
+ 取消全选
+ 删除禁用书源
+ 反转书源可用性
+ 编辑模式
+ 导出选中
+ 分享选中
+ 反转选中可用性
+ 完成编辑
+ 删除选中
+ 反选
+ 分享所有
+ 解析结果
+ 网页源码
+ 重新请求
+ 测试搜索配置
+ 测试书籍详情
+ 测试目录列表
+ 测试章节内容
+ 测试
+ 书源名称:%s\n书源URL:%s\n测试URL:%s
+ 启用书源
+ 解析器
+ 所有书源
+ 内置书源
- 常亮
@@ -418,5 +525,12 @@
- 从剪切板导入
- 从文件导入
+ - 从网络导入
+
+
+
+ - Matcher
+ - Xpath
+ - JsonPath
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index ee786c9..1975f8a 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -196,4 +196,11 @@
- @anim/slide_bottom_in
- @anim/slide_bottom_out
+
+
+ //
+
+
+
+
diff --git a/app/src/test/java/Test.java b/app/src/test/java/Test.java
index 8d02142..35b8b23 100644
--- a/app/src/test/java/Test.java
+++ b/app/src/test/java/Test.java
@@ -1,10 +1,20 @@
+import org.seimicrawler.xpath.JXDocument;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.util.List;
+
+import xyz.fycz.myreader.model.source.MatcherAnalyzer;
+import xyz.fycz.myreader.util.utils.FileUtils;
+import xyz.fycz.myreader.util.utils.NetworkUtils;
+
/**
* @author fengyue
* @date 2020/11/28 21:57
*/
public class Test {
@org.junit.Test
- public void test(){
+ public void test() {
String s = "tianlai(\"天籁小说\")," +
"biquge44(\"笔趣阁44\")," +
"pinshu(\"品书网\")," +
@@ -27,12 +37,40 @@ public class Test {
"ben100(\"100本·实体\")";
String[] ss = s.split(",");
StringBuilder sb = new StringBuilder();
- for (String s1 : ss){
+ for (String s1 : ss) {
sb.append(s1.substring(0, s1.indexOf("(")));
- sb.append("(MyApplication.getApplication().getString(R.string.read_");
+ sb.append("(App.getApplication().getString(R.string.read_");
sb.append(s1.substring(0, s1.indexOf("(")));
sb.append(")),\n");
}
System.out.println(sb.toString());
}
+
+ @org.junit.Test
+ public void testRegex() throws UnsupportedEncodingException {
+ String str = new String(FileUtils.getBytes(new File("D:\\Java\\Project\\FYReader-master\\app\\src\\test\\resources\\html.html")), "GBK");
+ MatcherAnalyzer analyzer = new MatcherAnalyzer();
+ String ruleList = "