walhalla.open2ch
OpenThread
kiss.Storable
OpenThread
Represents a discussion thread on open2ch, including its metadata and all comments. This class is responsible for parsing the cached thread HTML file and converting it into structured data. It also handles storage and retrieval of the parsed content as a JSON file for later use.
title
String
The thread's title (usually derived from the directory name).
num
int
The thread's number.
id
int
The thread's id.
url
String
The canonical URL of the thread.
comments
ListRes
Res
The list of comments (res) contained in this thread.
lastImageBackuped
LocalDateTime
getCommentBy
(int
num
)
Res
int
num
)int num |
The comment number (starting from 1). |
Res |
The corresponding |
Retrieves a comment by its number. If the number is negative, it returns the comment counted from the end.
getTopics
()
ListTopic
Topic
List |
A list of extracted |
Returns a list of topics extracted from the comments in this thread.
locate
()
Path
Path |
The file path of the persisted thread data. |
Specifies where the JSON representation of this thread will be stored.
analyze
()
void
Performs topic extraction from all comments using an LLM (Gemini).
This method constructs a single prompt string by concatenating all comment bodies and media links, then sends it to a language model to extract high-level discussion topics.