Compare commits
No commits in common. "10267e376504a244d4756af5c4a704916ef2f729" and "67a0da13bd3fb81ab3d088612f16143fa4e23569" have entirely different histories.
10267e3765
...
67a0da13bd
@ -382,7 +382,8 @@ extension Element {
|
||||
}
|
||||
let all = shownItems
|
||||
.reduce(into: [Element]()) { $0 += $1.mostRecentElements(count) }
|
||||
.filter { $0.thumbnailStyle == .large && $0.state == .standard && $0.date != nil }
|
||||
.filter { $0.thumbnailStyle == .large }
|
||||
.filter { $0.date != nil }
|
||||
.sorted { $0.date! > $1.date! }
|
||||
return Array(all.prefix(count))
|
||||
}
|
||||
|
@ -259,14 +259,6 @@ final class FileGenerator {
|
||||
}
|
||||
|
||||
func writeResults(to file: URL) {
|
||||
guard !unreadableFiles.isEmpty || !unwritableFiles.isEmpty || !failedMinifications.isEmpty || !missingFiles.isEmpty || !copiedFiles.isEmpty || !minifiedFiles.isEmpty || !files.expected.isEmpty || !files.external.isEmpty else {
|
||||
do {
|
||||
try FileManager.default.removeItem(at: file)
|
||||
} catch {
|
||||
print(" Failed to delete file log: \(error)")
|
||||
}
|
||||
return
|
||||
}
|
||||
var lines: [String] = []
|
||||
func add<S>(_ name: String, _ property: S, convert: (S.Element) -> String) where S: Sequence {
|
||||
let elements = property.map { " " + convert($0) }.sorted()
|
||||
@ -283,13 +275,12 @@ final class FileGenerator {
|
||||
add("Copied files", copiedFiles) { $0 }
|
||||
add("Minified files", minifiedFiles) { $0 }
|
||||
add("Expected files", files.expected) { "\($0.key) (required by \($0.value))" }
|
||||
add("External files", files.external) { "\($0.key) (required by \($0.value))" }
|
||||
|
||||
let data = lines.joined(separator: "\n").data(using: .utf8)!
|
||||
do {
|
||||
try data.createFolderAndWrite(to: file)
|
||||
} catch {
|
||||
print(" Failed to save file log: \(error)")
|
||||
print(" Failed to save log: \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -455,14 +455,6 @@ final class GenerationResultsHandler {
|
||||
}
|
||||
|
||||
func writeResults(to file: URL) {
|
||||
guard !missingFiles.isEmpty || !unreadableFiles.isEmpty || !unwritableFiles.isEmpty || !missingLinkedPages.isEmpty || !pageWarnings.isEmpty || !generatedFiles.isEmpty || !draftPages.isEmpty || !emptyPages.isEmpty else {
|
||||
do {
|
||||
try FileManager.default.removeItem(at: file)
|
||||
} catch {
|
||||
print(" Failed to delete generation log: \(error)")
|
||||
}
|
||||
return
|
||||
}
|
||||
var lines: [String] = []
|
||||
func add<S>(_ name: String, _ property: S, convert: (S.Element) -> String) where S: Sequence {
|
||||
let elements = property.map { " " + convert($0) }.sorted()
|
||||
@ -484,7 +476,7 @@ final class GenerationResultsHandler {
|
||||
do {
|
||||
try data.createFolderAndWrite(to: file)
|
||||
} catch {
|
||||
print(" Failed to save generation log: \(error)")
|
||||
print(" Failed to save log: \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,14 +312,6 @@ final class ImageGenerator {
|
||||
}
|
||||
|
||||
func writeResults(to file: URL) {
|
||||
guard !missingImages.isEmpty || !unreadableImages.isEmpty || !failedImages.isEmpty || !unhandledImages.isEmpty || !imageWarnings.isEmpty || !generatedImages.isEmpty || !optimizedImages.isEmpty else {
|
||||
do {
|
||||
try FileManager.default.removeItem(at: file)
|
||||
} catch {
|
||||
print(" Failed to delete image log: \(error)")
|
||||
}
|
||||
return
|
||||
}
|
||||
var lines: [String] = []
|
||||
func add<S>(_ name: String, _ property: S, convert: (S.Element) -> String) where S: Sequence {
|
||||
let elements = property.map { " " + convert($0) }.sorted()
|
||||
@ -340,7 +332,7 @@ final class ImageGenerator {
|
||||
do {
|
||||
try data.createFolderAndWrite(to: file)
|
||||
} catch {
|
||||
print(" Failed to save image log: \(error)")
|
||||
print(" Failed to save log: \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,14 +151,6 @@ final class MetadataInfoLogger {
|
||||
}
|
||||
|
||||
func writeResults(to file: URL) {
|
||||
guard !errors.isEmpty || !warnings.isEmpty || !unreadableMetadata.isEmpty || !unusedProperties.isEmpty || !invalidProperties.isEmpty || !unknownProperties.isEmpty || !missingProperties.isEmpty else {
|
||||
do {
|
||||
try FileManager.default.removeItem(at: file)
|
||||
} catch {
|
||||
print(" Failed to delete metadata log: \(error)")
|
||||
}
|
||||
return
|
||||
}
|
||||
var lines: [String] = []
|
||||
func add<S>(_ name: String, _ property: S, convert: (S.Element) -> String) where S: Sequence {
|
||||
let elements = property.map { " " + convert($0) }.sorted()
|
||||
@ -180,7 +172,7 @@ final class MetadataInfoLogger {
|
||||
do {
|
||||
try data.createFolderAndWrite(to: file)
|
||||
} catch {
|
||||
print(" Failed to save metadata log: \(error)")
|
||||
print(" Failed to save log: \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user