Skip to content

Commit

Permalink
Update name to ShipinKit
Browse files Browse the repository at this point in the history
  • Loading branch information
rudrankriyam committed Oct 13, 2024
1 parent 533fcdc commit d34a213
Show file tree
Hide file tree
Showing 18 changed files with 76 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RunveyKit"
BuildableName = "RunveyKit"
BlueprintName = "RunveyKit"
BlueprintIdentifier = "ShipinKit"
BuildableName = "ShipinKit"
BlueprintName = "ShipinKit"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -34,9 +34,9 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RunveyKitTests"
BuildableName = "RunveyKitTests"
BlueprintName = "RunveyKitTests"
BlueprintIdentifier = "ShipinKitTests"
BuildableName = "ShipinKitTests"
BlueprintName = "ShipinKitTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
Expand All @@ -52,33 +52,22 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RunveyKit"
BuildableName = "RunveyKit"
BlueprintName = "RunveyKit"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RunveyKit"
BuildableName = "RunveyKit"
BlueprintName = "RunveyKit"
BlueprintIdentifier = "ShipinKit"
BuildableName = "ShipinKit"
BlueprintName = "ShipinKit"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1610"
version = "2.2">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<AutocreatedTestPlanReference>
</AutocreatedTestPlanReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand All @@ -29,9 +18,9 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RunveyKitTests"
BuildableName = "RunveyKitTests"
BlueprintName = "RunveyKitTests"
BlueprintIdentifier = "ShipinKitTests"
BuildableName = "ShipinKitTests"
BlueprintName = "ShipinKitTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
Expand Down
12 changes: 6 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import PackageDescription

