aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-10-27 10:22:29 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-10-27 10:22:29 +0100
commita3224a308305e6728fd5c5af7e6d4e85f003367f (patch)
treef3ecd2bb1aff27029ad328dc7363e59e970b3197 /main.go
parent55ca9eb060fb9e55c33f4ec35f4c6d1e27873d8b (diff)
downloadpiupiu-a3224a308305e6728fd5c5af7e6d4e85f003367f.tar.gz
piupiu-a3224a308305e6728fd5c5af7e6d4e85f003367f.zip
Exclude replies from the fetched tweetsHEADmain
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
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 {