KiCad change fields visibility utility

$ open devlog I’ve back imported footprints for a .cmp file and I’ve misunderstood kicad’s question about the imported footprints visibility, so all went visible. And surprise, you can not edit visibility for all fields at once. So little utility was born – fixvis. Usage is pretty simple: ./fixvis file.sch fieldid newval where fieldid is: 0 - Reference 1 - Value 2 - Footprint 3 - Datasheet 4+ - custom