#!/bin/bash if [ -f ~/.notame.api ]; then CLAVEAPI=$(cat ~/.notame.api) else USUARIO=$(kdialog --title "Configurando tu cuenta de Nótame.net" --inputbox "Introduce tu usuario") PASS=$(kdialog --title "Configurando tu cuenta de Nótame.net" --password "Introduce tu clave API") echo "user="$USUARIO"&key="$PASS > ~/.notame.api CLAVEAPI=$(cat ~/.notame.api) fi TEXTO=$(kdialog --title "Envía un nuevo mensaje a Nótame.net" --inputbox "¿Qué estás haciendo?") if [ -n "$TEXTO" ]; then wget "http://meneame.net/api/newpost.php?$CLAVEAPI&text=$TEXTO" &> /dev/null fi