let package = Package(
name: "RunveyKit",
name: "ShipinKit",
platforms: [
.iOS(.v16),
.macOS(.v14),
Expand All @@ -14,20 +14,20 @@ let package = Package(
],
products: [
.library(
name: "RunveyKit",
name: "ShipinKit",
type: .static,
targets: ["RunveyKit"])
targets: ["ShipinKit"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
],
targets: [
.target(
name: "RunveyKit",
name: "ShipinKit",
dependencies: []),
.testTarget(
name: "RunveyKitTests",
dependencies: ["RunveyKit"]
name: "ShipinKitTests",
dependencies: ["ShipinKit"]
)
]
)
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RunveyKit: Unofficial Swift Library for RunwayML
# ShipinKit: Swift SDK for Prototyping AI Video Generation

RunveyKit is an unofficial Swift SDK for the RunwayML REST API, designed for quick prototyping and easy integration with RunwayML's image generation capabilities. The name is based on the Hindi word for Runway, which is रनवे.
ShipinKit is an unofficial Swift SDK designed for quick prototyping and easy integration with video generation capabilities. The name is based on the Chinese word for video, which is 视频.

<a href="https://www.emergetools.com/app/example/ios/runveykit.RunveyKit/manual?utm_campaign=badge-data"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.emergetools.com%2Fapi%2Fv2%2Fpublic_new_build%3FexampleId%3Drunveykit.RunveyKit%26platform%3Dios%26badgeOption%3Dversion_and_max_install_size%26buildType%3Dmanual&query=$.badgeMetadata&label=RunveyKit&logo=apple" /></a>

Expand All @@ -20,11 +20,11 @@ RunveyKit is an unofficial Swift SDK for the RunwayML REST API, designed for qui

## Installation

Add RunveyKit to your Swift package dependencies:
Add ShipinKit to your Swift package dependencies:

```swift
dependencies: [
.package(url: "https://github.com/rryam/RunveyKit.git", from: "1.0.0")
.package(url: "https://github.com/rryam/ShipinKit.git", from: "1.0.0")
]
```

Expand All @@ -34,11 +34,11 @@ This library is intended for quick prototyping and development purposes only. Fo

## Usage

Here are examples of how to use RunveyKit to generate videos:
Here are examples of how to use ShipinKit to generate videos:

```swift
// Generate video from image data
let runvey = RunveyKit(apiKey: "your-api-key")
let runvey = ShipinKit(apiKey: "your-api-key")
let image = UIImage(named: "input-image.jpg")!
do {
let videoURL = try await runvey.generateVideo(
Expand All @@ -53,7 +53,7 @@ do {
}

// Generate video from image URL
let runvey = RunveyKit(apiKey: "your-api-key")
let runvey = ShipinKit(apiKey: "your-api-key")
let imageURL = URL(string: "https://example.com/input-image.jpg")!
do {
let videoURL = try await runvey.generateVideo(
Expand All @@ -69,17 +69,17 @@ do {
}
```

Here is a basic example of how to use RunveyKit to generate a task if you prefer manual control:
Here is a basic example of how to use ShipinKit to generate a task if you prefer manual control:

```swift
import RunveyKit
import ShipinKit

do {
let prompt = "Dynamic tracking shot: The camera glides through the iconic Shibuya Crossing in Tokyo at night, capturing the bustling intersection bathed in vibrant neon lights. Countless pedestrians cross the wide intersection as towering digital billboards illuminate the scene with colorful advertisements. The wet pavement reflects the dazzling lights, creating a cinematic urban atmosphere."
let imageURL = URL(string: "https://images.unsplash.com/photo-1542051841857-5f90071e7989?q=80&w=3270&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D")!

let runveyKit = RunveyKit(apiKey: "YOUR_API_KEY_HERE")
let taskID = try await runveyKit.generateTask(
let shipinKit = ShipinKit(apiKey: "YOUR_API_KEY_HERE")
let taskID = try await shipinKit.generateTask(
prompt: prompt,
imageURL: imageURL,
duration: .long, // 10 seconds
Expand All @@ -95,12 +95,12 @@ do {
Here's an example of how to retrieve task details and process them into a human-readable description:

```swift
import RunveyKit
import ShipinKit

do {
let runveyKit = RunveyKit(apiKey: "YOUR_API_KEY_HERE")
let shipinKit = ShipinKit(apiKey: "YOUR_API_KEY_HERE")
let taskId = "17f20503-6c24-4c16-946b-35dbbce2af2f"
let taskDetails = try await RunveyKit.getTaskDetails(id: taskId)
let taskDetails = try await shipinKit.getTaskDetails(id: taskId)
print(taskDetails)
} catch {
print("Error: \(error)")
Expand All @@ -110,12 +110,12 @@ import RunveyKit
And here's an example of how to cancel or delete a task:

```swift
import RunveyKit
import ShipinKit

do {
let runveyKit = RunveyKit(apiKey: "YOUR_API_KEY_HERE")
let shipinKit = ShipinKit(apiKey: "YOUR_API_KEY_HERE")
let taskId = "17f20503-6c24-4c16-946b-35dbbce2af2f"
try await RunveyKit.cancelOrDeleteTask(id: taskId)
try await shipinKit.cancelOrDeleteTask(id: taskId)
print("Task \(taskId) has been successfully canceled or deleted.")
} catch {
print("Error canceling or deleting task: \(error)")
Expand All @@ -132,4 +132,4 @@ Contributions are welcome! Please feel free to submit a Pull Request.

## Disclaimer

This is an unofficial library and is not affiliated with or endorsed by RunwayML.
This is an unofficial library and is not affiliated with or endorsed by RunwayML, Luma Labs or Kling AI.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//
// ContentView.swift
// Runvey
// Shipin
//
// Created by Rudrank Riyam on 10/7/24.
//

import SwiftUI
import AVKit
import PhotosUI
import RunveyKit
import ShipinKit

struct ContentView: View {
@State private var selectedImage: UIImage?
Expand Down Expand Up @@ -85,7 +85,7 @@ struct ContentView: View {
}
}
.padding()
.navigationTitle("RunveyKit Example")
.navigationTitle("ShipinKit Example")
}
}

Expand All @@ -107,14 +107,14 @@ struct ContentView: View {
return
}

let runveyKit = RunveyKit(apiKey: apiKey)
let shipinKit = ShipinKit(apiKey: apiKey)
let videoURL: URL

if let selectedImage = selectedImage {
videoURL = try await runveyKit.generateVideo(prompt: promptText, image: selectedImage, duration: .long, aspectRatio: .widescreen)
videoURL = try await shipinKit.generateVideo(prompt: promptText, image: selectedImage, duration: .long, aspectRatio: .widescreen)
} else {
let imageURL = URL(string: "https://images.unsplash.com/photo-1542051841857-5f90071e7989?q=80&w=3270&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wAWdlfHx8fGVufDB8fHx8fA%3D%3D")!
videoURL = try await runveyKit.generateVideo(prompt: promptText, imageURL: imageURL, duration: .long, aspectRatio: .widescreen)
videoURL = try await shipinKit.generateVideo(prompt: promptText, imageURL: imageURL, duration: .long, aspectRatio: .widescreen)
}

debugPrint("DEBUG: Successfully generated video, URL: \(videoURL)")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//
// RunveyApp.swift
// Runvey
// ShipinApp.swift
// Shipin
//
// Created by Rudrank Riyam on 10/7/24.
//

import SwiftUI

@main
struct RunveyApp: App {
struct ShipinApp: App {
var body: some Scene {
WindowGroup {
ContentView()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// RunveyImage.swift
// RunveyKit
// ShipinImage.swift
// ShipinKit
//
// Created by Rudrank Riyam on 10/9/24.
//
Expand All @@ -14,7 +14,7 @@ import AppKit
#endif

#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
public typealias RunveyImage = UIImage
public typealias ShipinImage = UIImage
#elseif os(macOS)
public typealias RunveyImage = NSImage
public typealias ShipinImage = NSImage
#endif
Loading

0 comments on commit d34a213

Please sign in to comment.