springheel.renameimgs module¶
Get renamed images.
-
springheel.renameimgs.
renameImages
(site: springheel.classes.Site, strip: springheel.classes.Strip, pages_path: str, m_ext: str, t_ext: str, image_rename_pattern: str) → Tuple[str, str, str, str]¶ Rename images and related data files as necessary.
- Parameters
- siteSite
The Site this strip belongs to. Needed for config values.
- stripStrip
The Strip to process.
- pages_pathstr
Path to the pages/ directory in output/.
- m_extstr
The file extension for metadata files.
- t_extstr
The file extension for transcript files.
- image_rename_patternstr
The pattern to use for image renaming.
- Returns
- renamed_fnstr
The new image filename.
- renamed_pathstr
The path to the renamed image in output.
- new_metastr
The new metadata filename.
- new_transcrstr
The new transcript filename.
-
springheel.renameimgs.
renamePieces
(site: springheel.classes.Site, strip: springheel.classes.Strip, pid: int, piece: str, pages_path: str, image_rename_pattern: str, images: dict) → Tuple[str, str]¶ File renaming for pieces of webtoon-style comics.
- Parameters
- siteSite
The Site this strip belongs to. Needed for config values.
- stripStrip
The “individual strip” from a metadata perspective.
- pidint
The current piece’s position within the total strip.
- piecestr
The filename of the piece to process.
- pages_pathstr
Path to the pages/ directory in output/.
- image_rename_patternstr
The pattern to use for image renaming.
- imagesdict
A dictionary mapping image filenames to (width, height) in pixels.
- Returns
- renamed_fnstr
The new image filename.
- renamed_pathstr
The path to the renamed image in output.