From b7fc0b98f45a0f9f6d90b6b58aab59b49f5e01c1 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Tue, 16 Feb 2021 20:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81DIY=E4=B9=A6=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/assetWizardSettings.xml | 4 +- .idea/caches/build_file_checksums.ser | Bin 537 -> 537 bytes .idea/inspectionProfiles/Project_Default.xml | 2 +- README.md | 180 +- app/build.gradle | 20 +- .../myreader/ExampleInstrumentedTest.java | 20 +- .../java/xyz/fycz/myreader/TestAudioPlay.java | 8 +- app/src/main/AndroidManifest.xml | 7 +- .../main/assets/highlightjs/highlight.pack.js | 471 +++++ app/src/main/assets/highlightjs/rainbow.css | 85 + app/src/main/assets/webdavhelp.fy | 3 - .../{MyApplication.java => App.java} | 29 +- .../fycz/myreader/application/SysManager.java | 26 +- .../xyz/fycz/myreader/base/BaseActivity.java | 4 +- .../xyz/fycz/myreader/common/APPCONST.java | 13 +- .../fycz/myreader/entity/SearchBookBean.java | 1 + .../myreader/entity/sourcedebug/DebugBook.kt | 30 + .../entity/sourcedebug/DebugChapter.kt | 13 + .../entity/sourcedebug/DebugEntity.java | 100 + .../myreader/entity/sourcedebug/ListResult.kt | 10 + .../myreader/entity/sourceedit/EditEntity.kt | 12 + .../entity/sourceedit/EditEntityUtil.kt | 181 ++ .../xyz/fycz/myreader/enums/BookSource.java | 80 - .../fycz/myreader/enums/LocalBookSource.java | 80 + .../myreader/greendao/GreenDaoManager.java | 4 +- .../fycz/myreader/greendao/entity/Book.java | 42 +- .../greendao/entity/rule/BookSource.java | 373 ++++ .../greendao/entity/rule/ContentRule.java | 93 + .../greendao/entity/rule/FindRule.java | 185 ++ .../greendao/entity/rule/InfoRule.java | 175 ++ .../greendao/entity/rule/SearchRule.java | 236 +++ .../greendao/entity/rule/TocRule.java | 116 ++ .../rule/convert/ContentRuleConvert.java | 22 + .../entity/rule/convert/FindRuleConvert.java | 24 + .../entity/rule/convert/InfoRuleConvert.java | 23 + .../rule/convert/SearchRuleConvert.java | 23 + .../entity/rule/convert/TocRuleConvert.java | 23 + .../greendao/service/BookGroupService.java | 6 +- .../greendao/service/BookService.java | 10 +- .../greendao/util/MySQLiteOpenHelper.java | 4 +- .../myreader/model/ReplaceRuleManager.java | 34 +- .../xyz/fycz/myreader/model/SearchEngine.java | 6 +- .../model/audio/ReadAloudService.java | 7 +- .../myreader/model/backup/UserService.java | 20 +- .../myreader/model/source/BaseAnalyzer.java | 247 +++ .../model/source/BookSourceManager.java | 375 ++++ .../model/source/JsonPathAnalyzer.java | 84 + .../model/source/MatcherAnalyzer.java | 319 ++++ .../myreader/model/source/XpathAnalyzer.java | 117 ++ .../xyz/fycz/myreader/model/storage/Backup.kt | 9 +- .../fycz/myreader/model/storage/Restore.kt | 8 +- .../myreader/ui/activity/AboutActivity.java | 8 +- .../ui/activity/BookDetailedActivity.java | 34 +- .../ui/activity/BookSourceActivity.java | 145 ++ .../ui/activity/BookstoreActivity.java | 18 +- .../ui/activity/FeedbackActivity.java | 6 +- .../ui/activity/FileSystemActivity.java | 47 +- .../myreader/ui/activity/LoginActivity.java | 13 +- .../myreader/ui/activity/MainActivity.java | 16 +- .../ui/activity/MoreSettingActivity.java | 71 +- .../myreader/ui/activity/ReadActivity.java | 50 +- .../ui/activity/RegisterActivity.java | 12 +- .../ui/activity/ReplaceRuleActivity.java | 312 ++++ .../myreader/ui/activity/RuleActivity.java | 258 --- .../ui/activity/SearchBookActivity.java | 178 +- .../ui/activity/SourceDebugActivity.java | 273 +++ .../ui/activity/SourceEditActivity.java | 280 +++ .../myreader/ui/activity/SplashActivity.java | 6 +- .../ui/adapter/BaseSourceAdapter.java | 129 ++ .../ui/adapter/BookSourceAdapter.java | 98 + .../ui/adapter/BookStoreBookAdapter.java | 10 +- .../myreader/ui/adapter/BookcaseAdapter.java | 11 +- .../ui/adapter/BookcaseDetailedAdapter.java | 5 +- .../ui/adapter/BookcaseDragAdapter.java | 15 +- .../myreader/ui/adapter/FontsAdapter.java | 4 +- .../ui/adapter/LocalSourceAdapter.java | 61 + .../ui/adapter/ReplaceRuleAdapter.java | 85 +- .../ui/adapter/SearchBookAdapter.java | 24 +- .../ui/adapter/SearchHistoryAdapter.java | 4 - .../ui/adapter/SourceEditAdapter.java | 17 + .../ui/adapter/helper/ItemTouchCallback.java | 160 ++ .../ui/adapter/holder/BookSourceHolder.java | 185 ++ .../adapter/holder/BookStoreBookHolder.java | 17 +- .../ui/adapter/holder/LocalSourceHolder.java | 67 + .../ui/adapter/holder/ReplaceRuleHolder.java | 28 +- .../ui/adapter/holder/SearchBookHolder.java | 63 +- .../ui/adapter/holder/SourceEditHolder.kt | 79 + .../adapter/holder/SourceExchangeHolder.java | 4 +- .../myreader/ui/dialog/APPDownloadTip.java | 7 +- .../myreader/ui/dialog/AudioPlayerDialog.java | 4 +- .../ui/dialog/ChangeSourceDialog.java | 5 +- .../myreader/ui/dialog/DialogCreator.java | 29 +- .../myreader/ui/dialog/MyAlertDialog.java | 17 +- .../myreader/ui/dialog/ReplaceDialog.java | 42 +- .../ui/dialog/SourceExchangeDialog.java | 2 +- .../ui/fragment/DIYSourceFragment.java | 432 +++++ .../ui/fragment/LocalSourceFragment.java | 125 ++ .../myreader/ui/fragment/MineFragment.java | 36 +- .../ui/fragment/PrivateBooksFragment.java | 4 +- .../ui/presenter/BookcasePresenter.java | 40 +- .../ui/presenter/CatalogPresenter.java | 7 +- .../xyz/fycz/myreader/util/CacheHelper.java | 12 +- .../java/xyz/fycz/myreader/util/HttpUtil.java | 10 +- .../fycz/myreader/util/SharedPreUtils.java | 4 +- .../xyz/fycz/myreader/util/ToastUtils.java | 44 +- .../xyz/fycz/myreader/util/UriFileUtil.java | 65 +- .../NotificationClickReceiver.java | 4 +- .../util/notification/NotificationUtil.java | 14 +- .../myreader/util/utils/AudioMngHelper.java | 4 +- .../fycz/myreader/util/utils/BitmapUtil.java | 4 +- .../myreader/util/utils/ClipBoardUtil.java | 3 - .../fycz/myreader/util/utils/FileUtils.java | 6 +- .../myreader/util/utils/GsonExtensions.kt | 108 +- .../myreader/util/utils/KeyWordUtils.java | 27 + .../myreader/util/utils/NetworkUtils.java | 101 +- .../myreader/util/utils/ProgressUtils.java | 39 + .../fycz/myreader/util/utils/ScreenUtils.java | 10 +- .../myreader/util/utils/SnackbarUtils.java | 7 +- .../fycz/myreader/util/utils/StringUtils.java | 326 +++- .../xyz/fycz/myreader/webapi/CommonApi.java | 17 +- .../xyz/fycz/myreader/webapi/LanZousApi.java | 6 +- .../webapi/crawler/ReadCrawlerUtil.java | 129 +- .../crawler/base/BaseSourceCrawler.java | 361 ++++ .../crawler/base/BaseSourceCrawlerNoInfo.java | 61 + .../webapi/crawler/base/BookInfoCrawler.java | 1 + .../webapi/crawler/find/QiDianMobileRank.java | 7 +- .../crawler/read/Ben100ReadCrawler.java | 13 +- .../crawler/read/BiJianReadCrawler.java | 5 +- .../crawler/read/BiQuGe44ReadCrawler.java | 12 +- .../crawler/read/BiQuGeReadCrawler.java | 10 +- .../crawler/read/CansShu99ReadCrawler.java | 8 +- .../crawler/read/ChaoXingReadCrawler.java | 4 +- .../crawler/read/ChuanQiReadCrawler.java | 10 +- .../webapi/crawler/read/DSTQReadCrawler.java | 8 +- .../webapi/crawler/read/Du1DuReadCrawler.java | 11 +- .../crawler/read/EWenXueReadCrawler.java | 8 +- .../webapi/crawler/read/FYReadCrawler.java | 4 +- .../crawler/read/HongChenReadCrawler.java | 6 +- .../crawler/read/JiuTaoReadCrawler.java | 8 +- .../crawler/read/LaoYaoReadCrawler.java | 11 +- .../crawler/read/LiuLangCatReadCrawler.java | 12 +- .../crawler/read/LuoQiuReadCrawler.java | 6 +- .../webapi/crawler/read/MiQuReadCrawler.java | 4 +- .../crawler/read/MiaoBiReadCrawler.java | 12 +- .../crawler/read/PiaoTianReadCrawler.java | 7 +- .../crawler/read/PinShuReadCrawler.java | 3 +- .../crawler/read/PinShuReadCrawler2.java | 3 +- .../webapi/crawler/read/QB5ReadCrawler.java | 16 +- .../webapi/crawler/read/QiQiReadCrawler.java | 6 +- .../crawler/read/QuanNovelReadCrawler.java | 10 +- .../webapi/crawler/read/ReXueReadCrawler.java | 5 +- .../crawler/read/ShiGuangReadCrawler.java | 10 +- .../crawler/read/ShuHaiGeReadCrawler.java | 10 +- .../crawler/read/SoNovelReadCrawler.java | 10 +- .../crawler/read/TianLaiReadCrawler.java | 8 +- .../crawler/read/WoLongReadCrawler.java | 4 +- .../crawler/read/XBiQuGeReadCrawler.java | 5 +- .../webapi/crawler/read/XS7ReadCrawler.java | 6 +- .../webapi/crawler/read/XS7ReadCrawler2.java | 6 +- .../webapi/crawler/read/XiaGuReadCrawler.java | 6 +- .../crawler/read/XingXingReadCrawler.java | 7 +- .../crawler/read/YanQingLouReadCrawler.java | 13 +- .../crawler/read/YunZhongReadCrawler.java | 6 +- .../webapi/crawler/read/ZW37ReadCrawler.java | 10 +- .../crawler/read/ZaiShuYuanReadCrawler.java | 14 +- .../crawler/read/ZuoPinReadCrawler.java | 4 +- .../crawler/source/JsonPathCrawler.java | 78 + .../webapi/crawler/source/MatcherCrawler.java | 102 ++ .../webapi/crawler/source/XpathCrawler.java | 68 + .../myreader/widget/codeview/CodeView.java | 216 +++ .../myreader/widget/codeview/Language.java | 38 + .../myreader/widget/page/NetPageLoader.java | 6 +- .../fycz/myreader/widget/page/PageLoader.java | 5 +- .../fycz/myreader/widget/page/PageMode.java | 2 - app/src/main/res/drawable/ic_debug.xml | 12 + app/src/main/res/drawable/ic_filter.xml | 12 + app/src/main/res/drawable/ic_menu.xml | 15 + app/src/main/res/drawable/ic_save.xml | 9 + app/src/main/res/drawable/ic_source.xml | 12 + .../main/res/layout/activity_booksource.xml | 44 + .../main/res/layout/activity_file_system.xml | 16 +- .../main/res/layout/activity_more_setting.xml | 25 - ...ity_rule.xml => activity_replace_rule.xml} | 0 .../main/res/layout/activity_search_book.xml | 1 - .../main/res/layout/activity_source_debug.xml | 64 + .../main/res/layout/activity_source_edit.xml | 89 + app/src/main/res/layout/dialog_textview.xml | 14 + .../res/layout/fragment_import_source.xml | 93 + .../main/res/layout/fragment_local_source.xml | 71 + app/src/main/res/layout/fragment_mine.xml | 30 + app/src/main/res/layout/item_book_source.xml | 88 + app/src/main/res/layout/item_local_source.xml | 57 + app/src/main/res/layout/item_replace_rule.xml | 43 +- app/src/main/res/layout/item_source_edit.xml | 30 + app/src/main/res/menu/menu_debug.xml | 12 + app/src/main/res/menu/menu_import_source.xml | 58 + app/src/main/res/menu/menu_rule.xml | 29 +- app/src/main/res/menu/menu_search.xml | 14 +- app/src/main/res/menu/menu_source_edit.xml | 25 + app/src/main/res/values/ids.xml | 2 + app/src/main/res/values/strings.xml | 114 ++ app/src/main/res/values/styles.xml | 7 + app/src/test/java/Test.java | 44 +- app/src/test/resources/html.html | 1617 +++++++++++++++++ app/version_code.properties | 4 +- source/DIYSource.md | 216 +++ source/LocalSource.md | 171 ++ 207 files changed, 11191 insertions(+), 1560 deletions(-) create mode 100644 app/src/main/assets/highlightjs/highlight.pack.js create mode 100644 app/src/main/assets/highlightjs/rainbow.css delete mode 100644 app/src/main/assets/webdavhelp.fy rename app/src/main/java/xyz/fycz/myreader/application/{MyApplication.java => App.java} (95%) create mode 100644 app/src/main/java/xyz/fycz/myreader/entity/sourcedebug/DebugBook.kt create mode 100644 app/src/main/java/xyz/fycz/myreader/entity/sourcedebug/DebugChapter.kt create mode 100644 app/src/main/java/xyz/fycz/myreader/entity/sourcedebug/DebugEntity.java create mode 100644 app/src/main/java/xyz/fycz/myreader/entity/sourcedebug/ListResult.kt create mode 100644 app/src/main/java/xyz/fycz/myreader/entity/sourceedit/EditEntity.kt create mode 100644 app/src/main/java/xyz/fycz/myreader/entity/sourceedit/EditEntityUtil.kt delete mode 100644 app/src/main/java/xyz/fycz/myreader/enums/BookSource.java create mode 100644 app/src/main/java/xyz/fycz/myreader/enums/LocalBookSource.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/BookSource.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/ContentRule.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/FindRule.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/InfoRule.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/SearchRule.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/TocRule.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/convert/ContentRuleConvert.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/convert/FindRuleConvert.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/convert/InfoRuleConvert.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/convert/SearchRuleConvert.java create mode 100644 app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/convert/TocRuleConvert.java create mode 100644 app/src/main/java/xyz/fycz/myreader/model/source/BaseAnalyzer.java create mode 100644 app/src/main/java/xyz/fycz/myreader/model/source/BookSourceManager.java create mode 100644 app/src/main/java/xyz/fycz/myreader/model/source/JsonPathAnalyzer.java create mode 100644 app/src/main/java/xyz/fycz/myreader/model/source/MatcherAnalyzer.java create mode 100644 app/src/main/java/xyz/fycz/myreader/model/source/XpathAnalyzer.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/activity/BookSourceActivity.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/activity/ReplaceRuleActivity.java delete mode 100644 app/src/main/java/xyz/fycz/myreader/ui/activity/RuleActivity.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/activity/SourceDebugActivity.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/activity/SourceEditActivity.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/BaseSourceAdapter.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/BookSourceAdapter.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/LocalSourceAdapter.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/SourceEditAdapter.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/helper/ItemTouchCallback.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/BookSourceHolder.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/LocalSourceHolder.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/adapter/holder/SourceEditHolder.kt create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/fragment/DIYSourceFragment.java create mode 100644 app/src/main/java/xyz/fycz/myreader/ui/fragment/LocalSourceFragment.java create mode 100644 app/src/main/java/xyz/fycz/myreader/util/utils/KeyWordUtils.java create mode 100644 app/src/main/java/xyz/fycz/myreader/util/utils/ProgressUtils.java create mode 100644 app/src/main/java/xyz/fycz/myreader/webapi/crawler/base/BaseSourceCrawler.java create mode 100644 app/src/main/java/xyz/fycz/myreader/webapi/crawler/base/BaseSourceCrawlerNoInfo.java create mode 100644 app/src/main/java/xyz/fycz/myreader/webapi/crawler/source/JsonPathCrawler.java create mode 100644 app/src/main/java/xyz/fycz/myreader/webapi/crawler/source/MatcherCrawler.java create mode 100644 app/src/main/java/xyz/fycz/myreader/webapi/crawler/source/XpathCrawler.java create mode 100644 app/src/main/java/xyz/fycz/myreader/widget/codeview/CodeView.java create mode 100644 app/src/main/java/xyz/fycz/myreader/widget/codeview/Language.java create mode 100644 app/src/main/res/drawable/ic_debug.xml create mode 100644 app/src/main/res/drawable/ic_filter.xml create mode 100644 app/src/main/res/drawable/ic_menu.xml create mode 100644 app/src/main/res/drawable/ic_save.xml create mode 100644 app/src/main/res/drawable/ic_source.xml create mode 100644 app/src/main/res/layout/activity_booksource.xml rename app/src/main/res/layout/{activity_rule.xml => activity_replace_rule.xml} (100%) create mode 100644 app/src/main/res/layout/activity_source_debug.xml create mode 100644 app/src/main/res/layout/activity_source_edit.xml create mode 100644 app/src/main/res/layout/dialog_textview.xml create mode 100644 app/src/main/res/layout/fragment_import_source.xml create mode 100644 app/src/main/res/layout/fragment_local_source.xml create mode 100644 app/src/main/res/layout/item_book_source.xml create mode 100644 app/src/main/res/layout/item_local_source.xml create mode 100644 app/src/main/res/layout/item_source_edit.xml create mode 100644 app/src/main/res/menu/menu_debug.xml create mode 100644 app/src/main/res/menu/menu_import_source.xml create mode 100644 app/src/main/res/menu/menu_source_edit.xml create mode 100644 app/src/test/resources/html.html create mode 100644 source/DIYSource.md create mode 100644 source/LocalSource.md diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml index a462dcb..78b45be 100644 --- a/.idea/assetWizardSettings.xml +++ b/.idea/assetWizardSettings.xml @@ -19,8 +19,8 @@ diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 65ad24d3ecb735bab512d2e854755fe8da6d981f..4c1c04b7cec75685a4ce1e4b3c1e1a85951b7637 100644 GIT binary patch delta 35 tcmV+;0NnqX1epYom;|F!hjEddcMyVNH7nP@f3aYtt^G_GUuKgd0rn2c510S| delta 35 tcmV+;0NnqX1epYom;_sKqPdZrcMzEF?^oyyy6Q&=Ro}5xN8ghp0rn=?5di=I diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 6560a98..178e71f 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -30,7 +30,7 @@