Automated Extended Aperture Photometry of K2 variable stars