Synaplan
开源 AI 软件平台,面向企业:自托管 AI 代理,符合 GDPR 的聊天机器人小部件,RAG 知识库,WhatsApp 与 Outlook AI,MCP,多模型路由。支持 Docker、Kubernetes 或在 Germ 托管。
AI 翻译
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Aepryus Software's iOS Library
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Acheron is a collection of utilties for developing iOS apps.
You can use SPM, to integrate Acheron into your project. You can add the following to your dependencies:
.package(url: "https://github.com/aepryus/Acheron.git", from: "1.1.0"),
Or from Xcode go to File/Add Packages and enter the URL: https://github.com/aepryus/Acheron.git.
A lightweight threadsafe no SQL ORM.
A collection of lightweight extensions and convenience methods for laying out iOS screens programatically. It is particularly useful in making multiple screen sizes look the same.
Pen is a set of tools that eases working with fonts within UIKit. Mainly, it is an immutable object, 'Pen' that encaspulates all of the font "attributes"; making them easy to define and access. Slightly adjusted new Pens can be created via the clone() method. It also includes a number of extensions to Apple classes that allows Pens to be used directly with them.
Usage:
let greenPen: Pen = Pen(font: UIFont(name: "ChicagoFLF", size: 19)!, color: UIColor.green.tint(0.7), alignment: .right)
let whitePen: Pen = greenPen.clone(color: .white)
let attString = NSMutableAttributedString()
attString.append("This is GREEN", pen: greenPen)
attString.append("This is WHITE", pen: whitePen)
let label = UILabel()
label.pen = greenPen
NSString("Hello, White Pen").draw(at: .zero, pen: whitePen)
NSString("Hello, Green Pen").draw(at: .zero, withAttributes: greenPen.attributes)
RGB is a set of tools that make it easy to get tints, shades and tones of a color or blend two entirely different colors. It includes the RGB class which converts color into a vector that can then be manipulated mathematically. It also includes an extension of UIColor that enables these manipulations to be made directly to UIColor itself.
Usage:
let lightBlue = UIColor.blue.tint(0.5)
let greyGreen = UIColor.green.tone(0.5)
let transparentPink = UIColor.red.tint(0.5).alpha(0.5)
let blueRGB = RGB(uiColor: .blue)
let redRGB = RGB(uiColor: .red)
let purpleRGB = (blueRGB + redRGB) * 0.5
let purpleRGB2 = blueRGB.blend(rgb: redRGB, percent: 0.5)
Classes and delegates for creating expandable table views.
A view making the display of tabular data easy.
AepImage is an extremely light weight asynchoronous image loading and caching tool that stitches into UIImageView, but can also be used from static methods on UIImage directly. The tool ensures UIImageViews located on UITableViews are handled correctly. It does not include a disk cache.
Usage:
imageView.loadImage(url: "https://aepryus.com/resources/aexels01s.png")
imageView.loadImage(url: "https://aepryus.com/resources/Force3.jpg", placeholder: tempImage) {
print("Image Loaded")
}
UIImage.loadImage(url: "https://aepryus.com/resources/tnEvolizer1.jpg") { (image: UIImage) in
print("already loaded")
} willLoad: {
print("will load")
} finishedLoading: { (image: UIImage) in
print("finished loading")
}
Pond and Pebbles is an asynchronous control flow system that greatly helps detangle complex asynchronous tasks like app initialization. Through the BackgroundPond it also makes finishing up asynchronous tasks after your app is closed much easier.
Usage:
class BootPond: Pond {
lazy var needNotMigrate: Pebble = {/*...*/}()
lazy var migrate: Pebble = {/*...*/}
lazy var ping: Pebble = {
pebble(name: "Ping") { (complete: @escaping (Bool) -> ()) in
Pequod.ping { complete(true) }
failure: { complete(false) }
}
}()
lazy var loadOTID: Pebble = {
pebble(name: "Load OTID") { (complete: @escaping (Bool) -> ()) in
complete(Pequod.loadOTID() && Pequod.loadExpired())
}
}()
lazy var loadUser: Pebble = {
pebble(name: "Load User") { (complete: (Bool) -> ()) in
complete(Pequod.loadUser())
}
}()
lazy var loadToken: Pebble = {
pebble(name: "Load Token") { (complete: (Bool) -> ()) in
complete(Pequod.loadToken())
}
}()
lazy var isLocallySubscribed: Pebble = {/*...*/}()
lazy var isRemotelySubscribed: Pebble = {/*...*/}()
lazy var receiptValidation: Pebble = {/*...*/}()
lazy var userLogin: Pebble = {/*...*/}()
lazy var otidLogin: Pebble = {/*...*/}()
lazy var showOffline: Pebble = {/*...*/}()
lazy var showSubscribe: Pebble = {/*...*/}()
lazy var showSignUp: Pebble = {/*...*/}()
lazy var queryCloud: Pebble = {/*...*/}()
lazy var startOovium: Pebble = {/*...*/}()
lazy var invalid: Pebble = {/*...*/}()
// Init ============================================================================================
override init() {
super.init()
loadOTID.ready = { true }
loadToken.ready = { true }
loadUser.ready = { true }
needNotMigrate.ready = { true }
ping.ready = { true }
queryCloud.ready = { true }
migrate.ready = { self.needNotMigrate.failed }
isLocallySubscribed.ready = { self.loadToken.succeeded }
isRemotelySubscribed.ready = {
self.ping.succeeded
&& self.isLocallySubscribed.failed
}
userLogin.ready = {
self.ping.succeeded
&& self.loadToken.failed
&& self.loadUser.succeeded
}
receiptValidation.ready = {
self.ping.succeeded
&& self.loadToken.failed
&& self.loadOTID.failed
&& (self.loadUser.failed || self.userLogin.failed)
}
otidLogin.ready = {
self.ping.succeeded
&& self.loadToken.failed
&& (self.loadOTID.succeeded || self.receiptValidation.succeeded)
&& (self.loadUser.failed || self.userLogin.failed)
}
showOffline.ready = {
self.ping.failed
&& self.loadToken.failed
}
showSubscribe.ready = {
self.ping.succeeded
&& (self.receiptValidation.failed || self.isRemotelySubscribed.failed)
}
showSignUp.ready = {
self.ping.succeeded
&& self.loadToken.succeeded
&& self.loadOTID.succeeded
&& (self.isLocallySubscribed.succeeded || self.isRemotelySubscribed.succeeded)
&& self.loadUser.failed
}
startOovium.ready = {
self.loadToken.succeeded
&& self.loadOTID.succeeded
&& (self.loadUser.succeeded || self.ping.failed)
&& (self.isLocallySubscribed.succeeded || self.isRemotelySubscribed.succeeded)
&& (self.needNotMigrate.succeeded || self.migrate.succeeded)
&& self.queryCloud.succeeded
}
invalid.ready = {
self.loadToken.succeeded
&& self.loadOTID.failed
}
}
}
class ExitPond: BackgroundPond {
lazy var saveAether: Pebble = {
pebble(name: "Save Aether") { (complete: @escaping (Bool) -> ()) in
Oovium.aetherView.saveAether { (success: Bool) in
complete(success)
}
}
}()
init() {
super.init { print("ExitPond timed out without completing.") }
saveAether.ready = { true }
}
}
class OoviumDelegate: UIResponder, UIApplicationDelegate {
let bootPond: BootPond = BootPond()
let exitPond: ExitPond = ExitPond()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
bootPond.start()
return true
}
func applicationWillResignActive(_ application: UIApplication) {
exitPond.start()
}
}
It also includes mechanisms for writing tests for various asynchronous pathways:
XCTAssert(pond.test(shouldSucceed: [
pond.needNotMigrate,
pond.ping,
pond.queryCloud,
pond.showSubscribe,
], shouldFail: [
pond.loadOTID,
pond.loadUser,
pond.loadToken,
pond.receiptValidation,
]))
Usage:
let button: UIButton = UIButton()
button.addAction {
print("Hello, Acheron")
}