eyes.data

eyes data module

Eyes base data module

class eyes.data.Post(*, created_at: datetime.datetime = None, updated_at: datetime.datetime = None)

Post Base Model

created_at
Type

Optional[datetime]

updated_at
Type

Optional[datetime]

class eyes.data.Comment(*, created_at: datetime.datetime = None, updated_at: datetime.datetime = None)

Comment Base Model

created_at
Type

Optional[datetime]

updated_at
Type

Optional[datetime]

class eyes.data.Board(*, name: str)

Board base model

name

board name

Type

str

class eyes.data.Entity(*, name: str, type: str = None, label: eyes.type.Label, alias: List[str] = None)

Entity base model

name

name

Type

str

type

type

Type

str

label

entity label

Type

Label

alias

alias

Type

Optional[List[str]]

to_wiki_entity_orm() eyes.db.wiki.WikiEntity

Transform to wiki entity ORM

Returns

wiki.WikiEntity

eyes.data.ptt

Eyes ptt data module

class eyes.data.ptt.PttComment(*, created_at: datetime.datetime = None, updated_at: datetime.datetime = None, comment_id: int, post_id: str, reaction: str, author: str, content: str)

Ptt Post Comment Model

comment_id

comment id

Type

int

post_id

post id

Type

str

reaction

comment reaction

Type

str

author

comment author

Type

str

content

comment content

Type

str

to_orm() eyes.db.ptt.PttComment

Transform to ORM model

Returns

ptt.PttComment

class eyes.data.ptt.PttPost(*, created_at: datetime.datetime = None, updated_at: datetime.datetime = None, id: str, title: str, author: str, board: str, content: str, comments: List[eyes.data.ptt.PttComment] = [], url: str)

PTT Post Model

id

post id

Type

str

title

post title

Type

str

author

post author

Type

str

board

board name

Type

str

content

post content

Type

str

comments

post comments

Type

List[PttComment]

url

post url

Type

str

to_orm() eyes.db.ptt.PttPost

Transform to ORM model

Returns

ptt.PttPost

class eyes.data.ptt.PttBoard(*, name: str, url: str)

PTT Board

url

board url

Type

str

to_orm() eyes.db.ptt.PttBoard

Transform to ORM model

Returns

ptt.PttBoard

eyes.data.dcard

Eyes dcard data module

class eyes.data.dcard.DcardReaction(*, post_id: str, reaction_id: str, count: int)

Dcard reaction Base Model

to_orm() eyes.db.dcard.DcardReaction

Transform to ORM model

Returns

dcard.DcardReaction

class eyes.data.dcard.DcardComment(*, created_at: datetime.datetime = None, updated_at: datetime.datetime = None, id: str, post_id: str, anonymous: bool, with_nickname: bool, floor: int, content: str, gender: str, school: str = None, host: bool, like_count: int)

Dcard Post Comment Model

to_orm() eyes.db.dcard.DcardComment

Transform to ORM model

Returns

dcard.DcardComment

class eyes.data.dcard.DcardPost(*, created_at: datetime.datetime = None, updated_at: datetime.datetime = None, id: int, forum_id: str, forum_name: str, title: str, content: str, school: str = None, gender: str, topics: List[str], like_count: int, reactions: List[eyes.data.dcard.DcardReaction] = [], with_nickname: bool, anonymous_school: bool, anonymous_department: bool, media: List[Dict] = [], comments: List[eyes.data.dcard.DcardComment] = [])

Dcard Post Model

to_orm() eyes.db.dcard.DcardPost

Transform to ORM model

Returns

dcard.DcardPost

class eyes.data.dcard.DcardBoard(*, name: str, id: str, alias: str, description: str, is_school: bool, created_at: datetime.datetime, updated_at: datetime.datetime)

Dcard Board

id

forum id

Type

str

alias

forum alias

Type

str

description

forum description

Type

str

is_school

whether this forum is school board

Type

bool

created_at

forum created time

Type

datetime

updated_at

forum updated time

Type

datetime

to_orm() eyes.db.dcard.DcardBoard

Transform to ORM model

Returns

dcard.DcardBoard

eyes.data.stats

Eyes stats data module

class eyes.data.stats.MonthlySummary(*, source: eyes.type.SourceType, total_posts: int, total_comments: int, year: int, month: int, created_at: datetime.datetime = None, updated_at: datetime.datetime = None)

Monthly summary data container

to_orm() eyes.db.stats.MonthlySummary

Transform to ORM model

Returns

stats.MonthlySummary

class eyes.data.stats.DailySummary(*, source: eyes.type.SourceType, total_posts: int, year: int, month: int, day: int, created_at: datetime.datetime = None, updated_at: datetime.datetime = None)

Daily summary data container

to_orm() eyes.db.stats.DailySummary

Transform to ORM model

Returns

stats.DailySummary

class eyes.data.stats.EntitySummary(*, name: str, count: int, board_stats: List[Dict] = [], link_stats: List[Dict] = [], posts: List[Dict] = [], year: int, month: int, created_at: datetime.datetime, updated_at: datetime.datetime)

Entity summary data container

class Config

Pydantic config

to_orm() eyes.db.stats.EntitySummary

Transform to ORM model

Returns

stats.EntitySummary

eyes.data.spacy

Eyes spacy data container

class eyes.data.spacy.SpacyPttComment(*, comment_id: int, post_id: str, content: bytes)

Spacy ptt comment data container

to_orm() eyes.db.spacy.SpacyPttComment

Transform to orm model

Returns

spacy.SpacyPttComment

class eyes.data.spacy.SpacyPttPost(*, id: str, title: bytes, content: bytes, comments: List[eyes.data.spacy.SpacyPttComment] = [], created_at: datetime.datetime, updated_at: datetime.datetime)

Spacy ptt post data container

to_orm() eyes.db.spacy.SpacyPttPost

Transform to orm model

Returns

spacy.SpacyPttPost