def add_repository(ending):
"""Sumbit a repository for scraping
This shows an html page with a link to the status of the repository.
"""
repository = request.forms.get('repository')
organization_name, repository_name = repository.split("/")
scraper.scrape_repository(repository)
if ending == "json":
return {"status": "ok", "urls": api.get_repository_urls(organization_name, repository_name)}
return template("added-repository.html", repository=repository)
评论列表
文章目录