#!/bin/sh
#we first make sure that D-Bus is launched
eval `/srv/bin/dbus-launch.sh`
#and we set PYTHONPATH
export PYTHONPATH=$PYTHONPATH:/home/goffi/lib
PWD=`pwd`
PROJECT=`basename $PWD`
PROJECT_FULL=$PROJECT #if the full name is not in the following list, we use the basename
case $PROJECT in
bellaciao ) PROJECT_FULL="Bellaciao";;
gcp ) PROJECT_FULL="GCP";;
libervia ) PROJECT_FULL="Libervia";;
lm ) PROJECT_FULL="List Movies";;
sat ) PROJECT_FULL="Salut à Toi";;
sat_media ) PROJECT_FULL="SàT media";;
sat_pubsub ) PROJECT_FULL="SàT PubSub component";;
sat_website ) PROJECT_FULL="SàT WebSite";;
urwid_satext ) PROJECT_FULL="Urwid SàT Extension";;
esac
hg log -r $HG_NODE --template "Commit from {author|person} on $PROJECT_FULL\n{desc}" | /home/goffi/sat_bots/sat/frontends/src/jp/jp -p sabot sat@chat.jabberfr.org
La partie importante étant bien sûr la dernière ligne. jp est l'interface en ligne de commande (je mets le chemin complet), sabot c'est le nom du profil du bot (un compte a été créé avec l'interface en ligne de commande, comme n'importe quel compte, et c'est le profil « sabot »), et l'argument est le jid du salon.
À noter que si tu veux publier sur identi.ca, IRC, ou des saletés propriétaires, il te suffit d'utiliser un transport (comme spectrum).
# La version bérurienne
Posté par Goffi (site web personnel, Mastodon) . En réponse au journal R.I.P CIA.vc , et maintenant quoi?. Évalué à 7.
Moi j'utilise SàT (étonnamment ;) ).
en gros mon /etc/mercurial/hgrc.d/hooks.rc c'est ça:
et mon /srv/bin/hg_sabot_hook.sh c'est ça
La partie importante étant bien sûr la dernière ligne. jp est l'interface en ligne de commande (je mets le chemin complet), sabot c'est le nom du profil du bot (un compte a été créé avec l'interface en ligne de commande, comme n'importe quel compte, et c'est le profil « sabot »), et l'argument est le jid du salon.
À noter que si tu veux publier sur identi.ca, IRC, ou des saletés propriétaires, il te suffit d'utiliser un transport (comme spectrum).