Added watchdog mode
This commit is contained in:
12
write.ts
12
write.ts
@@ -10,11 +10,15 @@ Level: ${video.level}
|
||||
|
||||
[[${video.path}|left|400px|thumb|${video.title}]]
|
||||
|
||||
<div style="float:left">
|
||||
==== Shown Patterns ====
|
||||
${video.patterns}
|
||||
|
||||
==== Notes ====
|
||||
${video.notes}`;
|
||||
${video.notes}
|
||||
</div>
|
||||
|
||||
<br clear=all>`;
|
||||
}
|
||||
|
||||
export function writeSection(events: VideoDescription[][]): string {
|
||||
@@ -26,7 +30,7 @@ export function writeSection(events: VideoDescription[][]): string {
|
||||
const event_date = event_name.match(/\d{2}|20\d{2}/) ? "" : new Date(token.date).getFullYear().toString()
|
||||
|
||||
let r = `== ${event_name} ${event_date} ==\n`
|
||||
r += `${v.length} Videos\n`
|
||||
r += `${v.length} Video${v.length <= 1 ? "" : "s"}\n`
|
||||
r += v.map(video => singleVideoDescription(video)).join("\n\n")
|
||||
return r
|
||||
}).join("\n\n\n")
|
||||
@@ -46,7 +50,7 @@ export function bucketEvents(events: VideoDescription[]): VideoDescription[][] {
|
||||
Object.values(buckets)
|
||||
.forEach(b =>
|
||||
b.sort((a, b) =>
|
||||
new Date(b.date).getTime() - new Date(a.date).getTime()))
|
||||
new Date(a.date).getTime() - new Date(b.date).getTime()))
|
||||
|
||||
return Object.values(buckets)
|
||||
return Object.values(buckets).sort((a, b) => new Date(a[0].date).getTime() - new Date(b[0].date).getTime())
|
||||
}
|
||||
Reference in New Issue
Block a user