springheel.generatearchive module¶
Generate links for archive pages.
- springheel.generatearchive.generateChapArchList(archive: List[str], chapter: springheel.classes.Chapter, translated_strings: dict, level: str) → str¶
Generates an ordered list of pages in a chapter.
- Parameters
- archivelist of str
A list of HTML list item elements that link to pages in the chapter.
- chapterspringheel.classes.Chapter
The
springheel.classes.Chapter
whose archive to generate.- translated_stringsdict
The translation file contents for this site.
- levelstr
The heading level to use (“2” or “3”).
- Returns
- str
The completed chapter archive section.
- springheel.generatearchive.generateSeriesArchives(category: str, status: str, archive: List[str], slug: str) → str¶
Generates an ordered list of pages that aren’t in a chapter.
- Parameters
- categorystr
The category to which these pages belong.
- statusstr
The status of the comic (active, complete, etc.).
- archivelist of str
A list of HTML list item elements that link to pages in the comic.
- slugstr
A slug to use for the comic category.
- Returns
- str
The completed comic archive section.
- springheel.generatearchive.getLinks(i: springheel.classes.Strip, translated_strings: dict) → str¶
Generate hyperlinks for the archive page.
Takes a Strip object and links it according to the archive link format for the current language from strings.json.
- Parameters
- iStrip
The
springheel.classes.Strip
whose link is to be formatted.- translated_strings: dict
The translation file contents for this site.
- Returns
- str
The formatted link to the page.