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 -> Data
Parameters
documentInfo
The document info for the PDF
counter
The
PDFBuild.PageCounter
classappSettings
The application settings
progress
A closure to observe the progress of PDF creation
Return Value
The PDF as
Data
and thePageCounter
class 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
documentInfo
The document info for the PDF
appSettings
The 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
documentInfo
The document info for the PDF
appSettings
The application settings
progress
The 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
SongItem
array -
Create a Table of Contents
Declaration
Parameters
documentInfo
The document info for the PDF
counter
The
page counter
classReturn Value
The Table of Contents as
Data