tuitbot_core/config/
defaults.rs1use super::{AuthConfig, IntervalsConfig, LimitsConfig, ScoringConfig, StorageConfig};
7
8impl Default for AuthConfig {
9 fn default() -> Self {
10 Self {
11 mode: "manual".to_string(),
12 callback_host: "127.0.0.1".to_string(),
13 callback_port: 8080,
14 }
15 }
16}
17
18impl Default for ScoringConfig {
19 fn default() -> Self {
20 Self {
21 threshold: 60,
22 keyword_relevance_max: 25.0,
23 follower_count_max: 15.0,
24 recency_max: 10.0,
25 engagement_rate_max: 15.0,
26 reply_count_max: 15.0,
27 content_type_max: 10.0,
28 }
29 }
30}
31
32impl Default for LimitsConfig {
33 fn default() -> Self {
34 Self {
35 max_replies_per_day: 5,
36 max_tweets_per_day: 6,
37 max_threads_per_week: 1,
38 min_action_delay_seconds: 45,
39 max_action_delay_seconds: 180,
40 max_replies_per_author_per_day: 1,
41 banned_phrases: vec![
42 "check out".to_string(),
43 "you should try".to_string(),
44 "I recommend".to_string(),
45 "link in bio".to_string(),
46 ],
47 product_mention_ratio: 0.2,
48 }
49 }
50}
51
52impl Default for IntervalsConfig {
53 fn default() -> Self {
54 Self {
55 mentions_check_seconds: 300,
56 discovery_search_seconds: 900,
57 content_post_window_seconds: 10800,
58 thread_interval_seconds: 604800,
59 }
60 }
61}
62
63impl Default for StorageConfig {
64 fn default() -> Self {
65 Self {
66 db_path: "~/.tuitbot/tuitbot.db".to_string(),
67 retention_days: 90,
68 }
69 }
70}