Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Goosse/AudioHelperPublishPlugin
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.
https://github.com/Goosse/AudioHelperPublishPlugin
podcast publish publish-plugin
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/Goosse/AudioHelperPublishPlugin
- Owner: Goosse
- Created: 2020-02-20T17:25:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-20T17:58:59.000Z (almost 5 years ago)
- Last Synced: 2024-08-02T07:02:04.856Z (5 months ago)
- Topics: podcast, publish, publish-plugin
- Language: Swift
- Homepage:
- Size: 6.32 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-publish - Audio Helper
README
# Audio Helper Publish Plugin
## InstallationTo install it into your [Publish](https://github.com/johnsundell/publish) package, add it as a dependency within your `Package.swift` manifest:
```swift
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:
```swift
import AudioHelperPublishPlugin
```For more information on how to use the Swift Package Manager, check out [this article](https://www.swiftbysundell.com/articles/managing-dependencies-using-the-swift-package-manager), or [its official documentation](https://github.com/apple/swift-package-manager/tree/master/Documentation).
## Usage
The plugin can then be used within any publishing pipeline like this:
```swift
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.