2022-06-29 11:51:58 +09:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/akyoto/color"
|
|
|
|
"github.com/animenotifier/notify.moe/arn"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
defer arn.Node.Close()
|
|
|
|
|
|
|
|
for post := range arn.StreamPosts() {
|
2022-06-29 11:53:52 +09:00
|
|
|
if post.ParentID == "" {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
obj, _ := arn.DB.Get(post.ParentType, post.ParentID)
|
|
|
|
|
|
|
|
if obj == nil {
|
2022-06-29 11:51:58 +09:00
|
|
|
color.Yellow(post.ID)
|
|
|
|
color.Red(post.Text)
|
2022-06-29 11:55:52 +09:00
|
|
|
post.Delete()
|
2022-06-29 11:51:58 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|