steambird/material_management/tools.py
def isbn_lookup(isbn: str):
    """
    Tool that uses isbnlib to look up information for the given ISBN.

    :param isbn: ISBN in string format, as ISBN can also have some letters and dashes
    :return: Dict with data, or None
    """
    try:
        meta_info = isbnlib.meta(isbn)
        desc = isbnlib.desc(isbn)
        cover = isbnlib.cover(isbn)

        try:
            meta_info['img'] = cover['thumbnail']
        except (TypeError, KeyError):
            meta_info['img'] = None

        return {
            'meta': meta_info,
            'desc': desc,
            'cover': cover,
        }

    except NoDataForSelectorError:
        return None

    Tool that uses isbnlib to look up information for the given ISBN.

    :param isbn: ISBN in string format, as ISBN can also have some letters and dashes
    :return: Dict with data, or None
    
Tool that uses isbnlib to look up information for the given ISBN.
Tool that uses isbnlib to look up information for the given ISBN .
def isbn_lookup(isbn: str):
    try:
        meta_info = isbnlib.meta(isbn)
        desc = isbnlib.desc(isbn)
        cover = isbnlib.cover(isbn)
        try:
            meta_info['img'] = cover['thumbnail']
        except (TypeError, KeyError):
            meta_info['img'] = None
        return {
            'meta': meta_info,
            'desc': desc,
            'cover': cover,
        }
    except NoDataForSelectorError:
        return None
def isbn_lookup ( isbn : str ) : try : meta_info = isbnlib . meta ( isbn ) desc = isbnlib . desc ( isbn ) cover = isbnlib . cover ( isbn ) try : meta_info [ 'img' ] = cover [ 'thumbnail' ] except ( TypeError , KeyError ) : meta_info [ 'img' ] = None return { 'meta' : meta_info , 'desc' : desc , 'cover' : cover , } except NoDataForSelectorError : return None
Tool that uses isbnlib to look up information for the given ISBN.
Tool that uses isbnlib to look up information for the given ISBN .
"""
    Tool that uses isbnlib to look up information for the given ISBN.

    :param isbn: ISBN in string format, as ISBN can also have some letters and dashes
    :return: Dict with data, or None
    """
Dict with data, or None
Dict with data or None
isbn
str
ISBN in string format, as ISBN can also have some letters and dashes
ISBN in string format as ISBN can also have some letters and dashes