dilbert.py¶
Installation¶
Python 3.8 or higher is required.
To install the stable version, do the following:
# Unix / macOS
python3 -m pip install "dilbert.py"
# Windows
py -m pip install "dilbert.py"
To install the development version, do the following:
$ git clone https://github.com/Infiniticity/dilbert.py
Make sure you have the latest version of Python installed, or if you prefer, a Python version of 3.8 or greater.
If you have have any other issues feel free to search for duplicates and then create a new issue on GitHub with as much detail as possible. Include the output in your terminal, your OS details and Python version.
Comic¶
- class dilbert.Comic(date: Optional[datetime] = None)¶
A class that represents a comic.
- Parameters
date (Optional[
datetime
]) – The comic’s date.- Variables
date – The comic’s date.
image – The URL of the comic’s image.
title – The title of the comic.
rating – The comic’s rating.
url – The comic’s URL.
tags – The tags associated with the comic.
transcript – The comic’s transcript.
Other Functions¶
- dilbert.search(text: str, *, month: Optional[datetime] = None, year: Optional[datetime] = None, page: Optional[int] = None, sort: Optional[Literal['relevance', 'ascending', 'descending']] = 'relevance') List[Comic] ¶
Searches Dilbert.
- Parameters
text (str) – The text to search for.
category (Optional[Literal["comic", "feature"]]) – The category to search in.
page (Optional[
int
]) – The page number.sort (Optional[Literal["ascending", "descending"]]) – The method of sorting results (based on date).
- dilbert.keywords(letter: str) List[str] ¶
Fetches popular keywords from Dilbert.
- Parameters
letter (str) – The first letter of the keywords.