7 ms·
T – a command-line power tool for Twitter
- turnersd 12y agoBeen using this for a while in a cron job to automate archiving tweets for various topics I'm interested in https://github.com/stephenturner/twitterchive https://github.com/stephenturner/twitterchive
- malvosenior 12y agoFavorite T hack: t followers --sort=since > followers.log Keep followers.log checked into Git and track your followers/unfollowers over time.
- misiti3780 12y agothat is a really great idea
- malvosenior 12y agoThanks!
- ahmett 12y agoI have the following project for this. https://github.com/ahmetalpbalkan/goodbye https://github.com/ahmetalpbalkan/goodbye It can DM you when someone unfollows you. But you need to host it somewhere.
- zem 12y agotempting, but i feel that tracking who unfollows me would only annoy me for no good reason.
- chimeracoder 12y agoNo need to use git, since you can just use diff(1) to find the unfollowers between any two dates. I've been doing this for a while with a Go program I created[0]. Unfortunately, people who change their Twitter handles (which I found surprisingly common) show up as false positives - you either need to filter these out manually or match against the user id[1]. [0] https://github.com/ChimeraCoder/twitter-follower-logger https://github.com/ChimeraCoder/twitter-follower-logger [1] Adding that as a separate field and then calling `cut -f2` would be a quick hack, now that I think about it.
- gknoy 12y agoTrue, but git comes with many tools (e.g. gitk) that make it really easy to the diffs-over-time of a repo.
- ryanseys 12y agoI made a thing yesterday to do just that. :) https://github.com/ryanseys/twidiff https://github.com/ryanseys/twidiff
- D4AHNGM 12y agoThat's a nice simple little script. Thanks for sharing!
- _delirium 12y agoThis is another one I've used, with a somewhat different set of functionality: http://www.floodgap.com/software/ttytter/ http://www.floodgap.com/software/ttytter/
- privong 12y agoI really liked ttytter. I got to where I preferred it over any graphical clients – the information density was so much higher in the console. Sadly it has not been updated in a while (and I have since left twitter).
- rsync 12y agoI just skimmed and re-skimmed the usage examples on the page, and I see no option to actually tweet something. I assume this has to do with the third party limit ?
- Sir_Cmpwn 12y agot update "I'm tweeting from the command line. Isn't that special?"
- deleted 12y ago[deleted]
- LeoPanthera 12y agoAre there any command line twitter clients that allow the posting of images? ttytter can't do it, and it seems this "t" can't either.
- glimcat 12y agoWell here's the essential bits in Python. I leave turning this into an actual CLI as an exercise for the interested reader. from requests_oauthlib import OAuth1Session import json keys = json.loads(open(keyfile).read()) # {"TWITTER_CONSUMER_KEY": "blah_blah_blah", # "TWITTER_CONSUMER_SECRET": "blah_blah_blah", # "TWITTER_ACCESS_TOKEN": "blah_blah_blah", # "TWITTER_ACCESS_TOKEN_SECRET": "blah_blah_blah",} def twitter(): return OAuth1Session(keys['TWITTER_CONSUMER_KEY'], client_secret=keys['TWITTER_CONSUMER_SECRET'], resource_owner_key=keys['TWITTER_ACCESS_TOKEN'], resource_owner_secret=keys['TWITTER_ACCESS_TOKEN_SECRET']) def tweet(status, reply_to=None): endpoint = 'https://api.twitter.com/1.1/statuses/update.json' data = {'status': status} r = twitter().post(endpoint, data=data) return r.status_code def tweet_with_image(status, imgfile, reply_to=None): endpoint = 'https://api.twitter.com/1.1/statuses/update_with_media.json' data = {'status': status} if reply_to is not None: data.update({'in_reply_to_status_id': reply_to}) r = twitter().post(endpoint, data=data, files={'media[]': open(imgfile, 'rb').read()}) return r.status_code
- hayksaakian 12y agoActually you can, see: https://github.com/sferik/t/blob/7f1fcac61047dcb703e9519c837f7134fd7a7f57/lib/t/cli.rb#L843 https://github.com/sferik/t/blob/7f1fcac61047dcb703e9519c837... this is because the OP's own twitter ruby gem can do that, this CLI app is basically a front end for the ruby gem client.update_with_media("I'm tweeting with @gem!", File.new("/path/to/media.png")) https://github.com/sferik/twitter/blob/48efb642beaa19355a4c1ba04a9fadac54cfba42/examples/Update.md#L40 https://github.com/sferik/twitter/blob/48efb642beaa19355a4c1...
- soapdog 12y agoVery cool tool. Does anyone know of a similar one for Facebook?
- pdenya 12y agoThere's a privacy option to disable 3rd party app access (FB apps used by other people) to personal info so nothing as full featured is possible.
- soapdog 12y agothanks for the reply. I am not looking for all those features. I just want to update status from the command line this way I can use them in my static generator workflow ;-)
- sefk 12y agoI cross-post tweets to FB with this app: https://apps.facebook.com/twitter/ https://apps.facebook.com/twitter/. I wish it had a way not cross-post everything, i.e. with a #nofb tag, but my volume isn't high enough that that's a concern.
- jcurbo 12y agoThere used to be a nice FB app called Selective Tweets that let you append #fb to tweets you wanted to show up on Facebook, but it doesn't seem to work anymore and seems un-maintained.
- yeldarb 12y agoI don't know of a generic tool that does this but you could create one in a couple of minutes in your scripting language of choice. Go here and generate yourself a token for your account: https://developers.facebook.com/tools/explorer https://developers.facebook.com/tools/explorer Then do the equivalent of curl -X POST -d "message='Your status message goes here.'" https://graph.facebook.com/me/feed?access_token=YOUR_TOKEN_HERE
- 12y ago
- jhallenworld 12y agoAt WPI, in 1989, we had 's'- a command line tool (written in ksh!) to send a message to someone or to your friends logged in. You had a .friends file and a .enemies file (to blacklist people from contacting you). We also had "superwho" which gave a graphical map (vt220 graphics) of where everyone was. Now 25 years later we finally have 'T'! Progress..
- m0nastic 12y agoBy 1998 (when I was there), I don't remember ever seeing anything like that (we used normal Unix 'talk' to communicate with people logged into the Digital Unix servers). Go Engineers!
- jhallenworld 12y agoThere was a burst of hacking because of the final transition to UNIX. I was privileged to experience the much more diverse before time: A DECSYSTEM-20 was the main campus computer (it used a Z-80/S100 bus custom terminal multiplexer), the OS course involved writing an OS in PDP-11/23 assembly language, you could write your documents using the Wang word processing computer, of course there were VAXen and there was even an IBM mainframe. There were some UNIX machines (3B2s..), but everything changed when the DEC-20 was replaced with an Encore Multimax and Decstation-2100s (I remember "xtank" was a popular multiplayer game on them). I could see the vestiges of the previous burst of hacking in the DEC-20's student written software library. The popularity of the messaging programs should have been a big hint to us..
- cbd1984 12y ago> a Z-80/S100 bus What used to be the heart of a microcomputer. A Serious Business Micro, that is, not a glorified game system like a Commodore-64. > xtank There's documentation of a work to port it to modern systems: http://documentation.wikia.com/wiki/Xtank http://documentation.wikia.com/wiki/Xtank Also something on Freecode: http://freecode.com/projects/xtank http://freecode.com/projects/xtank
- spullara 12y ago
- deleted 12y ago[deleted]
- lnanek2 12y agoUsually this would be banned because it acts as a Twitter client and doesn't show the ads. In this case you have to sign up for your own app ID, though, so it will just be banned piece by piece as the Twitter API enforcement bots catch each instance. I had a lot of apps seemingly auto-killed by Twitter, games that used to use the API to let you Tweet scores easily, mostly, so expect this app will be similarly classified.
- ihuman 12y agoI thought the API didn't have ads? That is why all 3rd party clients are twitter ad-free.
- sp332 12y agoThere are other rules this is breaking. https://dev.twitter.com/overview/terms/rules-of-the-road https://dev.twitter.com/overview/terms/rules-of-the-road You must: 4. not arrange for your Service to be pre-installed on any device, promoted as a “zero-rated” service, or marketed as part of a specialized data plan. 5. not frame or otherwise reproduce significant portions of the Twitter service. You should display Twitter Content from the Twitter API.
- hrrsn 12y ago4. Where is this preinstalled anywhere? 5. This isn't a full blown Twitter client, just a CLI interface. There's a difference.
- sp332 12y agoWhoops, got the wrong numbers. (The numbers don't copy-and-paste with the text). I meant: 5. display a prominent link or button in your Service that directs new users to Twitter’s sign-up functionality.
- danso 12y agoOne of my favorite tools...in fact, I'd argue that T is what got me to finally understand why, as a programmer, I should still care about CLI (sferik maintains both T and the excellent Ruby twitter client gem, which powers T)...Studying the T code has also helped me understand the principles of a good CLI system...all around, a well-maintained and fun project. Using the `--csv` flag and a command-line tool like csvkit, you can make all sorts of utilities. Here's how to unfollow everyone who doesn't follow you: t leaders --csv | csvcut -c 9 | xargs t unfollow Unfollowing everyone who hasn't tweeted since the first half of 2013: t followings --csv | csvgrep -c 3 -r '2013-0[1-6]' | csvcut -c 9 | xargs t unfollow Note: I haven't run these in awhile so the field order may have changed...
- rdc12 12y agoLooking at some of the examples the csv part is unneeded in the first example. t leaders | xargs t unfollow #will work
- danso 12y agoOops, you're right. That was a vestigial step for when I was filtering the list by some standard (e.g. less/greater than certain number of followers) and then unfollowing.
- dpeck 12y agobetter to use --long instead of --csv, the latter preserves newlines that can lead to problems with piping and xargs.
- eps 12y agoDoes anyone else remember micq, a command line ICQ client? It was such a beaut.
- jcurbo 12y agoIndeed! I used micq for several years back in the late 90's.
- aftbit 12y agoAnyone have a zsh completion file for t?
- rdc12 12y agohttps://github.com/sferik/t/blob/master/etc/t-completion.zsh https://github.com/sferik/t/blob/master/etc/t-completion.zsh
- D4AHNGM 12y agoThis is neat. I had no idea it existed. Forever in love with the power & simplicity of Ruby.
- srcmap 12y agoCool, this will makes it easier to script IOT device to use Twitter as messaging service.
- mmmmax 12y agoI once did a design for this idea. Here! https://www.dropbox.com/s/r2v6nq69jk9rw6s/birdcatcher.png?dl=0 https://www.dropbox.com/s/r2v6nq69jk9rw6s/birdcatcher.png?dl...
- gulbrandr 12y agoI don't understand why someone would think that "T" is good name for something like this.
- deleted 12y ago[deleted]
- Argorak 12y agoSadly, got (a go clone of T by the same author) isn't far along: https://github.com/sferik/got https://github.com/sferik/got