2018-11-08 23:32:36 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"html"
|
|
|
|
|
|
|
|
"github.com/animenotifier/arn"
|
2019-04-23 05:45:17 +00:00
|
|
|
"github.com/akyoto/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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|