utils
Code Browsr Utility Functions
ArchiveFileError
#
FileInfo
dataclass
#
File Information Object
Source code in browsr/utils.py
_open_pdf_as_image(buf)
#
Open a PDF file and return a PIL.Image object
Source code in browsr/utils.py
get_file_info(file_path)
#
Get File Information, Regardless of the FileSystem
Source code in browsr/utils.py
handle_duplicate_filenames(file_path)
#
Handle Duplicate Filenames
Duplicate filenames are handled by appending a number to the filename in the form of "filename (1).ext", "filename (2).ext", etc.
Source code in browsr/utils.py
handle_github_url(url)
#
Handle GitHub URLs
GitHub URLs are handled by converting them to the raw URL.
Source code in browsr/utils.py
open_image(document, screen_width)
#
Open an image file and return a rich_pixels.Pixels object