For the most cases you should execute the code line by line. The comments (lines starting with a #) are mostly things to fill in a file, you edit with an editor (vi) or terminal output. Sometimes you have to be careful, which lines are just output or additional info and which are commands.
sudo apt-get install python python-dateutil python-argparse
sudo wget https://github.com/tgalal/yowsup/archive/master.zip
sudo unzip master.zip
cd yowsup-master/src
cp config.example yowsup-cli.config
vi yowsup-cli.config
These lines for example are simple commands that install needed packages and open a config file to edit.
After editing, executing
chmod +x yowsup-cli
makes the file executable and the following command requests an authorisation code:
./yowsup-cli --requestcode sms --config yowsup-cli.config
After receiving the code via SMS, you can retrieve another code to identify with Whatsapp:
./yowsup-cli --register 123-456 --config yowsup-cli.config
(replace 123-456 with the code)
After that
cat yowsup-cli.config
displays the config file, where (I guess) something like
cc=34
phone=34123456789
id=
password=S1nBGCvZhb6TBQrbm2sQCfSLkXM=
is standing.
After that you can install the Whatsapp Plugin for Pidgin using
sudo add-apt-repository ppa:whatsapp-purple/ppa
sudo apt-get update
sudo apt-get install pidgin-whatsapp
and login with your phone number and the authorisation code/password (In the example S1nBGCvZhb6TBQrbm2sQCfSLkXM=
).