swh.lister.stagit.lister module#

class swh.lister.stagit.lister.StagitLister(scheduler: SchedulerInterface, url: Optional[str] = None, instance: Optional[str] = None, credentials: Optional[Dict[str, Dict[str, List[Dict[str, str]]]]] = None, max_origins_per_page: Optional[int] = None, max_pages: Optional[int] = None, enable_origins: bool = True)[source]#

Bases: StatelessLister[List[Dict[str, Any]]]

Lister class for Stagit forge instances.

This lister will retrieve the list of published git repositories by parsing the HTML page(s) of the index retrieved at url.

Lister class for Stagit repositories.

  • url – (Optional) Root URL of the Stagit instance, i.e. url of the index of published git repositories on this instance. Defaults to https://instance if unset.

  • instance – Name of stagit instance. Defaults to url’s network location if unset.

LISTER_NAME: str = 'stagit'#
get_pages() Iterator[List[Dict[str, Any]]][source]#

Generate git ‘project’ URLs found on the current Stagit server.

get_origins_from_page(repositories: List[Dict[str, Any]]) Iterator[ListedOrigin][source]#

Convert a page of stagit repositories into a list of ListedOrigins.

url: str#
recorded_origins: Set[str]#