Code Monkey home page Code Monkey logo

cli2telegram's Introduction

GitHub Streak

GitHub stats

Top Langs

cli2telegram's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar facorazza avatar markusressel avatar sapd avatar voidstarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cli2telegram's Issues

Updater.__init__() got an unexpected keyword argument 'token'

Getting this error message when running this command printf "Message" | cli2telegram -b "123456789:ABCDEFG" -c "123456789" with valid bot token and chat id. System has python 3.10.9 and export PATH=$PATH:$HOME/.local/bin in .bash_profile:

Updater.init() got an unexpected keyword argument 'token'
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/cli2telegram/util.py", line 94, in _try_send_message
updater = Updater(token=bot_token, use_context=True)
TypeError: Updater.init() got an unexpected keyword argument 'token'
Error sending message, retrying in 10.0 seconds...

I've tried editing util.py with valid token and running cli2telegram with updater = Updater("123456789:ABCDEFG") in util.py and I get the following error:
Updater.init() missing 1 required positional argument: 'update_queue'
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/cli2telegram/util.py", line 94, in _try_send_message
updater = Updater("123456789:ABCDEFG")
TypeError: Updater.init() missing 1 required positional argument: 'update_queue'
Error sending message, retrying in 10.0 seconds...

Provide a linux socket

Would be quite cool to be able to just echo some text to a unix file socket to send a message to a telegram chat.

Although it would be possible to add some protocol, which could allow sending messages to arbitrary chat ids, I think this is out of scope for this project.

So a simple:

echo "Hello World!" > /some/path/cli2telegram.sock

should be enough to send a Hello World! message to the configured chat.

For this to work, cli2telegram would need to run as a daemon.

Unable to install on fresh Ubuntu Server 18.04.4 LTS (Bionic Beaver)

Describe the bug
Hi, I'm unable to install cli2telegram package on my freshly installed ubuntu server 18.04.4 lts

To Reproduce
Steps to reproduce the behavior:

  1. install pipe
    sudo apt install python-pip
  2. try to install cli2telegram
    pip install cli2telegram

Expected behavior
should successfully install

Tracelog

pip install cli2telegram
Collecting cli2telegram
  Using cached https://files.pythonhosted.org/packages/93/dd/b2e5d0041b2e7318365b74ee7b4eb0c7ff1ab420e02902748e71010f6cea/cli2telegram-1.0.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-GkD8kJ/cli2telegram/setup.py", line 52
        def readme_type() -> str:
                          ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-GkD8kJ/cli2telegram/

Desktop (please complete the following information):

  • OS: ubuntu server 18.04.4 LTS

Additional context
Python version: 2.7.17

Use apprise to send messages

Is your feature request related to a problem? Please describe.
Currently only telegram is supported, which is pretty limiting.

Describe the solution you'd like
Evaluate the use of apprise as a notification backend.

Note:

  • apprise already provides a cli interface out of the box
  • (afaik) apprise does not have daemon support

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.