Added patch for character name unescaping

This commit is contained in:
Eduard Urbach 2018-11-09 08:32:36 +09:00
parent 0baf37f1bf
commit 305c20f5a6

View File

@ -0,0 +1,26 @@
package main
import (
"fmt"
"html"
"github.com/animenotifier/arn"
"github.com/fatih/color"
)
func main() {
color.Yellow("Unescape HTML entities in character names")
defer color.Green("Finished.")
defer arn.Node.Close()
for character := range arn.StreamCharacters() {
unescapedName := html.UnescapeString(character.Name.Canonical)
if character.Name.Canonical != unescapedName {
fmt.Println(character.Name.Canonical, "->", unescapedName)
character.Name.Canonical = unescapedName
character.Save()
}
}
}