KaraKaraWitch
commited on
Commit
•
a90abba
1
Parent(s):
7ba3128
Update README.md
Browse files
README.md
CHANGED
@@ -32,6 +32,30 @@ Both Archive modes are written to jsonl:
|
|
32 |
- For Archive mode, each json line represents an entire thread dump.
|
33 |
- For PostStream, each json represents a single post.
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
## Notices
|
37 |
|
|
|
32 |
- For Archive mode, each json line represents an entire thread dump.
|
33 |
- For PostStream, each json represents a single post.
|
34 |
|
35 |
+
## Models
|
36 |
+
|
37 |
+
Refer to the following pydantic model for parsing:
|
38 |
+
|
39 |
+
```py
|
40 |
+
class AttachmentData(pydantic.BaseModel):
|
41 |
+
attachment_url: str
|
42 |
+
filename: str
|
43 |
+
|
44 |
+
|
45 |
+
class Post(pydantic.BaseModel):
|
46 |
+
board: str
|
47 |
+
thread: int
|
48 |
+
pid:int
|
49 |
+
name: str
|
50 |
+
msg: str
|
51 |
+
attachment: Optional[AttachmentData] = None
|
52 |
+
posted:int
|
53 |
+
|
54 |
+
class Thread(pydantic.BaseModel):
|
55 |
+
|
56 |
+
title:Optional[str]
|
57 |
+
posts:list[Post]
|
58 |
+
```
|
59 |
|
60 |
## Notices
|
61 |
|