feat: Adds generate commands that call to pandoc to generate pdf, latex, and html files from a project.

This commit is contained in:
2024-12-13 15:33:20 -05:00
parent d1b3379815
commit 3f56dda568
22 changed files with 606 additions and 57 deletions

View File

@@ -143,23 +143,6 @@ func generateFindEnvironments(file: File) -> [[String: String]] {
]
}
// swiftlint:disable force_try
func withTemporaryDirectory(
_ operation: @Sendable (URL) async throws -> Void
) async rethrows {
let dir = FileManager.default.temporaryDirectory
let tempDir = dir.appending(path: UUID().uuidString)
try! FileManager.default.createDirectory(
atPath: tempDir.cleanFilePath,
withIntermediateDirectories: false
)
try await operation(tempDir)
try! FileManager.default.removeItem(at: tempDir)
}
// swiftlint:enable force_try
func withGeneratedConfigFile(
named fileName: String,
client: ConfigurationClient,