Ask HN: How would you improve this bash oneliner for deleting tweets?
3 by jamiehall | 1 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://jamiehall.cc/2020/03/10/delete-all-your-tweets-with-... 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!
Middlesbrough
TV aerials Middlesbrough primarily operate throughout the North of England with occasional involvement in the other UK and European projects. TV aerials Middlesbrough offer a wide range of services, all related to the reception and distribution of Satellite and Terrestrial transmissions for both commercial and domestic applications. Councils, Housing Associations, Hospital Trusts and like organisations.
Today's Trending Video in Middlesbrough
Middlesbrough News Featured post
Kim Jong-un: fragile and under pressure but he won’t give up
The Observer The North Korean leader’s surprise freeze of his nuclear programme is less a genuine move than a diplomatic manoeuvre,...
![](https://i.guim.co.uk/img/media/04bc59952a618964fe55719ccfcfbc2a70cd3ca5/0_95_2800_1681/master/2800.jpg?w=300&q=55&auto=format&usm=12&fit=max&s=479e982a77f1b3a681cfa6dfa2913903)
BBC News - Home
Best Video In Middlesbrough
The Guardian
Best Middlesbrough Videos
Wednesday, 25 March 2020
New top story on Hacker News: Ask HN: How would you improve this bash oneliner for deleting tweets?
Labels:
Hacker News,
Middlesbrough
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment