Giter Club home page Giter Club logo

matrixcli's People

Contributors

dailythenoob avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

matrixcli's Issues

matrixcli requires config file even if all parameters are specified on command line

It appears that even though all required parameters can be specified on the command line, matrixcli still requires them to be in a config file:

$ ./matrixcli --server someserver --username theuser --password sekrit send -r roomid message
WARNING: config file does not exist
Traceback (most recent call last):
  File "./matrixcli", line 128, in config_vs_options
    server = config.accounts[0]["server"]
AttributeError: module 'config.py' has no attribute 'accounts'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./matrixcli", line 356, in <module>
    server, username, password = config_vs_options()
  File "./matrixcli", line 177, in config_vs_options
    return args_server, args_username, args_password
NameError: name 'args_server' is not defined

If I put all the same information (server, user, password) in a config file, then it works.

server url not normalized

i've added a trailing slash to the server url in config.py

$ grep server .config/matrixcli/config.py 
accounts=[{ "server":"https://chat.privacytools.io/",

any operation then fails with:

matrix_client.errors.MatrixRequestError: 404: 
<html>
  <head><title>404 - No Such Resource</title></head>
  <body>
    <h1>No Such Resource</h1>
    <p>No such child resource.</p>
  </body>
</html>

Please handle the trailing slash properly or reject the url with an useful error message.

Matrixcli logs in as a new device every time it is used

Hi, I am using matrixcli to log in and check my unread messages, and it mostly just works great. However every time it checks my unreads (once every 3 minutes) it logs in as a new device, meaning I now find myself with tens of thousand of devices on my account, which is a big problem because it makes managing logins practically impossible. Is there any way to solve this

Can't log in

While using matrix.org server for log in I got this error

logging in ....
Traceback (most recent call last):
  File "/usr/local/bin/matrixcli", line 4, in <module>
    __import__('pkg_resources').run_script('matrixcli==0.1', 'matrixcli')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1455, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python3.9/dist-packages/matrixcli-0.1-py3.9.egg/EGG-INFO/scripts/matrixcli", line 364, in <module>
  File "/usr/local/lib/python3.9/dist-packages/matrix_client-0.4.0.dev0-py3.9.egg/matrix_client/client.py", line 297, in login
  File "/usr/local/lib/python3.9/dist-packages/matrix_client-0.4.0.dev0-py3.9.egg/matrix_client/client.py", line 588, in _sync
KeyError: 'presence'

Does ignore_rooms actually affect listen?

The README suggests that ignore_rooms should be filtered from matrixcli listen output, but they don't seem to be, although they are filtered from matrixcli unread.

/etc/matrixcli/config.py shouldn't be world-readable

host ~ # find /etc/matrixcli -ls
 49284276      4 drwxr-xr-x   2 root     root         4096 Sep 30 15:20 /etc/matrixcli
 49284482      4 -rw-r--r--   1 root     root          927 Sep 30 15:20 /etc/matrixcli/config.py

Either /etc/matrixcli/config.py should default to 600, or /etc/matrixcli should default to 700. Currently, it's very likely that a user might put a password into config.py, which is then world-readable for all users on the system.

Note that Python will create a subfolder __pycache__ with a cached version of config.py in it; the cached version will copy the permissions of config.py. So if you want to secure your installation, you need to change the permissions on both:

chmod 600 /etc/matrixcli/config.py
chmod 600 /etc/matrixcli/__pycache__/config.*.pyc

Cannot install on Big Sur 11.3

Cannot install because of read-only filesystem. How about local-only installation that will not require root privileges?
Installation logs:

Password:
running install
running bdist_egg
running egg_info
writing matrixcli.egg-info/PKG-INFO
writing dependency_links to matrixcli.egg-info/dependency_links.txt
writing top-level names to matrixcli.egg-info/top_level.txt
reading manifest file 'matrixcli.egg-info/SOURCES.txt'
writing manifest file 'matrixcli.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-11-arm64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

installing package data to build/bdist.macosx-11-arm64/egg
running install_data
creating /etc/matrixcli
copying config.py -> /etc/matrixcli
creating /lib
error: could not create '/lib': Read-only file system

git clone --recurse-submodules https://git.saadnpq.com/saad/matrixcli error

fred@fred-vm:~/GO$ git clone --recurse-submodules https://git.saadnpq.com/saad/matrixcli
Clonage dans 'matrixcli'...
fatal: unable to access 'https://git.saadnpq.com/saad/matrixcli/': Failed to connect to git.saadnpq.com port 443: Connexion refusée
fred@fred-vm:~/GO$ ls
fred@fred-vm:~/GO$ ls
fred@fred-vm:~/GO$ git clone --recurse-submodules https://github.com/saadnpq/matrixcli
Clonage dans 'matrixcli'...
remote: Enumerating objects: 163, done.
remote: Total 163 (delta 0), reused 0 (delta 0), pack-reused 163
Réception d'objets: 100% (163/163), 134.79 KiB | 670.00 KiB/s, fait.
Résolution des deltas: 100% (93/93), fait.
Sous-module 'matrix-python-sdk' (https://github.com/saadnpq/matrix-python-sdk) enregistré pour le chemin 'matrix-python-sdk'
Clonage dans '/home/fred/GO/matrixcli/matrix-python-sdk'...
remote: Enumerating objects: 2324, done.        
remote: Total 2324 (delta 0), reused 0 (delta 0), pack-reused 2324        
Réception d'objets: 100% (2324/2324), 2.77 MiB | 847.00 KiB/s, fait.
Résolution des deltas: 100% (1409/1409), fait.
Chemin de sous-module 'matrix-python-sdk' : 'aa4071835a79b5a3dccfd366b01bd9d53ed0a62f' extrait
fred@fred-vm:~/GO$ 

Import matrix_client.errors

Hi,

if i try to use matrixcli the import of matrix_client errors can not be do. How to fix this or where are these located?

Regards!

Support for formatted messages

I tried to send a formatted message, both Markdown and HTML:

host ~ # matrixcli send -r '!tpDKoXaWvyTRgGxkTy:e8c75da2-02bd-4b44-b522-262bdf4134de' "$(echo '```'; echo 'foo'; echo '```')"
logging in ....
logged in ....
host ~ # matrixcli send -r '!tpDKoXaWvyTRgGxkTy:e8c75da2-02bd-4b44-b522-262bdf4134de' "$(echo '<pre>'; echo 'foo'; echo '</pre>')"
logging in ....
logged in ....

Unfortunately, both arrive as-is, with the markup instead of formatted. Support for formatted messages would be useful :)

Add functionality to signup

After having installed the cli client and started the service, it gives a 403 error because I have not registered an account with the server of the example configuration (https://matrix.org).

Giving the command matrixcli register results in an error:

matrixcli: error: argument subcommand: invalid choice: 'register' (choose from 'send', 'listen', 'rooms', 'unread', 'tail')

It should not be an invalid choice to register via the matrixcli.

Visiting the Matrix.org website tells me that I need to "pick a client and get started".

I should not need to install another application client in order to use the cli client. Furthermore, there is no excuse for having not provided a simple registration form on the website itself.

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.