Skip to content

Zotero

notionsci.connections.zotero special

client

ZoteroApiMixin dataclass

ZoteroApiMixin(client: Optional[pyzotero.zotero.Zotero] = None)

ZoteroClient dataclass

ZoteroClient(client: Optional[pyzotero.zotero.Zotero] = None)

helpers

generate_citekey(item)

Generates cite key according to default better bibtex format [auth:lower][shorttitle3_3][year] :param item: :return:

Source code in zotero/helpers.py
def generate_citekey(item: Item):
    """
    Generates cite key according to default better bibtex format
    [auth:lower][shorttitle3_3][year]
    :param item:
    :return:
    """
    authors = item.authors.lower().split()
    author = authors[0] if len(authors) > 0 else ''
    shorttitle3_3 = short_title(item.title, 3)
    year = item.year

    return f'{author}{shorttitle3_3}{year}'

structures special

collection

Collection dataclass

Collection(key: str, version: int, library: notionsci.connections.zotero.structures.library.Library, links: Dict, meta: notionsci.connections.zotero.structures.common.Meta, data: notionsci.connections.zotero.structures.collection.CollectionData, children: Optional[Dict[str, notionsci.connections.zotero.structures.collection.CollectionData]] = None, items: Optional[Dict[str, notionsci.connections.zotero.structures.item.ItemData]] = None)

CollectionData dataclass

CollectionData(key: str, version: int, name: str, parent_collection: Optional[str] = None, relations: Optional[Dict] = None)

common

Entity dataclass

Entity(key: str, version: int)

Meta dataclass

Meta(created_by_user: Optional[Dict] = None, parsed_date: Optional[str] = None, creator_summary: Optional[str] = None, num_items: Optional[int] = None, num_collections: Optional[int] = None, num_children: Optional[int] = None)

item

Item dataclass

Item(key: str, version: int, library: notionsci.connections.zotero.structures.library.Library, links: Dict, meta: notionsci.connections.zotero.structures.common.Meta, data: notionsci.connections.zotero.structures.item.ItemData, children: Optional[Dict[str, notionsci.connections.zotero.structures.item.ItemData]] = None)

ItemData dataclass

ItemData(key: str, version: int, item_type: notionsci.connections.zotero.structures.item.ItemType, date_added: datetime.datetime, date_modified: datetime.datetime, parent_item: types.Undefinable_str = None, tags: Optional[List[notionsci.connections.zotero.structures.item.Tag]] = None, collections: Optional[List[str]] = None, relations: Optional[Dict] = None, properties: Optional[Dict[str, Any]] = None)

ItemType

An enumeration.

Tag dataclass

Tag(tag: str, type: types.Undefinable_int = None)

library

Library dataclass

Library(id: int, type: notionsci.connections.zotero.structures.library.LibraryType, name: str, links: Dict)

LibraryType

An enumeration.

query

Direction

An enumeration.

SearchPagination dataclass

SearchPagination(sort: Optional[str] = None, direction: Optional[notionsci.connections.zotero.structures.query.Direction] = None, limit: int = 100, start: int = 0)

SearchParameters dataclass

SearchParameters(item_key: Optional[List[str]] = None, item_type: Optional[str] = None, q: Optional[str] = None, since: Optional[int] = None, tag: Optional[str] = None, include_trashed: Optional[int] = None)

Back to top