Skip to content

search for specific content in LINE chat log files saved in .txt format.

License

Notifications You must be signed in to change notification settings

pullriku/line-history-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

line-history

Description

search for specific content in LINE chat log files saved in .txt format.

Example

Reads a LINE chat history file (history.txt), filters out errors, and searches for messages from a specific date (December 20, 2024). It then prints the messages along with the sender's name and timestamp.

use chrono::NaiveDate;
use line_history::{history::ignore_errors, read_from_file};

fn main() {
    read_from_file!("./history.txt", let src, let history);
    let history = ignore_errors(history);

    let result = history
        .search_by_date(&NaiveDate::from_ymd_opt(2024, 12, 20).unwrap())
        .unwrap();

    for chat in result.chats() {
        println!(
            "{}({}): {}",
            chat.sender().unwrap_or_default(),
            chat.time(),
            chat.message_lines().join("\n")
        );
    }
}

About

search for specific content in LINE chat log files saved in .txt format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published