tapt
Tweet your ‘apt-get’! Let Twitter keep track of whatever you install in Ubuntu
If you are like me who often likes to test one of the thousand applications available for Ubuntu and like to keep track of whatever you install or remove, here is a script for you. This script, tapt, tweets whatever you install, remove or perform other operations with ‘apt-get’ in Ubuntu to your Tweeter account.
I often install/remove applications and then forget what I installed/removed filling up hard disk with those applications which I am never going to use. Sometimes, I try to keep the track of whatever I installed writing down the name of applications in a plain text file. That is tedious. I then decided to write this script. Not only it keeps the track of whatever you ‘apt’-get but also allows you to perform multiple apt tasks at once unlike ‘apt-get’ such as removing one application, installing two more applications, and autocleaning at the same time with just one command. Let’s get started:
- I suggest you to sign up for a new Twitter account which will be used just to post your apt-get activities. Give a name such as yourRegularTwitterUsername_tapt. Mine is ashokgelal_tapt
- Download this script and make it executable:
$ chmod 755 tapt - Open the script with any text editor and look for the following lines. They are on the top of the file.
username=”yourusername”
password=”yourpassword”
Replace yourusername with your Twitter username and yourpassword with your Twitter password. If you don’t want to save your username and password in a plain text file, you can pass username and password as command line arguments; so you can skip this step. - Copy the file to /usr/bin
$ sudo cp tapt /usr/bin
That’s it! Now you just need to know a couple of options. Here are some examples:
sudo tapt -i rar -m "I got this from quicktweaks.com"This installs rar and tweets the following message to your Twitter account:
I got this from quicktweaks.com. Installed rar.
sudo tapt -i diaPassing your own message is not mandatory. If you want to post some message too, try to limit your message. Twitter allows only upto 140 characters. If the length of the final message (your own message+tapt installation message) totals to more than 140 characters, it won’t tweet your message, and won’t install/ remove anything.
sudo tapt -r rar
This removes rar and tweets the following message:
Removed rar.
sudo tapt -i rar -r diaThis installs rar, removes dia and then tweets installation and removal message.
sudo tapt -r dia -u username -p passwordYou can pass username and password if you don’t like to save your password on tapt file of if you wan’t to tweet to a different account.
sudo tapt -hDisplays tapt usage
sudo tapt -oDisplays a full list of available options
I will continuously update the script some keep coming back. Comments and suggestions on tapt are always welcome. If you have any better ideas on its improvement, let me know.
Promote it:
jshs Says:
great idea! now any script kiddy can watch for you to install a known broken app and root your box automatically.
why don’t you just check your bash history?
Posted on October 6th, 2008 at 3:20 pm
Shantanu Goel Says:
@jshs:
You could always keep your tweets “private”..
Posted on October 7th, 2008 at 12:33 am
cippa Says:
Hey,
nice idea! a mashup with bash and twitter.
Nice code !
Posted on October 7th, 2008 at 9:30 am
ashokgelal Says:
@jshs:Go to Settings, Check the box for Protect my updates. That’s it! No one is going to see your updates. It’s tedious to go through all the history log.
Posted on October 7th, 2008 at 10:07 am
Apt-get e Twitter insieme alla conquista della blogosfera Says:
[...] Un diabolico e geniale blogger ha ben pensato di unire il potere della super mucca con quello del canarino. [...]
Posted on October 8th, 2008 at 6:55 am
Chris McQ. Says:
Man that is a brilliant idea. As a Sys Admin, handing windows & solaris servers on a daily basis – but sharing the responsibility with multiple people, it would beautiful to have something like this in place. Not likely to happen anytime soon for the work environment. However, you just saved me a butt-load of time to help incorporate more of a change log with my home ‘buntu system.
Thank you! Thank you! THANK YOU!!!
Posted on October 24th, 2008 at 10:52 am
links for 2008-11-03 | it's about time Says:
[...] Tweet your 'apt-get'! Let Twitter keep the track of whatever you install in Ubuntu | Quick… If you are like me who often likes to test one of the thousand applications available for Ubuntu and like to keep track of whatever you install or remove, here is a script for you. This script, tapt, tweets whatever you install, remove or perform other operations with ‘apt-get’ in Ubuntu to your Tweeter account. (tags: twitter tips apt linux) [...]
Posted on November 3rd, 2008 at 4:03 am
Matt Says:
Wow – this is awesome. Especially as a new Ubuntu user who is constantly breaking things and needing to fix, I have been trying to use synaptic package manager even though tutorials everywhere use apt-get, because it’s easy to track your history. BUT, I don’t use twitter and want to avoid both having one more online account whose password I won’t remember as well as the added, if small, system load of broadcasting online.
Looking at the script, it doesn’t seem too had to change it to output to a local text file, but I’m too much of a newbie to figure it out. Any pointers?
Thanks!
Posted on January 4th, 2009 at 2:07 am
christopher law DOT com » Blog Archive » Keep track of your apt-get’s with tapt Says:
[...] “replace” the apt-get and automatically twitter your installed apps. It’s called TAPT. I started playing with it a year or so ago, just so I wouldn’t have to tell people which [...]
Posted on November 9th, 2009 at 6:15 pm