From d90d20f2309cffe1990984a4ca03cf81d6019ed0 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sat, 10 Mar 2018 13:15:06 +0100 Subject: [PATCH] Added backlog --- patches/backlog/backlog.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 patches/backlog/backlog.go diff --git a/patches/backlog/backlog.go b/patches/backlog/backlog.go new file mode 100644 index 00000000..8801db43 --- /dev/null +++ b/patches/backlog/backlog.go @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + + "github.com/animenotifier/arn" +) + +func main() { + defer arn.Node.Close() + + for track := range arn.StreamSoundTracks() { + if track.Created > "2018-03-09" { + continue + } + + fmt.Println(track.Created, track.Title) + logEntry := arn.NewEditLogEntry(track.CreatedBy, "create", "SoundTrack", track.ID, "", "", "") + logEntry.Created = track.Created + logEntry.Save() + } + + for quote := range arn.StreamQuotes() { + if quote.Created > "2018-03-09" { + continue + } + + fmt.Println(quote.Created, quote.Text.English) + logEntry := arn.NewEditLogEntry(quote.CreatedBy, "create", "Quote", quote.ID, "", "", "") + logEntry.Created = quote.Created + logEntry.Save() + } +}