code: def main():
      
  
      parser = argparse.ArgumentParser(description=__doc__)
      parser.add_argument(
          'githubtoken',
          help="Github OAuth token, see https://developer.github.com/v3/oauth/")
      parser.add_argument('destination', help="location of the downloaded repos")
      parser.add_argument(
          '-n', '--nbrepo', help="number of repositories per language",
          type=int, default=1000)
      parser.add_argument(
          '-d', '--debug', default=False, action='store_true',
          help="show debug messages")
  
      args = parser.parse_args()
      config_logging(args.debug)
  
      destination = Path(args.destination)
      nb_repos = args.nbrepo
      token = args.githubtoken
  
      languages = config_dict('languages.json')
      destination.mkdir(exist_ok=True)
  
      for pos, language in enumerate(sorted(languages), 1):
          LOGGER.info("Step %.2f%%, %s", 100 * pos / len(languages), language)
          LOGGER.info("Fetch %d repos infos for language %s", nb_repos, language)
          repos = _retrieve_repo_details(language, nb_repos, token)
          LOGGER.info("%d repos details kept. Downloading", len(repos))
          _download_repos(language, repos, destination)
          LOGGER.info("Language %s repos downloaded", language)
  
      LOGGER.debug("Exit OK")
docs: Github repositories downloaded command line