Ask HN: How would you improve this bash oneliner for deleting tweets?
9 by jamiehall | 2 comments on Hacker News.
Many people use tweet deletion services, which periodically remove everything from their Twitter timeline; I wondered if it could be done from a Bash command line. I wrote up my experiences as an explainer for nontechnical people: https://ift.tt/2y1gdzB... TL;DR, here is the oneliner I've been using: $ twurl "/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200 &max_id=$( twurl '/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&include_rts=1' | jq -c -r '.[] | .id_str' | head -10 | tail -1) &include_rts=1" | jq -c -r '.[] | .id_str' | parallel -j 10 -a - twurl -X POST /1.1/statuses/destroy/{1}.json > /dev/null [Edit: I've put line breaks in there to make it more legible.] I'm curious if it's possible to do better. In particular: could this be more elegant? Is it possible to do it using common built-ins, instead of twurl and jq? Any suggestions or improvements would be very welcome!
Sezuleir's blog . Written by Sezuleir ...email: sameerparazulee73@gmail.com If any thing about the blog . Please comment in the comment box .
Subscribe to:
Post Comments (Atom)
New top story on Hacker News: Deepnote (YC S19) Is Hiring (SF, Europe, Prague)
Deepnote (YC S19) Is Hiring (SF, Europe, Prague) 1 by Equiet | 0 comments on Hacker News.
-
Postage Stamps from Bhutan That Double as Playable Vinyl Records (2015) 3 by howard941 | 0 comments on Hacker News.
-
New top story on Hacker News: Uber Drivers discuss giving 1-star ratings to passengers who don't tipUber Drivers discuss giving 1-star ratings to passengers who don't tip 6 by stevenjohns | 0 comments on Hacker News.
No comments:
Post a Comment