saadjsct / matrixcli Goto Github PK
View Code? Open in Web Editor NEWCommand line matrix client
License: GNU General Public License v3.0
Command line matrix client
License: GNU General Public License v3.0
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.
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.
Hello, I believe there might be a parsing error. I get a 404 error using "https://matrix.org/" in my config.py file, while using "https://matrix.org" works just fine.
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
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'
More an Questions as an Issue, but how can I config the cli to send the message decrypted?
It is possible?
Thanks for your work!
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
.
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
Hi,
Is this project still being actively maintained?
Traceback (most recent call last):
File "matrixcli", line 4, in <module>
import gi
ModuleNotFoundError: No module named 'gi'
Solved by doing :
pip install PyGObject
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
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$
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!
Any reason why matrix_client is copied in a sub directory ? Maybe you could recommend installing from pip with
pip install matrix_client
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 :)
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.
We're looking for a way to automating changing the name of a user to simulate a status in our names. Looking at matrixcli looks like a viable solution.
Any chance of getting set_display_name
https://matrix-org.github.io/matrix-python-sdk/matrix_client.html#module-matrix_client.user included in the sub commands ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.