FolderExport
enum FolderExport
Export a folder with ChordPro songs to a PDF
-
Convert ChordPro files to a PDF
Declaration
Swift
static func content( documentInfo: PDFBuild.DocumentInfo, counter: PDFBuild.PageCounter, appSettings: AppSettings, progress: @escaping (Double) -> Void ) async -> DataParameters
documentInfoThe document info for the PDF
counterThe
PDFBuild.PageCounterclassappSettingsThe application settings
progressA closure to observe the progress of PDF creation
Return Value
The PDF as
Dataand thePageCounterclass with TOC info -
The status of the export
See moreDeclaration
Swift
enum Status -
Export a folder with ChordPro songs
Declaration
Swift
static func export( documentInfo: PDFBuild.DocumentInfo, appSettings: AppSettings ) -> AsyncThrowingStream<Status, Error>Parameters
documentInfoThe document info for the PDF
appSettingsThe application settings
Return Value
A stream with progress indication and a document when finished
-
Export a folder with ChordPro songs
Declaration
Swift
static func export( documentInfo: PDFBuild.DocumentInfo, appSettings: AppSettings, progress: @escaping (Double) -> Void ) async throws -> Data?Parameters
documentInfoThe document info for the PDF
appSettingsThe application settings
progressThe progress of the folder export
Return Value
A PDFDocument if all well, else an error
-
Get all ChordPro songs from a specific folder
Declaration
Swift
static func files() throws -> [FileBrowserModel.SongItem]Return Value
All found songs in a
SongItemarray -
Create a Table of Contents
Declaration
Parameters
documentInfoThe document info for the PDF
counterThe
page counterclassReturn Value
The Table of Contents as
Data
View on GitHub