суббота, 5 мая 2012 г.

Твиттер в консоли

Twitter клиент для Linux — twyt

Домашняя страница:
http://andrewprice.me.uk/projects/twyt/
Назначение: Twitter клиент
twyt — API для Python и консольное приложение для постинга в Twitter. Учитывая, что в Twitter размер сообщений не превышает заветные 140 знаков, пользоваться коносльной утилитой достаточно комфортно. Для установки потребуются пакеты python, python-simplejson и python-twyt. Получаем пакет с сайта проекта, распаковываем архив и устанавливаем командой.
# setup.py install
Не смотря на небольшие размеры параметров утилита имеет предостаточно:
$ twyt --commands
 
usage: twyt  COMMAND [options] [args]
 
Available commands:
 accountlimit Show the API rate limit for your Twitter account.
        block Blocks a user specified by ID (numerical ID or screen name)
       delete Deletes a tweet by ID
       direct Sends a direct message to another user
    directdel Delete a direct message which was sent to you
   directsent Prints the 20 last direct messages sent by you
     directtl Prints the 20 last direct messages sent to you
    friendstl Returns 20 most recent statuses in your friends timeline
      iplimit Show the API rate limit for your IP address.
    namecache Access and manipulate the username cache.
     publictl Shows the 20 most recent statuses in Twitter's public timeline
      replies Lists statuses which are replies to you (statuses with @yourusername in them)
         show Show a single status message by ID
         sing Similar to 'tweet', wraps the status in musical notes
        tweet Updates the authenticating user's Twitter status
      unblock Unblocks a user specified by ID (numerical ID or screen name)
         user Get and set Twyt user options, e.g. remembered passwords and Twitter usernames
       usertl Show your timeline, or USERNAME's timeline
 
For command-specific help, use twyt COMMAND --help
Параметр set позволяет сохранить логин и пароль к аккаунту Twitter, что очень удобьно так как не нужно будет их указывать каждый раз (при помощи -u).
$ twyt user –user=grinder set
Enter grinder's Twitter password:
Теперь данные будут сохранены в скрытом файле ~/.twytrc.json в домашнем каталоге.
$ twyt user –user=grinder set
Enter grinder's Twitter password:
Теперь постим:
$ twyt tweet "Привет всем" –u grinder

Комментариев нет:

Отправить комментарий