Print draft pages
This commit is contained in:
@ -57,6 +57,11 @@ final class FileSystem {
|
||||
*/
|
||||
private var emptyPages: Set<String> = []
|
||||
|
||||
/**
|
||||
All pages which have `status` set to ``PageState.draft``
|
||||
*/
|
||||
private var draftPages: Set<String> = []
|
||||
|
||||
/**
|
||||
All paths to page element folders, indexed by their unique id.
|
||||
|
||||
@ -427,9 +432,23 @@ final class FileSystem {
|
||||
guard !emptyPages.isEmpty else {
|
||||
return
|
||||
}
|
||||
log.add(info: "\(emptyPages.count) empty pages:", source: "Files")
|
||||
print("\(emptyPages.count) empty pages:")
|
||||
for page in emptyPages.sorted() {
|
||||
log.add(info: "\(page) has no content", source: "Files")
|
||||
print(" " + page)
|
||||
}
|
||||
}
|
||||
|
||||
func isDraft(path: String) {
|
||||
draftPages.insert(path)
|
||||
}
|
||||
|
||||
func printDraftPages() {
|
||||
guard !draftPages.isEmpty else {
|
||||
return
|
||||
}
|
||||
print("\(draftPages.count) drafts:")
|
||||
for page in draftPages.sorted() {
|
||||
print(" " + page)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user