Swiftpack.co - hlemai/ExifTool as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by hlemai.
hlemai/ExifTool 2.2.3
SwiftWrapper to ExifTool
⭐️ 4
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/hlemai/ExifTool.git", from: "2.2.3")

ExifTool

MIT License

Simple swiftWrapper to ExifTool (https://exiftool.org)

Requirements

  • iOS 14.0+ / macOS 11+ / tvOS 14.0+
  • Xcode 12+
  • Swift 5.3+

Installation with Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding SunburstDiagram as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/hlemai/ExifTool.git")
]

Usage

Get all metadata in a [String:String] dictionnary.

ExifTool.setExifTool("/path/to/exiftool")
let testFilePath = "DSC04247.jpg"
let url = URL(fileURLWithPath: testFilePath)
let exifData = ExifTool.read(fromurl: url)
// optionnally it is possibile to filter to specific tags by tagname : ExifTool.read(from:url,tags:["ISO"])

for meta in exifData {
    print("\(meta.key)->\(meta.value)")
}

// to get in a dictionnary with local key
for meta in exifData.getMetadata(lang: "fr") {
    print("\(meta.key)->\(meta.value)")
}

GitHub

link
Stars: 4
Last commit: 2 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

Exif Tool Wrapper for macos
2 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics