Here is the script in its latest state in 2019. You can unpack it, and add it to the Scripts folder that comes up when you choose Script > Open Scripts Folder, then hold down the Opt key and choose Script > Reload Scripts Folder:
Replace all Paths with Component.py.zip (2.5 KB)
Haven’t tested it, but it should still work in Glyphs 3.