www¶
Internet-related functions.
- deltona.www.BookmarksDataset¶
Bookmark top structure.
alias of
list[BookmarksHTMLFolder|BookmarksHTMLLink]
- class deltona.www.BookmarksHTMLAnchorAttributes¶
Bases:
TypedDictAttributes of a bookmark link.
- icon : NotRequired[str]¶
Icon data URI.
- class deltona.www.BookmarksHTMLFolder¶
Bases:
TypedDictA bookmark folder.
- attrs : BookmarksHTMLFolderAttributes¶
Folder attributes.
- children : list[BookmarksHTMLLink | BookmarksHTMLFolder]¶
Child items.
- class deltona.www.BookmarksHTMLFolderAttributes¶
Bases:
TypedDictAttributes of a bookmark folder.
- personal_toolbar_folder : NotRequired[Literal['true']]¶
Whether this is the personal toolbar folder.
- class deltona.www.BookmarksHTMLLink¶
Bases:
TypedDictA bookmark link.
- attrs : BookmarksHTMLAnchorAttributes¶
Link attributes.
- deltona.www.RecurseBookmarksHTMLCallback¶
Callback for
recurse_bookmarks_html()to call for each link.alias of
Callable[[BookmarksHTMLAnchorAttributes,str,Sequence[tuple[str,BookmarksHTMLFolderAttributes]]],None]
- async deltona.www.check_bookmarks_html_urls(html_content: str) tuple[list[BookmarksHTMLFolder | BookmarksHTMLLink], list[BookmarksHTMLFolder | BookmarksHTMLLink], list[BookmarksHTMLFolder | BookmarksHTMLLink]]¶
Check a browser’s exported
bookmarks.htmlURLs.Checks for URLs that are not valid any more (status
404) or have changed (statuses301and302). URLs are checked concurrently.
-
deltona.www.generate_html_dir_tree(start_dir: StrPath, *, follow_symlinks: bool =
False, depth: int =2) str¶ Generate an HTML directory listing.
- deltona.www.parse_bookmarks_html(html_content: str) list[BookmarksHTMLFolder | BookmarksHTMLLink]¶
Parse a browser’s exported
bookmarks.html.
- deltona.www.recurse_bookmarks_html(soup: Tag, callback: RecurseBookmarksHTMLCallback) None¶
Traverse the
bookmarks.htmltree and call the callback for each link.- Parameters:¶
- soup : Tag¶
Parsed HTML tag to traverse.
- callback : RecurseBookmarksHTMLCallback¶
Function called for each link found.
-
async deltona.www.upload_to_imgbb(path: StrPath, *, api_key: str | None =
None, keyring_username: str | None =None, http_timeout: float =5) Response¶ Upload an image to ImgBB.
Get an API key at https://api.imgbb.com/ and set it with
keyring set imgbb keyring_username.