package rules // GetDefaultRulesConfig returns the default rules configuration func GetDefaultRulesConfig() *RuleConfig { return &RuleConfig{ Rules: []Rule{ // Rule 1: Social networks (excluding YouTube) - skip archiving (empty archivers) &OrRule{ Rules: []Rule{ &HostnameRule{Hostname: "twitter.com"}, &HostnameRule{Hostname: "x.com"}, &HostnameRule{Hostname: "facebook.com"}, &HostnameRule{Hostname: "instagram.com"}, &HostnameRule{Hostname: "linkedin.com"}, &HostnameRule{Hostname: "reddit.com"}, &HostnameRule{Hostname: "tiktok.com"}, &HostnameRule{Hostname: "pinterest.com"}, &HostnameRule{Hostname: "snapchat.com"}, &HostnameRule{Hostname: "discord.com"}, &HostnameRule{Hostname: "discord.gg"}, }, Archivers: []ArchiverConfig{}, // Empty extractors = skip archiving }, // Rule 2: YouTube videos -> yt-dlp (downloads video, thumbnail, subtitles) &OrRule{ Rules: []Rule{ &HostnameRule{Hostname: "youtube.com"}, &HostnameRule{Hostname: "youtu.be"}, }, Archivers: []ArchiverConfig{ {Key: "yt_dlp"}, }, }, // Rule 3: application/* OR image/* OR text/markdown mimetypes -> direct_download &OrRule{ Rules: []Rule{ &MimetypeRule{Mimetype: "application/*"}, &MimetypeRule{Mimetype: "image/*"}, &MimetypeRule{Mimetype: "text/markdown"}, }, Archivers: []ArchiverConfig{ {Key: "direct_download"}, }, }, // Rule 4: text/html mimetype -> obelisk and thumbnail &MimetypeRule{ Mimetype: "text/html", Archivers: []ArchiverConfig{ {Key: "obelisk"}, {Key: "thumbnail"}, }, }, }, DefaultArchivers: []ArchiverConfig{ {Key: "obelisk"}, {Key: "thumbnail"}, }, } }