From a3224a308305e6728fd5c5af7e6d4e85f003367f Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 27 Oct 2026 10:22:29 +0100 Subject: Exclude replies from the fetched tweets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 847508d..bde7606 100644 --- a/main.go +++ b/main.go @@ -129,6 +129,7 @@ func fetch(id, token string) ([]Tweet, error) { startTime := time.Now().UTC().Add(-24 * time.Hour).Format(time.RFC3339) q.Set("start_time", startTime) q.Set("tweet.fields", "created_at,text") + q.Set("exclude", "replies") u.RawQuery = q.Encode() req, err := http.NewRequest("GET", u.String(), nil) @@ -168,8 +169,8 @@ func main() { output := flag.String("o", ".", "Directory where RSS files will be dropped") flag.Parse() - // This, of course, cursed in unholy ways, as path sanitization shenanigans - // have proved since the existence of the concept of a path in operating + // This is cursed in unholy ways, as path sanitization shenanigans have + // proved since the existence of the concept of a path in operating // systems. That being said, I'm the sole user of this, so whatever... if *output != "." { if err := os.MkdirAll(*output, 0755); err != nil { -- cgit v1.2.3