feat: 支持 EPUB 阅读并改善规则兼容与阅读稳定性

支持 EPUB 2/3 导入、目录、封面和章节插图,保留本地书管理与阅读进度。
修复 JSON 模板、动态替换与请求参数兼容,以及 RSS 翻页和连续滚动定位。
更新编辑器工具栏和回归测试,发布版本为 0.1.12(build 18)。
This commit is contained in:
Aminark
2026-10-24 00:58:11 +08:00
parent 3322fd71db
commit 67bc212ffd
58 changed files with 2331 additions and 244 deletions
+30 -4
View File
@@ -14,6 +14,7 @@
B10000000000000000000029 /* ReaderScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20000000000000000000029 /* ReaderScrollView.swift */; };
F10000000000000000000001 /* SwiftSoup in Frameworks */ = {isa = PBXBuildFile; productRef = F20000000000000000000001 /* SwiftSoup */; };
F10000000000000000000002 /* Kanna in Frameworks */ = {isa = PBXBuildFile; productRef = F20000000000000000000002 /* Kanna */; };
F10000000000000000000003 /* ZIPFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = F20000000000000000000003 /* ZIPFoundation */; };
A10000000000000000000001 /* LegadoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000001 /* LegadoApp.swift */; };
A10000000000000000000002 /* RootTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000002 /* RootTabView.swift */; };
A10000000000000000000003 /* SourceLibraryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20000000000000000000003 /* SourceLibraryModel.swift */; };
@@ -123,6 +124,9 @@
AA1100000000000000000008 = {isa = PBXBuildFile; fileRef = AA2200000000000000000008; };
AA1100000000000000000009 = {isa = PBXBuildFile; fileRef = AA2200000000000000000009; };
AA1100000000000000000010 = {isa = PBXBuildFile; fileRef = AA2200000000000000000010; };
EB1000000000000000000001 /* EPUBBook.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2000000000000000000001; };
EB1000000000000000000002 /* ZIPFoundation-LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = EB2000000000000000000002; };
EB1000000000000000000003 /* EPUBIllustrationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2000000000000000000003; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -245,6 +249,9 @@
AA2200000000000000000008 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/LegadoCore/Import/QRCodeDecoder.swift; sourceTree = SOURCE_ROOT; };
AA2200000000000000000009 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests/LegadoReaderUITests/RuleEditorUITests.swift; sourceTree = SOURCE_ROOT; };
AA2200000000000000000010 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests/LegadoReaderUITests/LiveReadingFlowUITests.swift; sourceTree = SOURCE_ROOT; };
EB2000000000000000000001 /* EPUBBook.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/LegadoCore/LocalBook/EPUBBook.swift; sourceTree = SOURCE_ROOT; };
EB2000000000000000000002 /* ZIPFoundation-LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = App/Resources/ZIPFoundation-LICENSE.txt; sourceTree = SOURCE_ROOT; };
EB2000000000000000000003 /* EPUBIllustrationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App/Features/Reader/EPUBIllustrationsView.swift; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -256,6 +263,7 @@
files = (
F10000000000000000000001 /* SwiftSoup in Frameworks */,
F10000000000000000000002 /* Kanna in Frameworks */,
F10000000000000000000003 /* ZIPFoundation in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -353,6 +361,7 @@
A20000000000000000000029 /* ReaderSpeechController.swift */,
A20000000000000000000028 /* ReaderAppearance.swift */,
A2000000000000000000002B /* ReaderSupport.swift */,
EB2000000000000000000003 /* EPUBIllustrationsView.swift */,
);
path = Features/Reader;
sourceTree = "<group>";
@@ -527,6 +536,7 @@
children = (
F21000000000000000000002 /* LocalFileService.swift */,
C20000000000000000000018 /* LocalBookService.swift */,
EB2000000000000000000001 /* EPUBBook.swift */,
);
path = LocalBook;
sourceTree = "<group>";
@@ -589,6 +599,7 @@
E20000000000000000000008 /* Legado-LICENSE.txt */,
E20000000000000000000009 /* SwiftSoup-LICENSE.txt */,
E2000000000000000000000A /* Kanna-LICENSE.txt */,
EB2000000000000000000002 /* ZIPFoundation-LICENSE.txt */,
);
path = Resources;
sourceTree = "<group>";
@@ -622,6 +633,7 @@
packageProductDependencies = (
F20000000000000000000001 /* SwiftSoup */,
F20000000000000000000002 /* Kanna */,
F20000000000000000000003 /* ZIPFoundation */,
);
productName = Legado;
productReference = D20000000000000000000001 /* Legado.app */;
@@ -659,6 +671,7 @@
packageReferences = (
F30000000000000000000001 /* XCRemoteSwiftPackageReference "SwiftSoup" */,
F30000000000000000000002 /* XCRemoteSwiftPackageReference "Kanna" */,
F30000000000000000000003 /* XCRemoteSwiftPackageReference "ZIPFoundation" */,
);
productRefGroup = D40000000000000000000002 /* Products */;
projectDirPath = "";
@@ -677,6 +690,7 @@
910000000000000000000008 /* Legado-LICENSE.txt in Resources */,
A10000000000000000000020 /* Assets.xcassets in Resources */,
A1000000000000000000001D /* txtTocRule.json in Resources */,
EB1000000000000000000002 /* ZIPFoundation-LICENSE.txt in Resources */,
A1000000000000000000001E /* httpTTS.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -770,6 +784,8 @@
C10000000000000000000016 /* BookExploreService.swift in Sources */,
C10000000000000000000017 /* BookSourceDebugger.swift in Sources */,
C10000000000000000000018 /* LocalBookService.swift in Sources */,
EB1000000000000000000003 /* EPUBIllustrationsView.swift in Sources */,
EB1000000000000000000001 /* EPUBBook.swift in Sources */,
C10000000000000000000019 /* ContentSanitizer.swift in Sources */,
C1000000000000000000001A /* ReplaceRuleRepository.swift in Sources */,
C1000000000000000000001B /* ReadingActivityRepository.swift in Sources */,
@@ -864,12 +880,12 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 17;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_ASSET_PATHS = "";
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 0.1.11;
MARKETING_VERSION = 0.1.12;
OTHER_LDFLAGS = "$(inherited) -lsqlite3";
PRODUCT_BUNDLE_IDENTIFIER = com.epiboly.legado;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -885,11 +901,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 17;
CURRENT_PROJECT_VERSION = 18;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 0.1.11;
MARKETING_VERSION = 0.1.12;
OTHER_LDFLAGS = "$(inherited) -lsqlite3";
PRODUCT_BUNDLE_IDENTIFIER = com.epiboly.legado;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -930,6 +946,11 @@
repositoryURL = "https://github.com/tid-kijyun/Kanna.git";
requirement = { kind = exactVersion; version = 6.1.0; };
};
F30000000000000000000003 /* XCRemoteSwiftPackageReference "ZIPFoundation" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/weichsel/ZIPFoundation.git";
requirement = { kind = exactVersion; version = 0.9.20; };
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -943,6 +964,11 @@
package = F30000000000000000000002 /* XCRemoteSwiftPackageReference "Kanna" */;
productName = Kanna;
};
F20000000000000000000003 /* ZIPFoundation */ = {
isa = XCSwiftPackageProductDependency;
package = F30000000000000000000003 /* XCRemoteSwiftPackageReference "ZIPFoundation" */;
productName = ZIPFoundation;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = D70000000000000000000001 /* Project object */;