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