2018-11-08 23:32:36 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"html"
|
|
|
|
|
|
|
|
"github.com/animenotifier/arn"
|
2019-03-30 06:39:40 +00:00
|
|
|
"github.com/blitzprog/color"
|
2018-11-08 23:32:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|