move generator functions out of repeated code
move generator functions out of repeated code

CulturePlex/pybossa,geotagx/geotagx-pybossa-archive,OpenNewsLabs/pybossa,Scifabric/pybossa,proyectos-analizo-info/pybossa-analizo-info,stefanhahmann/pybossa,proyectos-analizo-info/pybossa-analizo-info,inteligencia-coletiva-lsd/pybossa,geotagx/pybossa,PyBossa/pybossa,inteligencia-coletiva-lsd/pybossa,geotagx/geotagx-pybossa-archive,OpenNewsLabs/pybossa,jean/pybossa,harihpr/tweetclickers,geotagx/pybossa,Scifabric/pybossa,CulturePlex/pybossa,jean/pybossa,PyBossa/pybossa,harihpr/tweetclickers,geotagx/geotagx-pybossa-archive,geotagx/geotagx-pybossa-archive,geotagx/geotagx-pybossa-archive,proyectos-analizo-info/pybossa-analizo-info,stefanhahmann/pybossa,CulturePlex/pybossa