swh.lister.gitiles.lister module#
- class swh.lister.gitiles.lister.GitilesLister(scheduler: SchedulerInterface, url: str | None = None, instance: str | None = None, credentials: Dict[str, Dict[str, List[Dict[str, str]]]] | None = None, max_origins_per_page: int | None = None, max_pages: int | None = None, enable_origins: bool = True)[source]#
Bases:
StatelessLister
[str
]Lister class for Gitiles repositories.
This lister will retrieve the list of published git repositories by parsing the json page found at the url <url>?format=json.
Lister class for Gitiles repositories.
- Parameters:
url – (Optional) Root URL of the Gitiles instance, i.e. url of the index of published git repositories on this instance. Defaults to
https://instance
if unset.instance – Name of gitiles instance. Defaults to url’s network location if unset.
- get_pages() Iterator[str] [source]#
Generate git ‘project’ URLs found on the current Gitiles server.
- get_origins_from_page(origin: str) Iterator[ListedOrigin] [source]#
Convert a page of gitiles repositories into a list of ListedOrigins.