Swiftpack.co - Goosse/AudioHelperPublishPlugin as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Goosse.
Goosse/AudioHelperPublishPlugin v0.1.0
A Publish plugin that automatically adds the required Audio.duration and Audio.byteSize to all Items that have an Audio element with only the url. This avoids that hassle of having to manually determine and add this info.
⭐️ 0
🕓 4 years ago
.package(url: "https://github.com/Goosse/AudioHelperPublishPlugin.git", from: "v0.1.0")

Audio Helper Publish Plugin

Installation

To install it into your Publish package, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        ...
        .package(url: "https://github.com/Goosse/AudioHelperPublishPlugin.git", from: "0.1.0")
    ],
    targets: [
        .target(
            ...
            dependencies: [
                ...
                "AudioHelperPublishPlugin"
            ]
        )
    ]
    ...
)

Then import AudioHelperPublishPlugin wherever you’d like to use it:

import AudioHelperPublishPlugin

For more information on how to use the Swift Package Manager, check out this article, or its official documentation.

Usage

The plugin can then be used within any publishing pipeline like this:

import AudioHelperPublishPlugin
...
try DeliciousRecipes().publish(using: [
    .installPlugin(.addAudioByteSize()),
    .installPlugin(.addAudioDuration())
    ...
])

It is actually split out into two different plugins for Audio.byteSize and Audio.duration to give you more control if you choose to use only one or the other.

GitHub

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

Dependencies

Release Notes

Initial Release
4 years ago

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