It should really do the same thing as https://github.com/cpsievert/pitchRx/blob/master/inst/scripts/gids.R but I'm wary about introducing all those dependencies...perhaps rewrite using just XML and RCurl?