Compare commits

...

27 Commits

Author SHA1 Message Date
vegardbm b6789a10d7 regex: allow p123-p123 and p123-123 2026-07-14 23:51:59 +02:00
vegardbm 9acb6a3e3c ImageLoader: add method for scaling images, cache unscaled images, and
set image early.
2026-07-14 23:20:46 +02:00
vegardbm 554a4022c9 perf: shortcircuit scrollingImageView 2026-07-14 00:10:36 +02:00
vegardbm 9baba413d3 fix: avoid rescaling horizontal images 2026-07-14 00:06:50 +02:00
vegardbm 67bc375e17 clean up calls for loadImage and preloadImage 2026-07-13 21:35:01 +02:00
vegardbm e178681027 convenience for getImagePath and simplified logic in loadImage 2026-07-13 21:07:00 +02:00
vegardbm 1717ae13d1 remove unused function countFiles 2026-07-13 20:47:39 +02:00
vegardbm ec33bfd20d added helper getArchiveURL and removed helper setupScrolling 2026-07-13 20:47:00 +02:00
vegardbm f42e44e1af fix: make sure volumeURLs are sorted, and are set correctly in metadata 2026-07-13 03:33:42 +02:00
vegardbm 4cab14d9ae remove fixed TODO 2026-07-13 01:04:55 +02:00
vegardbm 9bdd2f350f fix: regression for run.sh 2026-07-13 01:02:22 +02:00
vegardbm 00b3a28a62 use separate caches for scaleAspectFill 2026-07-13 00:55:06 +02:00
vegardbm 2f0e7f1821 feat: load images from cbz files instead 2026-07-12 23:58:34 +02:00
vegardbm ea8d128af5 dependencies: add ZIPFoundation 2026-07-12 23:58:34 +02:00
vegardbm 0fad959e6c fix: handle collectionView() when metadata == nil 2026-07-12 03:27:18 +02:00
vegardbm 400febc7b3 scrolling: reload data when changing orientation 2026-07-11 22:31:02 +02:00
vegardbm 193bef4def ImageLoader: cancel irrelevant image loads 2026-07-11 22:29:14 +02:00
vegardbm 26e9cf6268 remove size as part of ImageLoader cache 2026-07-09 23:36:44 +02:00
vegardbm be5e513cbc feat: reintroduce scrolling 2026-07-09 23:20:16 +02:00
vegardbm dcb26e47b4 add flatbuffers as submodule dependency 2026-07-09 22:47:59 +02:00
vegardbm b522434423 fix: add a LaunchScreen to fix warning 2026-07-07 22:22:03 +02:00
vegardbm 7bc32d2acb fix duplication of last ImageMetadata for a comic 2026-07-07 19:48:11 +02:00
vegardbm eece772791 allow handling multiple file name patterns 2026-07-05 03:12:50 +02:00
vegardbm 3fa5bb3840 scripts: fail hard and early 2026-07-04 20:20:40 +02:00
vegardbm 2c1626cf5a add image size and comic title to metadata extraction 2026-04-07 05:33:41 +02:00
vegardbm 5f8bd8b202 perf: use flatbuffers instead of json for metadata 2026-04-07 04:23:21 +02:00
vegardbm 721ffed265 fix loading scaled image on viewTransition 2026-02-27 03:58:36 +01:00
15 changed files with 1377 additions and 362 deletions
+2
View File
@@ -5,3 +5,5 @@ buildServer.json
.swiftlint.yml .swiftlint.yml
/ImageViewer.xcodeproj/xcuserdata /ImageViewer.xcodeproj/xcuserdata
/ImageViewer.xcodeproj/project.xcworkspace/xcuserdata /ImageViewer.xcodeproj/project.xcworkspace/xcuserdata
/ImageViewer/flatc
/worktrees
+3
View File
@@ -0,0 +1,3 @@
[submodule "dependencies/flatbuffers"]
path = dependencies/flatbuffers
url = https://github.com/google/flatbuffers.git
+1 -1
View File
@@ -4,7 +4,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>method</key> <key>method</key>
<string>development</string> <string>debugging</string>
<key>signingStyle</key> <key>signingStyle</key>
<string>automatic</string> <string>automatic</string>
<key>destination</key> <key>destination</key>
+86 -5
View File
@@ -3,16 +3,27 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 56; objectVersion = 60;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
2207C8012FFD96480094550F /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2207C8002FFD96480094550F /* Launch Screen.storyboard */; };
228A32B12F849062008A980A /* metadata_generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 228A32B02F849062008A980A /* metadata_generated.swift */; };
22B015A72F82A2DC0088F94F /* FlatBuffers in Frameworks */ = {isa = PBXBuildFile; productRef = 22B015A62F82A2DC0088F94F /* FlatBuffers */; };
22B015A92F82A2DC0088F94F /* FlexBuffers in Frameworks */ = {isa = PBXBuildFile; productRef = 22B015A82F82A2DC0088F94F /* FlexBuffers */; };
22EF4C5B2FFDC39600852A4F /* FlatBuffers in Frameworks */ = {isa = PBXBuildFile; productRef = 22EF4C5A2FFDC39600852A4F /* FlatBuffers */; };
22EF4C5D2FFDC39600852A4F /* FlexBuffers in Frameworks */ = {isa = PBXBuildFile; productRef = 22EF4C5C2FFDC39600852A4F /* FlexBuffers */; };
840F62692E7B65B700C8A64A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840F62682E7B65B700C8A64A /* AppDelegate.swift */; }; 840F62692E7B65B700C8A64A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840F62682E7B65B700C8A64A /* AppDelegate.swift */; };
840F626D2E7B65B700C8A64A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840F626C2E7B65B700C8A64A /* ViewController.swift */; }; 840F626D2E7B65B700C8A64A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840F626C2E7B65B700C8A64A /* ViewController.swift */; };
840F62722E7B65B900C8A64A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 840F62712E7B65B900C8A64A /* Assets.xcassets */; }; 840F62722E7B65B900C8A64A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 840F62712E7B65B900C8A64A /* Assets.xcassets */; };
9A77032C300317E4004A0222 /* ZIPFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = 9A77032B300317E4004A0222 /* ZIPFoundation */; };
9A77032F30031A32004A0222 /* FlatBuffers in Frameworks */ = {isa = PBXBuildFile; productRef = 9A77032E30031A32004A0222 /* FlatBuffers */; };
9A77033130031A32004A0222 /* FlexBuffers in Frameworks */ = {isa = PBXBuildFile; productRef = 9A77033030031A32004A0222 /* FlexBuffers */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
2207C8002FFD96480094550F /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = SOURCE_ROOT; };
228A32B02F849062008A980A /* metadata_generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = metadata_generated.swift; sourceTree = "<group>"; };
840F62652E7B65B700C8A64A /* ImageViewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImageViewer.app; sourceTree = BUILT_PRODUCTS_DIR; }; 840F62652E7B65B700C8A64A /* ImageViewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImageViewer.app; sourceTree = BUILT_PRODUCTS_DIR; };
840F62682E7B65B700C8A64A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 840F62682E7B65B700C8A64A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
840F626C2E7B65B700C8A64A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; }; 840F626C2E7B65B700C8A64A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -25,6 +36,13 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
22EF4C5B2FFDC39600852A4F /* FlatBuffers in Frameworks */,
22B015A72F82A2DC0088F94F /* FlatBuffers in Frameworks */,
22B015A92F82A2DC0088F94F /* FlexBuffers in Frameworks */,
9A77032F30031A32004A0222 /* FlatBuffers in Frameworks */,
22EF4C5D2FFDC39600852A4F /* FlexBuffers in Frameworks */,
9A77033130031A32004A0222 /* FlexBuffers in Frameworks */,
9A77032C300317E4004A0222 /* ZIPFoundation in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -50,6 +68,8 @@
840F62672E7B65B700C8A64A /* ImageViewer */ = { 840F62672E7B65B700C8A64A /* ImageViewer */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2207C8002FFD96480094550F /* Launch Screen.storyboard */,
228A32B02F849062008A980A /* metadata_generated.swift */,
840F62682E7B65B700C8A64A /* AppDelegate.swift */, 840F62682E7B65B700C8A64A /* AppDelegate.swift */,
840F626C2E7B65B700C8A64A /* ViewController.swift */, 840F626C2E7B65B700C8A64A /* ViewController.swift */,
840F62712E7B65B900C8A64A /* Assets.xcassets */, 840F62712E7B65B900C8A64A /* Assets.xcassets */,
@@ -86,7 +106,7 @@
attributes = { attributes = {
BuildIndependentTargetsInParallel = 1; BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1420; LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1420; LastUpgradeCheck = 1640;
TargetAttributes = { TargetAttributes = {
840F62642E7B65B700C8A64A = { 840F62642E7B65B700C8A64A = {
CreatedOnToolsVersion = 14.2; CreatedOnToolsVersion = 14.2;
@@ -102,6 +122,10 @@
Base, Base,
); );
mainGroup = 840F625C2E7B65B700C8A64A; mainGroup = 840F625C2E7B65B700C8A64A;
packageReferences = (
9A77032A300317E4004A0222 /* XCRemoteSwiftPackageReference "ZIPFoundation" */,
9A77032D30031A32004A0222 /* XCLocalSwiftPackageReference "dependencies/flatbuffers" */,
);
productRefGroup = 840F62662E7B65B700C8A64A /* Products */; productRefGroup = 840F62662E7B65B700C8A64A /* Products */;
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
@@ -116,6 +140,7 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
2207C8012FFD96480094550F /* Launch Screen.storyboard in Resources */,
840F62722E7B65B900C8A64A /* Assets.xcassets in Resources */, 840F62722E7B65B900C8A64A /* Assets.xcassets in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@@ -129,6 +154,7 @@
files = ( files = (
840F626D2E7B65B700C8A64A /* ViewController.swift in Sources */, 840F626D2E7B65B700C8A64A /* ViewController.swift in Sources */,
840F62692E7B65B700C8A64A /* AppDelegate.swift in Sources */, 840F62692E7B65B700C8A64A /* AppDelegate.swift in Sources */,
228A32B12F849062008A980A /* metadata_generated.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -169,8 +195,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = U5B4RH73LN;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
@@ -185,7 +213,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
@@ -230,8 +258,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = U5B4RH73LN;
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -240,7 +270,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@@ -262,6 +292,7 @@
INFOPLIST_FILE = ImageViewer/Info.plist; INFOPLIST_FILE = ImageViewer/Info.plist;
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
@@ -284,11 +315,11 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = U5B4RH73LN;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ImageViewer/Info.plist; INFOPLIST_FILE = ImageViewer/Info.plist;
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
@@ -326,6 +357,56 @@
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
9A77032D30031A32004A0222 /* XCLocalSwiftPackageReference "dependencies/flatbuffers" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = dependencies/flatbuffers;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCRemoteSwiftPackageReference section */
9A77032A300317E4004A0222 /* XCRemoteSwiftPackageReference "ZIPFoundation" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/weichsel/ZIPFoundation.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.9.20;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
22B015A62F82A2DC0088F94F /* FlatBuffers */ = {
isa = XCSwiftPackageProductDependency;
productName = FlatBuffers;
};
22B015A82F82A2DC0088F94F /* FlexBuffers */ = {
isa = XCSwiftPackageProductDependency;
productName = FlexBuffers;
};
22EF4C5A2FFDC39600852A4F /* FlatBuffers */ = {
isa = XCSwiftPackageProductDependency;
productName = FlatBuffers;
};
22EF4C5C2FFDC39600852A4F /* FlexBuffers */ = {
isa = XCSwiftPackageProductDependency;
productName = FlexBuffers;
};
9A77032B300317E4004A0222 /* ZIPFoundation */ = {
isa = XCSwiftPackageProductDependency;
package = 9A77032A300317E4004A0222 /* XCRemoteSwiftPackageReference "ZIPFoundation" */;
productName = ZIPFoundation;
};
9A77032E30031A32004A0222 /* FlatBuffers */ = {
isa = XCSwiftPackageProductDependency;
productName = FlatBuffers;
};
9A77033030031A32004A0222 /* FlexBuffers */ = {
isa = XCSwiftPackageProductDependency;
productName = FlexBuffers;
};
/* End XCSwiftPackageProductDependency section */
}; };
rootObject = 840F625D2E7B65B700C8A64A /* Project object */; rootObject = 840F625D2E7B65B700C8A64A /* Project object */;
} }
@@ -0,0 +1,15 @@
{
"originHash" : "1d2ea13999643e07c5cb84a07c2cd10221ddf2714932691ba7147378d56f57ac",
"pins" : [
{
"identity" : "zipfoundation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/weichsel/ZIPFoundation.git",
"state" : {
"revision" : "22787ffb59de99e5dc1fbfe80b19c97a904ad48d",
"version" : "0.9.20"
}
}
],
"version" : 3
}
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1420" LastUpgradeVersion = "1640"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
+2 -2
View File
@@ -4,7 +4,7 @@
<dict> <dict>
<key>UIFileSharingEnabled</key> <key>UIFileSharingEnabled</key>
<true/> <true/>
<key>LSSupportsOpeningDocumentsInPlace</key> <key>UILaunchStoryboardName</key>
<true/> <string>Launch Screen</string>
</dict> </dict>
</plist> </plist>
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+66
View File
@@ -0,0 +1,66 @@
enum Format:byte { Manga, Novel, OneShot }
enum Status:byte { Finished, Releasing, Hiatus, NotYetReleased, Cancelled }
enum PublicationDemographic:byte { Shounen, Shoujou, Seinen, Josei }
enum Source:byte { Original, Manga, LightNovel, VisualNovel, VideoGame, Other, Novel, Doujinshi, Anime, WebNovel, LiveAction, Game, Comic, MultimediaProject, PictureBook }
enum ContentRating:byte { Safe, Suggestive, Erotica, Pornographic }
enum TagType:byte { Format, Genre, Theme, Content }
table Tag {
type:TagType;
value:string;
}
struct MetaValue {
main:uint;
bonus:uint;
}
struct Date {
year:ushort;
month:ubyte;
day:ubyte;
}
struct Size {
width:uint;
height:uint;
}
table ImageMetadata {
double_page:bool;
filename:string (required);
first_page:uint;
size:Size (required);
}
table ChapterMetadata {
chapter:MetaValue (required);
name:string;
images:[ImageMetadata];
}
table VolumeMetadata {
volume:MetaValue (required);
title:string;
archive:string (required);
chapters:[ChapterMetadata];
}
table Metadata {
title:string (required);
format:Format;
original_language:string;
country_of_origin:string;
publication_demographic:PublicationDemographic;
status:Status;
content_rating:ContentRating;
source:Source;
start_release_date:Date;
end_release_date:Date;
tags:[Tag];
description:string;
volumes:[VolumeMetadata];
}
root_type Metadata;
+539
View File
@@ -0,0 +1,539 @@
// automatically generated by the FlatBuffers compiler, do not modify
// swiftlint:disable all
// swiftformat:disable all
#if canImport(Common)
import Common
#endif
import FlatBuffers
public enum Format: Int8, FlatbuffersVectorInitializable, Enum, Verifiable {
public typealias T = Int8
public static var byteSize: Int { return MemoryLayout<Int8>.size }
public var value: Int8 { return self.rawValue }
case manga = 0
case novel = 1
case oneshot = 2
public static var max: Format { return .oneshot }
public static var min: Format { return .manga }
}
public enum Status: Int8, FlatbuffersVectorInitializable, Enum, Verifiable {
public typealias T = Int8
public static var byteSize: Int { return MemoryLayout<Int8>.size }
public var value: Int8 { return self.rawValue }
case finished = 0
case releasing = 1
case hiatus = 2
case notyetreleased = 3
case cancelled = 4
public static var max: Status { return .cancelled }
public static var min: Status { return .finished }
}
public enum PublicationDemographic: Int8, FlatbuffersVectorInitializable, Enum, Verifiable {
public typealias T = Int8
public static var byteSize: Int { return MemoryLayout<Int8>.size }
public var value: Int8 { return self.rawValue }
case shounen = 0
case shoujou = 1
case seinen = 2
case josei = 3
public static var max: PublicationDemographic { return .josei }
public static var min: PublicationDemographic { return .shounen }
}
public enum Source: Int8, FlatbuffersVectorInitializable, Enum, Verifiable {
public typealias T = Int8
public static var byteSize: Int { return MemoryLayout<Int8>.size }
public var value: Int8 { return self.rawValue }
case original = 0
case manga = 1
case lightnovel = 2
case visualnovel = 3
case videogame = 4
case other = 5
case novel = 6
case doujinshi = 7
case anime = 8
case webnovel = 9
case liveaction = 10
case game = 11
case comic = 12
case multimediaproject = 13
case picturebook = 14
public static var max: Source { return .picturebook }
public static var min: Source { return .original }
}
public enum ContentRating: Int8, FlatbuffersVectorInitializable, Enum, Verifiable {
public typealias T = Int8
public static var byteSize: Int { return MemoryLayout<Int8>.size }
public var value: Int8 { return self.rawValue }
case safe = 0
case suggestive = 1
case erotica = 2
case pornographic = 3
public static var max: ContentRating { return .pornographic }
public static var min: ContentRating { return .safe }
}
public enum TagType: Int8, FlatbuffersVectorInitializable, Enum, Verifiable {
public typealias T = Int8
public static var byteSize: Int { return MemoryLayout<Int8>.size }
public var value: Int8 { return self.rawValue }
case format = 0
case genre = 1
case theme = 2
case content = 3
public static var max: TagType { return .content }
public static var min: TagType { return .format }
}
public struct MetaValue: NativeStruct, FlatbuffersVectorInitializable, Verifiable, FlatbuffersInitializable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
private var _main: UInt32
private var _bonus: UInt32
public init(_ bb: ByteBuffer, o: Int32) {
self = bb.read(def: Self.self, position: Int(o))
}
public init(main: UInt32, bonus: UInt32) {
_main = main
_bonus = bonus
}
public init() {
_main = 0
_bonus = 0
}
public var main: UInt32 { _main }
public var bonus: UInt32 { _bonus }
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
try verifier.inBuffer(position: position, of: MetaValue.self)
}
}
public struct MetaValue_Mutable: FlatBufferStruct, FlatbuffersVectorInitializable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Struct
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
public var main: UInt32 { return _accessor.readBuffer(of: UInt32.self, at: 0) }
public var bonus: UInt32 { return _accessor.readBuffer(of: UInt32.self, at: 4) }
}
public struct Date: NativeStruct, FlatbuffersVectorInitializable, Verifiable, FlatbuffersInitializable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
private var _year: UInt16
private var _month: UInt8
private var _day: UInt8
public init(_ bb: ByteBuffer, o: Int32) {
self = bb.read(def: Self.self, position: Int(o))
}
public init(year: UInt16, month: UInt8, day: UInt8) {
_year = year
_month = month
_day = day
}
public init() {
_year = 0
_month = 0
_day = 0
}
public var year: UInt16 { _year }
public var month: UInt8 { _month }
public var day: UInt8 { _day }
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
try verifier.inBuffer(position: position, of: Date.self)
}
}
public struct Date_Mutable: FlatBufferStruct, FlatbuffersVectorInitializable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Struct
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
public var year: UInt16 { return _accessor.readBuffer(of: UInt16.self, at: 0) }
public var month: UInt8 { return _accessor.readBuffer(of: UInt8.self, at: 2) }
public var day: UInt8 { return _accessor.readBuffer(of: UInt8.self, at: 3) }
}
public struct Size: NativeStruct, FlatbuffersVectorInitializable, Verifiable, FlatbuffersInitializable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
private var _width: UInt32
private var _height: UInt32
public init(_ bb: ByteBuffer, o: Int32) {
self = bb.read(def: Self.self, position: Int(o))
}
public init(width: UInt32, height: UInt32) {
_width = width
_height = height
}
public init() {
_width = 0
_height = 0
}
public var width: UInt32 { _width }
public var height: UInt32 { _height }
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
try verifier.inBuffer(position: position, of: Size.self)
}
}
public struct Size_Mutable: FlatBufferStruct, FlatbuffersVectorInitializable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Struct
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
public var width: UInt32 { return _accessor.readBuffer(of: UInt32.self, at: 0) }
public var height: UInt32 { return _accessor.readBuffer(of: UInt32.self, at: 4) }
}
public struct Tag: FlatBufferTable, FlatbuffersVectorInitializable, Verifiable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table
private init(_ t: Table) { _accessor = t }
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
private struct VT {
static let type: VOffset = 4
static let value: VOffset = 6
}
public var type: TagType { let o = _accessor.offset(VT.type); return o == 0 ? .format : TagType(rawValue: _accessor.readBuffer(of: Int8.self, at: o)) ?? .format }
public var value: String? { let o = _accessor.offset(VT.value); return o == 0 ? nil : _accessor.string(at: o) }
public var valueSegmentArray: [UInt8]? { return _accessor.getVector(at: VT.value) }
public static func startTag(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 2) }
public static func add(type: TagType, _ fbb: inout FlatBufferBuilder) { fbb.add(element: type.rawValue, def: 0, at: VT.type) }
public static func add(value: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: value, at: VT.value) }
public static func endTag(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
public static func createTag(
_ fbb: inout FlatBufferBuilder,
type: TagType = .format,
valueOffset value: Offset = Offset()
) -> Offset {
let __start = Tag.startTag(&fbb)
Tag.add(type: type, &fbb)
Tag.add(value: value, &fbb)
return Tag.endTag(&fbb, start: __start)
}
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
var _v = try verifier.visitTable(at: position)
try _v.visit(field: VT.type, fieldName: "type", required: false, type: TagType.self)
try _v.visit(field: VT.value, fieldName: "value", required: false, type: ForwardOffset<String>.self)
_v.finish()
}
}
public struct ImageMetadata: FlatBufferTable, FlatbuffersVectorInitializable, Verifiable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table
private init(_ t: Table) { _accessor = t }
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
private struct VT {
static let doublePage: VOffset = 4
static let filename: VOffset = 6
static let firstPage: VOffset = 8
static let size: VOffset = 10
}
public var doublePage: Bool { let o = _accessor.offset(VT.doublePage); return o == 0 ? false : _accessor.readBuffer(of: Bool.self, at: o) }
public var filename: String! { let o = _accessor.offset(VT.filename); return _accessor.string(at: o) }
public var filenameSegmentArray: [UInt8]! { return _accessor.getVector(at: VT.filename) }
public var firstPage: UInt32 { let o = _accessor.offset(VT.firstPage); return o == 0 ? 0 : _accessor.readBuffer(of: UInt32.self, at: o) }
public var size: Size! { let o = _accessor.offset(VT.size); return _accessor.readBuffer(of: Size.self, at: o) }
public var mutableSize: Size_Mutable! { let o = _accessor.offset(VT.size); return Size_Mutable(_accessor.bb, o: o + _accessor.position) }
public static func startImageMetadata(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 4) }
public static func add(doublePage: Bool, _ fbb: inout FlatBufferBuilder) { fbb.add(element: doublePage, def: false,
at: VT.doublePage) }
public static func add(filename: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: filename, at: VT.filename) }
public static func add(firstPage: UInt32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: firstPage, def: 0, at: VT.firstPage) }
public static func add(size: Size?, _ fbb: inout FlatBufferBuilder) { guard let size = size else { return }; fbb.create(struct: size, position: VT.size) }
public static func endImageMetadata(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); fbb.require(table: end, fields: [6, 10]); return end }
public static func createImageMetadata(
_ fbb: inout FlatBufferBuilder,
doublePage: Bool = false,
filenameOffset filename: Offset,
firstPage: UInt32 = 0,
size: Size
) -> Offset {
let __start = ImageMetadata.startImageMetadata(&fbb)
ImageMetadata.add(doublePage: doublePage, &fbb)
ImageMetadata.add(filename: filename, &fbb)
ImageMetadata.add(firstPage: firstPage, &fbb)
ImageMetadata.add(size: size, &fbb)
return ImageMetadata.endImageMetadata(&fbb, start: __start)
}
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
var _v = try verifier.visitTable(at: position)
try _v.visit(field: VT.doublePage, fieldName: "doublePage", required: false, type: Bool.self)
try _v.visit(field: VT.filename, fieldName: "filename", required: true, type: ForwardOffset<String>.self)
try _v.visit(field: VT.firstPage, fieldName: "firstPage", required: false, type: UInt32.self)
try _v.visit(field: VT.size, fieldName: "size", required: true, type: Size.self)
_v.finish()
}
}
public struct ChapterMetadata: FlatBufferTable, FlatbuffersVectorInitializable, Verifiable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table
private init(_ t: Table) { _accessor = t }
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
private struct VT {
static let chapter: VOffset = 4
static let name: VOffset = 6
static let images: VOffset = 8
}
public var chapter: MetaValue! { let o = _accessor.offset(VT.chapter); return _accessor.readBuffer(of: MetaValue.self, at: o) }
public var mutableChapter: MetaValue_Mutable! { let o = _accessor.offset(VT.chapter); return MetaValue_Mutable(_accessor.bb, o: o + _accessor.position) }
public var name: String? { let o = _accessor.offset(VT.name); return o == 0 ? nil : _accessor.string(at: o) }
public var nameSegmentArray: [UInt8]? { return _accessor.getVector(at: VT.name) }
public var images: FlatbufferVector<ImageMetadata> { return _accessor.vector(at: VT.images, byteSize: 4) }
public static func startChapterMetadata(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 3) }
public static func add(chapter: MetaValue?, _ fbb: inout FlatBufferBuilder) { guard let chapter = chapter else { return }; fbb.create(struct: chapter, position: VT.chapter) }
public static func add(name: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: name, at: VT.name) }
public static func addVectorOf(images: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: images, at: VT.images) }
public static func endChapterMetadata(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); fbb.require(table: end, fields: [4]); return end }
public static func createChapterMetadata(
_ fbb: inout FlatBufferBuilder,
chapter: MetaValue,
nameOffset name: Offset = Offset(),
imagesVectorOffset images: Offset = Offset()
) -> Offset {
let __start = ChapterMetadata.startChapterMetadata(&fbb)
ChapterMetadata.add(chapter: chapter, &fbb)
ChapterMetadata.add(name: name, &fbb)
ChapterMetadata.addVectorOf(images: images, &fbb)
return ChapterMetadata.endChapterMetadata(&fbb, start: __start)
}
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
var _v = try verifier.visitTable(at: position)
try _v.visit(field: VT.chapter, fieldName: "chapter", required: true, type: MetaValue.self)
try _v.visit(field: VT.name, fieldName: "name", required: false, type: ForwardOffset<String>.self)
try _v.visit(field: VT.images, fieldName: "images", required: false, type: ForwardOffset<Vector<ForwardOffset<ImageMetadata>, ImageMetadata>>.self)
_v.finish()
}
}
public struct VolumeMetadata: FlatBufferTable, FlatbuffersVectorInitializable, Verifiable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table
private init(_ t: Table) { _accessor = t }
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
private struct VT {
static let volume: VOffset = 4
static let title: VOffset = 6
static let archive: VOffset = 8
static let chapters: VOffset = 10
}
public var volume: MetaValue! { let o = _accessor.offset(VT.volume); return _accessor.readBuffer(of: MetaValue.self, at: o) }
public var mutableVolume: MetaValue_Mutable! { let o = _accessor.offset(VT.volume); return MetaValue_Mutable(_accessor.bb, o: o + _accessor.position) }
public var title: String? { let o = _accessor.offset(VT.title); return o == 0 ? nil : _accessor.string(at: o) }
public var titleSegmentArray: [UInt8]? { return _accessor.getVector(at: VT.title) }
public var archive: String! { let o = _accessor.offset(VT.archive); return _accessor.string(at: o) }
public var archiveSegmentArray: [UInt8]! { return _accessor.getVector(at: VT.archive) }
public var chapters: FlatbufferVector<ChapterMetadata> { return _accessor.vector(at: VT.chapters, byteSize: 4) }
public static func startVolumeMetadata(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 4) }
public static func add(volume: MetaValue?, _ fbb: inout FlatBufferBuilder) { guard let volume = volume else { return }; fbb.create(struct: volume, position: VT.volume) }
public static func add(title: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: title, at: VT.title) }
public static func add(archive: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: archive, at: VT.archive) }
public static func addVectorOf(chapters: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: chapters, at: VT.chapters) }
public static func endVolumeMetadata(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); fbb.require(table: end, fields: [4, 8]); return end }
public static func createVolumeMetadata(
_ fbb: inout FlatBufferBuilder,
volume: MetaValue,
titleOffset title: Offset = Offset(),
archiveOffset archive: Offset,
chaptersVectorOffset chapters: Offset = Offset()
) -> Offset {
let __start = VolumeMetadata.startVolumeMetadata(&fbb)
VolumeMetadata.add(volume: volume, &fbb)
VolumeMetadata.add(title: title, &fbb)
VolumeMetadata.add(archive: archive, &fbb)
VolumeMetadata.addVectorOf(chapters: chapters, &fbb)
return VolumeMetadata.endVolumeMetadata(&fbb, start: __start)
}
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
var _v = try verifier.visitTable(at: position)
try _v.visit(field: VT.volume, fieldName: "volume", required: true, type: MetaValue.self)
try _v.visit(field: VT.title, fieldName: "title", required: false, type: ForwardOffset<String>.self)
try _v.visit(field: VT.archive, fieldName: "archive", required: true, type: ForwardOffset<String>.self)
try _v.visit(field: VT.chapters, fieldName: "chapters", required: false, type: ForwardOffset<Vector<ForwardOffset<ChapterMetadata>, ChapterMetadata>>.self)
_v.finish()
}
}
public struct Metadata: FlatBufferTable, FlatbuffersVectorInitializable, Verifiable {
static func validateVersion() { FlatBuffersVersion_25_12_19() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table
private init(_ t: Table) { _accessor = t }
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
private struct VT {
static let title: VOffset = 4
static let format: VOffset = 6
static let originalLanguage: VOffset = 8
static let countryOfOrigin: VOffset = 10
static let publicationDemographic: VOffset = 12
static let status: VOffset = 14
static let contentRating: VOffset = 16
static let source: VOffset = 18
static let startReleaseDate: VOffset = 20
static let endReleaseDate: VOffset = 22
static let tags: VOffset = 24
static let description: VOffset = 26
static let volumes: VOffset = 28
}
public var title: String! { let o = _accessor.offset(VT.title); return _accessor.string(at: o) }
public var titleSegmentArray: [UInt8]! { return _accessor.getVector(at: VT.title) }
public var format: Format { let o = _accessor.offset(VT.format); return o == 0 ? .manga : Format(rawValue: _accessor.readBuffer(of: Int8.self, at: o)) ?? .manga }
public var originalLanguage: String? { let o = _accessor.offset(VT.originalLanguage); return o == 0 ? nil : _accessor.string(at: o) }
public var originalLanguageSegmentArray: [UInt8]? { return _accessor.getVector(at: VT.originalLanguage) }
public var countryOfOrigin: String? { let o = _accessor.offset(VT.countryOfOrigin); return o == 0 ? nil : _accessor.string(at: o) }
public var countryOfOriginSegmentArray: [UInt8]? { return _accessor.getVector(at: VT.countryOfOrigin) }
public var publicationDemographic: PublicationDemographic { let o = _accessor.offset(VT.publicationDemographic); return o == 0 ? .shounen : PublicationDemographic(rawValue: _accessor.readBuffer(of: Int8.self, at: o)) ?? .shounen }
public var status: Status { let o = _accessor.offset(VT.status); return o == 0 ? .finished : Status(rawValue: _accessor.readBuffer(of: Int8.self, at: o)) ?? .finished }
public var contentRating: ContentRating { let o = _accessor.offset(VT.contentRating); return o == 0 ? .safe : ContentRating(rawValue: _accessor.readBuffer(of: Int8.self, at: o)) ?? .safe }
public var source: Source { let o = _accessor.offset(VT.source); return o == 0 ? .original : Source(rawValue: _accessor.readBuffer(of: Int8.self, at: o)) ?? .original }
public var startReleaseDate: Date? { let o = _accessor.offset(VT.startReleaseDate); return o == 0 ? nil : _accessor.readBuffer(of: Date.self, at: o) }
public var mutableStartReleaseDate: Date_Mutable? { let o = _accessor.offset(VT.startReleaseDate); return o == 0 ? nil : Date_Mutable(_accessor.bb, o: o + _accessor.position) }
public var endReleaseDate: Date? { let o = _accessor.offset(VT.endReleaseDate); return o == 0 ? nil : _accessor.readBuffer(of: Date.self, at: o) }
public var mutableEndReleaseDate: Date_Mutable? { let o = _accessor.offset(VT.endReleaseDate); return o == 0 ? nil : Date_Mutable(_accessor.bb, o: o + _accessor.position) }
public var tags: FlatbufferVector<Tag> { return _accessor.vector(at: VT.tags, byteSize: 4) }
public var description: String? { let o = _accessor.offset(VT.description); return o == 0 ? nil : _accessor.string(at: o) }
public var descriptionSegmentArray: [UInt8]? { return _accessor.getVector(at: VT.description) }
public var volumes: FlatbufferVector<VolumeMetadata> { return _accessor.vector(at: VT.volumes, byteSize: 4) }
public static func startMetadata(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 13) }
public static func add(title: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: title, at: VT.title) }
public static func add(format: Format, _ fbb: inout FlatBufferBuilder) { fbb.add(element: format.rawValue, def: 0, at: VT.format) }
public static func add(originalLanguage: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: originalLanguage, at: VT.originalLanguage) }
public static func add(countryOfOrigin: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: countryOfOrigin, at: VT.countryOfOrigin) }
public static func add(publicationDemographic: PublicationDemographic, _ fbb: inout FlatBufferBuilder) { fbb.add(element: publicationDemographic.rawValue, def: 0, at: VT.publicationDemographic) }
public static func add(status: Status, _ fbb: inout FlatBufferBuilder) { fbb.add(element: status.rawValue, def: 0, at: VT.status) }
public static func add(contentRating: ContentRating, _ fbb: inout FlatBufferBuilder) { fbb.add(element: contentRating.rawValue, def: 0, at: VT.contentRating) }
public static func add(source: Source, _ fbb: inout FlatBufferBuilder) { fbb.add(element: source.rawValue, def: 0, at: VT.source) }
public static func add(startReleaseDate: Date?, _ fbb: inout FlatBufferBuilder) { guard let startReleaseDate = startReleaseDate else { return }; fbb.create(struct: startReleaseDate, position: VT.startReleaseDate) }
public static func add(endReleaseDate: Date?, _ fbb: inout FlatBufferBuilder) { guard let endReleaseDate = endReleaseDate else { return }; fbb.create(struct: endReleaseDate, position: VT.endReleaseDate) }
public static func addVectorOf(tags: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: tags, at: VT.tags) }
public static func add(description: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: description, at: VT.description) }
public static func addVectorOf(volumes: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: volumes, at: VT.volumes) }
public static func endMetadata(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); fbb.require(table: end, fields: [4]); return end }
public static func createMetadata(
_ fbb: inout FlatBufferBuilder,
titleOffset title: Offset,
format: Format = .manga,
originalLanguageOffset originalLanguage: Offset = Offset(),
countryOfOriginOffset countryOfOrigin: Offset = Offset(),
publicationDemographic: PublicationDemographic = .shounen,
status: Status = .finished,
contentRating: ContentRating = .safe,
source: Source = .original,
startReleaseDate: Date? = nil,
endReleaseDate: Date? = nil,
tagsVectorOffset tags: Offset = Offset(),
descriptionOffset description: Offset = Offset(),
volumesVectorOffset volumes: Offset = Offset()
) -> Offset {
let __start = Metadata.startMetadata(&fbb)
Metadata.add(title: title, &fbb)
Metadata.add(format: format, &fbb)
Metadata.add(originalLanguage: originalLanguage, &fbb)
Metadata.add(countryOfOrigin: countryOfOrigin, &fbb)
Metadata.add(publicationDemographic: publicationDemographic, &fbb)
Metadata.add(status: status, &fbb)
Metadata.add(contentRating: contentRating, &fbb)
Metadata.add(source: source, &fbb)
Metadata.add(startReleaseDate: startReleaseDate, &fbb)
Metadata.add(endReleaseDate: endReleaseDate, &fbb)
Metadata.addVectorOf(tags: tags, &fbb)
Metadata.add(description: description, &fbb)
Metadata.addVectorOf(volumes: volumes, &fbb)
return Metadata.endMetadata(&fbb, start: __start)
}
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
var _v = try verifier.visitTable(at: position)
try _v.visit(field: VT.title, fieldName: "title", required: true, type: ForwardOffset<String>.self)
try _v.visit(field: VT.format, fieldName: "format", required: false, type: Format.self)
try _v.visit(field: VT.originalLanguage, fieldName: "originalLanguage", required: false, type: ForwardOffset<String>.self)
try _v.visit(field: VT.countryOfOrigin, fieldName: "countryOfOrigin", required: false, type: ForwardOffset<String>.self)
try _v.visit(field: VT.publicationDemographic, fieldName: "publicationDemographic", required: false, type: PublicationDemographic.self)
try _v.visit(field: VT.status, fieldName: "status", required: false, type: Status.self)
try _v.visit(field: VT.contentRating, fieldName: "contentRating", required: false, type: ContentRating.self)
try _v.visit(field: VT.source, fieldName: "source", required: false, type: Source.self)
try _v.visit(field: VT.startReleaseDate, fieldName: "startReleaseDate", required: false, type: Date.self)
try _v.visit(field: VT.endReleaseDate, fieldName: "endReleaseDate", required: false, type: Date.self)
try _v.visit(field: VT.tags, fieldName: "tags", required: false, type: ForwardOffset<Vector<ForwardOffset<Tag>, Tag>>.self)
try _v.visit(field: VT.description, fieldName: "description", required: false, type: ForwardOffset<String>.self)
try _v.visit(field: VT.volumes, fieldName: "volumes", required: false, type: ForwardOffset<Vector<ForwardOffset<VolumeMetadata>, VolumeMetadata>>.self)
_v.finish()
}
}
+48
View File
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
<rect key="frame" x="0.0" y="626.5" width="375" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ImageViewer" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<rect key="frame" x="0.0" y="202" width="375" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
<constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="20" symbolic="YES" id="SfN-ll-jLj"/>
<constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
+3 -1
View File
@@ -1,4 +1,6 @@
#!/bin/sh #!/usr/bin/env sh
set -eu
xcodebuild archive \ xcodebuild archive \
-scheme ImageViewer \ -scheme ImageViewer \
Vendored Submodule
+1
+4 -2
View File
@@ -1,7 +1,9 @@
#!/bin/sh #!/usr/bin/env sh
set -e
APP_NAME='ImageViewer' APP_NAME='ImageViewer'
SIM_DEVICE='iPad (10th generation)' SIM_DEVICE='iPad (A16)'
SCHEME='ImageViewer' SCHEME='ImageViewer'
SIMULATOR='iOS Simulator' SIMULATOR='iOS Simulator'
COMPANY='ImageViewer' COMPANY='ImageViewer'