Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fwcd/swift-music-library
Library for parsing and exporting local music libraries
https://github.com/fwcd/swift-music-library
apple-music export itunes swift xml
Last synced: 16 days ago
JSON representation
Library for parsing and exporting local music libraries
- Host: GitHub
- URL: https://github.com/fwcd/swift-music-library
- Owner: fwcd
- License: mit
- Created: 2023-04-07T00:56:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-04T03:14:57.000Z (about 1 month ago)
- Last Synced: 2024-10-15T13:15:38.190Z (28 days ago)
- Topics: apple-music, export, itunes, swift, xml
- Language: Swift
- Homepage: https://fwcd.github.io/swift-music-library/documentation/musiclibrary
- Size: 113 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swift Music Library
[![Build](https://github.com/fwcd/swift-music-library/actions/workflows/build.yml/badge.svg)](https://github.com/fwcd/swift-music-library/actions/workflows/build.yml)
[![Docs](https://github.com/fwcd/swift-music-library/actions/workflows/docs.yml/badge.svg)](https://fwcd.github.io/swift-music-library/documentation/musiclibrary)A small library for programmatically interfacing with local media libraries, including
- The local iTunes and Apple Music/TV/Podcasts library
- iTunes-compatible XML files
- The Mixxx library (WIP)## Example
To export the local Apple media library to an iTunes-compatible XML, use the following snippet:
```swift
import MusicLibrarylet importer = try LocalAppleMediaImporter()
let exporter = LibraryXMLExporter(filePath: "path/to/output.xml")let library = try importer.readLibrary()
try exporter.write(library: library)
```The full example can be found [here](Snippets/AppleMediaToLibraryXML.swift).