Improve overview of modified pages
This commit is contained in:
@ -76,6 +76,11 @@ final class FileSystem {
|
||||
*/
|
||||
private var imageTasks: [String : ImageOutput] = [:]
|
||||
|
||||
/**
|
||||
The paths to all pages which were changed
|
||||
*/
|
||||
private var generatedPages: Set<String> = []
|
||||
|
||||
init(in input: URL, to output: URL) {
|
||||
self.input = input
|
||||
self.output = output
|
||||
@ -474,6 +479,21 @@ final class FileSystem {
|
||||
pagePaths[id]
|
||||
}
|
||||
|
||||
func generated(page: String) {
|
||||
generatedPages.insert(page)
|
||||
}
|
||||
|
||||
func printGeneratedPages() {
|
||||
guard !generatedPages.isEmpty else {
|
||||
print("No pages modified")
|
||||
return
|
||||
}
|
||||
print("\(generatedPages.count) pages modified")
|
||||
for page in generatedPages.sorted() {
|
||||
print(" " + page)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: Writing files
|
||||
|
||||
|
Reference in New Issue
Block a user