vysheng / tg

telegram-cli
GNU General Public License v2.0
6.51k stars 1.54k forks source link

Sending a cardid over message #1249

Open tuxevil opened 8 years ago

tuxevil commented 8 years ago

Hi all, im using a Raspberry Pi to do access control, reading RFID and opening a relay, now I would like to send via telegram the card ID to a telegram bot or user.

Anyone can give me a clue where to start? i tried to import tgl on python but it doesnt works, i tried to open my python code from telegram-cli and neither works.

Thanks for your help

LukeLR commented 8 years ago

Hi, see https://github.com/vysheng/tg/blob/master/tg-test.py for a demo python script and https://github.com/vysheng/tg/wiki/Telegram-CLI-Arguments on how to invoke telegram-cli in order to execute the python script. The python script provides hooks for events like message-receive and so on, and provides methods for sending message. Just code your bot into that :)

Am 29.11.2016 um 15:44 schrieb tuxevil:

Hi all, im using a Raspberry Pi to do access control, reading RFID and opening a relay, now I would like to send via telegram the card ID to a telegram bot or user.

Anyone can give me a clue where to start? i tried to import tgl on python but it doesnt works, i tried to open my python code from telegram-cli and neither works.

Thanks for your help

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vysheng/tg/issues/1249, or mute the thread https://github.com/notifications/unsubscribe-auth/ADB7G5BYaNgSkRao5cZpRQZSJ_oKhpyGks5rDDpNgaJpZM4K_DOR.

tuxevil commented 8 years ago

Hi @LukeLR it seems argument -Z for execute python script isnt supported anymore, telegram-cli keep telling me 'Z' is an invalid option, and in the argument list of the program, it doesnt show it, any idea?

tuxevil commented 8 years ago

I was checking my config files and it seems python support is disabled, how can i enable it?

LukeLR commented 8 years ago

Did you clone the latest version from GitHub? There is a new, closed source fork of telegram-cli, see https://valtman.name/telegram-cli, it's probably sporting other command line arguments.

Am 29.11.2016 um 19:09 schrieb tuxevil:

Hi @LukeLR https://github.com/LukeLR it seems argument -Z for execute python script isnt supported anymore, telegram-cli keep telling me 'Z' is an invalid option, and in the argument list of the program, it doesnt show it, any idea?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vysheng/tg/issues/1249#issuecomment-263650178, or mute the thread https://github.com/notifications/unsubscribe-auth/ADB7G4PbryptVDOOuTF7Vmdj9PFLIm2Jks5rDGpVgaJpZM4K_DOR.

tuxevil commented 8 years ago

hey @LukeLR thanks for replying

i just cloned the version you shared, from bitbucket.org/vysheng but now i dont know how to compile it or to execute the binary

im sorry for being too noob for this, but can you explain me a little bit at least how to proceed?

LukeLR commented 8 years ago

AFAIK you can't compile it, since the underlying library is closed source. There is a support supergroup for telegram cli on telegram, where the details of running those current versions were discussed, as well as binary versions have been posted. I'll ask vysheng to post the invite link on GitHub again, since the old one has gotten invalid.

LukeLR commented 8 years ago

I guess you'd probably be best off by getting one of the binary versions at https://valtman.name/telegram-cli.

LukeLR commented 8 years ago

Just read #1241