Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenorb-contrib/tg
`telegram-cli` for Telegram IM
https://github.com/kenorb-contrib/tg
cli linux-shell telegram telegram-api
Last synced: 3 months ago
JSON representation
`telegram-cli` for Telegram IM
- Host: GitHub
- URL: https://github.com/kenorb-contrib/tg
- Owner: kenorb-contrib
- License: gpl-2.0
- Fork: true (vysheng/tg)
- Created: 2019-02-02T15:11:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-26T13:48:00.000Z (over 2 years ago)
- Last Synced: 2024-04-10T01:16:44.798Z (7 months ago)
- Topics: cli, linux-shell, telegram, telegram-api
- Language: C
- Homepage: https://github.com/telegramdesktop/tdesktop
- Size: 3.12 MB
- Stars: 380
- Watchers: 17
- Forks: 53
- Open Issues: 46
-
Metadata Files:
- Readme: README-Cygwin.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
### Installation on Windows
To use telegram-cli in Windows, you should compile with Cygwin which has POSIX API functionality.Install [Cygwin](https://www.cygwin.com/).
In Cygwin Terminal, install cygwin's package manager, apt-cyg, as per apt-cyg's [project page](https://github.com/transcode-open/apt-cyg):
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
Then install compiler and tools: if you're on the **32-bit** version of cygwin,apt-cyg install gcc-core gcc-g++ gcc-core gcc-g++ make wget patch diffutils grep tar gzip autoconf automake libtool git zlib-devel
Whereas on the **64-bit** version,apt-cyg install cygwin32-gcc-core cygwin32-gcc-g++ gcc-core gcc-g++ make wget patch diffutils grep tar gzip zlib-devel
You need libraries *readline*, *openssl*, *libconfig*, *liblua*, *python* and *libjansson* to use telegram-cli's full functionality.
Clone this project's GitHub Repository in Cygwin Terminal
git clone --recursive https://github.com/vysheng/tg.git
Then type:
apt-cyg install libevent-devel openssl-devel libreadline-devel lua-devel python3
(Install package 'python' to use Python 2.7, or install package 'python3' to use Python 3)
libconfig and libjansson are not included in the cygwin package, so you should compile them yourself.
Compile libconfig:
wget https://github.com/hyperrealm/libconfig/archive/v1.7.2.tar.gz
mv v1.7.2.tar.gz libconfig-1.7.2.tar.gz
tar xvf libconfig-1.7.2.tar.gz && cd libconfig-1.7.2
autoreconf
./configure
make && make install && cd ..Compile libjansson:
wget http://www.digip.org/jansson/releases/jansson-2.7.tar.gz
tar xvf jansson-2.7.tar.gz && cd jansson-2.7
./configure
make && make install && cd ..Then, change to the tg directory and generate the Makefile.
cd tg
./configureIn case `configure` fails, it might be because of the CRLF line endings, so:
dos2unix -f configure
And again,
./configure
We need to patch the Makefile and loop.c to compile properly in cygwin. The patch is included, so just type:
patch -p1 < telegram-cli-cygwin.patch
Then,
make
Once the compilation is complete, **telegram-cli.exe** will be found in the **bin** subdirectory.
To run `telegram-cli`, type
bin/telegram-cli -k tg-server.pub**Caution**: A binary compiled with Cygwin should be run in Cygwin Terminal.