KELA Presentacion Costa Rica 2024 - evento Protégeles
Twixer
1. $> twixer
Cliente de servicios de microblogging
para la línea de comandos
Antonio Ognio
antonio@ognio.com
2. ¿Qué es microblogging?
Servicios como Twitter e Identi.ca (opensource)
Publicar fragmentos cortos de texto en Internet
Experiencia de Internet en “tiempo real”
Manera rápida de compartir:
Noticias
Opiniones, pensamientos, sentimientos
Enlaces
Una forma de recibir:
Feedback
Sugerencias
Interacturar con usuarios
3. Arquitectura
Sitios web
Interfaz web (por omisión)
API de webservice (RESTful)
Ecosistema
Servicios complementarios
Clientes hechos a medida
4. ¿Quiénes usan el microblogging?
Bloggers
Geeks / tecnófilos
Periodistas
Algunas personalidades
Consultores / autores de libros
Líderes de opinión
Algunos sitios web (robots)
Hackers de FLOSS
5. ¿Porqué el CLI?
Entorno natural de un programador /
administrador de sistemas FLOSS
Más rápido de lanzar que un cliente gráfico o un
browser
Integración con otras herramientas de la línea
de comandos
Más simple de implementar y mantener que un
programa visual (al menos en GNU/Linux)
6.
7. ...además
Un cliente CLI es mas discreto :)
Envío mi mensaje y no me quedo leyendo :)
Más fácil de integrar a scripts
Lo puedo tener instalado en un servidor
8. Twixer
Escrito en Python
483 líneas por el momento
Depende de simplejson y tweethon
Permite:
Enviar tweets
Enviar mensajes directos
Seguir a otros usuarios
Dejar de seguir a otros usuarios
Leer el timeline principal (amigos)
otras cosas mas...
11. Acciones comunes:
Enviar un mensaje público
twixer "El contenido del mensaje viene aqui"
Enviar un mensaje privado
twixer -d usuario "Contenido del mensaje directo"
Mirar el timeline
twixer -f
Mirar las respuestas
twixer -r
12. Parámetros
Usage: twixer [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-c CONFPATH, --config=CONFPATH
Path to configuration file
-v VERBOSE, --verbose=VERBOSE
-U USERNAME, --username=USERNAME
Username for your Twitter account
-P PASSWORD, --password=PASSWORD
Password for your Twitter account
-S SERVER, --server=SERVER
API server for microblogging service
-u USERNAME, --query-user=USERNAME
Query USERNAME instead of your user
-t, --timeline Show timeline of user
-d USERNAME, --direct=USERNAME
Send direct message to user
-f, --friends Show friends timeline
-r, --replies Show replies
-R, --direct-replies Show direct messages or replies
-p, --public Show public timeline
-a USERNAME, --follow=USERNAME
Follow user
-s USERNAME, --stop-following=USERNAME
Stop following user
-D ID, --delete-status=ID
Delete status by id
-X ID, --delete-direct-message=ID
Delete direct message by id
-l, --list-friends Show list of friends
-F, --list-followers Show list of followers
13. Instalación desde tarball
sudo easy_install simplejson tweethon
wget -c http://twixer.googlecode.com/files/twixer-0.1.2b.tar.gz
tar zxpf twixer-0.1.2b.tar.gz
cd twixer-0.1.2b
sudo cp twixer /usr/bin
cp twixerrc $HOME/.twixerrc
vi $HOME/.twixerrc
chmod 600 $HOME/.twixerrc
twixer -
Obtener fuente desde Subversion
svn checkout http://twixer.googlecode.com/svn/trunk/ twixer
14. Tip (mensaje muy largo)
gnrfan@gnrfan-laptop:~$ twixer "Digg's move to NoSQL: This growth has
forced them into horizontal and vertical partitioning strategies..."
twixer "...that have eliminated most of the value of a relational
database, while still incurring all the overhead."
Status 24785310 successfully posted at Mon Mar 15 03:00:22 +0000 2010
Status 24785312 successfully posted at Mon Mar 15 03:00:23 +0000 2010
Seguir a un usuario
$ twixer --follow plugperu
16. Un vistazo al código fuente
http://code.google.com/p/twixer/source/browse/trunk/twixer
17. To-do
Ofrecer generar el archivo de configuración
Contraseña cifrada (cuidado, falsa seguridad)
Verificar permisos del archivo de configuración
Mejor manejo de excepciones
Soportar unicode en cuerpo de mensajes
Soportar múltiples cuentas con facilidad
Algo parecido a .ssh/config
Mejoras en los parámetros
Soportar nuevas características de API
Modo interactivo
Colores
Un montón de cosas más