Skip to content

Commit d25842b

Browse files
author
8go
committed
typos and documentation
- fixed spelling mistakes and added a few lines of documentation
1 parent 0133592 commit d25842b

File tree

2 files changed

+76
-28
lines changed

2 files changed

+76
-28
lines changed

README.md

+37-13
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ creating rooms, inviting, verifying, and so much more.
1414
- It is a simple but convenient app to
1515
- send Matrix text messages as well as text, image, audio, video or
1616
other arbitrary files
17-
- listen to and receive Matrix messages
17+
- listen to and receive Matrix messages, images, audio, video, etc.
18+
- download media files like images or audio
1819
- perform Matrix emoji verification
19-
- create rooms
20-
- invite to rooms
20+
- performs actions of rooms (create rooms, invite to rooms, etc.)
21+
- and much more
2122
- It exclusively offers a command-line interface (CLI).
2223
- Hence the word-play: matrix-command(lin)er
2324
- There is no GUI and there are no windows (except for pop-up windows in
@@ -33,14 +34,14 @@ messages from the CLI in various different ways.
3334
Use cases for this program could be
3435
- a bot or part of a bot,
3536
- to send alerts,
36-
- combine it with cron to publish periodic data,
37+
- combine it with `cron` to publish periodic data,
3738
- send yourself daily/weekly reminders via a cron job
3839
- send yourself a daily song from your music collection
3940
- a trivial way to fire off some instant messages from the command line
4041
- to automate sending via programs and scripts
4142
- a "blogger" who frequently sends messages and images to the same
4243
room(s) could use it
43-
- a person could write a diary or run a gratitutde journal by
44+
- a person could write a diary or run a gratitude journal by
4445
sending messages to her/his own room
4546
- as educational material that showcases the use of the `matrix-nio` SDK
4647

@@ -100,7 +101,7 @@ Messages to send can be provided
100101

101102
For sending messages the program supports various text formats:
102103
1) text: default
103-
2) html: HTML formated text
104+
2) html: HTML formatted text
104105
3) markdown: MarkDown formatted text
105106
4) code: used a block of fixed-sized font, ideal for ASCII art or
106107
tables, bash outputs, etc.
@@ -110,9 +111,12 @@ For sending messages the program supports various text formats:
110111
Photos and images that can be sent. That includes files like
111112
.jpg, .gif, .png or .svg.
112113

113-
Arbirtary files like .txt, .pdf, .doc, audio files like .mp3
114+
Arbitrary files like .txt, .pdf, .doc, audio files like .mp3
114115
or video files like .mp4 can also be sent.
115116

117+
Matrix events like sending an emoji reaction, replying as a thread,
118+
message edits can be sent.
119+
116120
# Listening, Receiving
117121

118122
One can listen to one or multiple rooms. Received messages will be displayed
@@ -149,8 +153,8 @@ well as ban, unban and kick other users from rooms.
149153
# Summary, TLDR
150154

151155
This simple Matrix client written in Python allows you to send and
152-
receive messages and verify other devices. End-to-end encryption is enabled
153-
by default and cannot be turned off.
156+
receive messages and files and verify other devices. End-to-end encryption
157+
is enabled by default and cannot be turned off.
154158

155159
# Dependencies
156160

@@ -415,7 +419,7 @@ optional arguments:
415419
Create this room or these rooms. One or multiple room
416420
aliases can be specified. The room (or multiple ones)
417421
provided in the arguments will be created. The user
418-
must be permitted to create rooms.Combine --room-
422+
must be permitted to create rooms. Combine --room-
419423
create with --name and --topic to add names and topics
420424
to the room(s) to be created.
421425
--room-join ROOM_JOIN [ROOM_JOIN ...]
@@ -544,7 +548,7 @@ optional arguments:
544548
HTML tags are accepted by Matrix.
545549
-z, --markdown Send message as format "MARKDOWN". If not specified,
546550
message will be sent as format "TEXT". E.g. that
547-
allows sending of text formated in MarkDown language.
551+
allows sending of text formatted in MarkDown language.
548552
-k, --code Send message as format "CODE". If not specified,
549553
message will be sent as format "TEXT". If both --html
550554
and --code are specified then --code takes priority.
@@ -722,6 +726,7 @@ submitting a Pull Request.
722726
- Storage for End-to-end encryption
723727
- Storage of credentials
724728
- Supports access token instead of password
729+
- Supports SSO (Single Sign-On)
725730
- Sending messages
726731
- Sending notices
727732
- Sending formatted messages
@@ -733,6 +738,8 @@ submitting a Pull Request.
733738
- Sending image files (photos, etc.)
734739
- Sending of media files (music, videos, etc.)
735740
- Sending of arbitrary files (PDF, xls, doc, txt, etc.)
741+
- Sending events such as emoji reactions, or replies as threads
742+
- Using events to edit sent messages
736743
- Receiving messages forever
737744
- Receiving messages once
738745
- Receiving last messages
@@ -748,6 +755,9 @@ submitting a Pull Request.
748755
- Unbanning from rooms
749756
- Kicking from rooms
750757
- Supports renaming of device
758+
- Supports renaming of display name
759+
- Supports skipping SSL verification to use HTTP instead of HTTPS
760+
- Supports providing local SSL certificate files
751761
- Supports notification via OS of received messages
752762
- Supports periodic execution via crontab
753763
- Supports room aliases
@@ -756,6 +766,7 @@ submitting a Pull Request.
756766
- In-source documentation
757767
- Can be run as a service
758768
- Smart tab completion for shells like bash (thanks to PR from @mizlan :clap:)
769+
- More than 200 stars :stars: on Github
759770

760771
# Autocompletion
761772

@@ -765,10 +776,23 @@ Here is a sample snapshot of tab completion in action:
765776

766777
![tab completion](./screenshots/tab_complete.png)
767778

779+
# Performance and Speed
780+
781+
- `matrix-commander` is written in Python and hence rather on the slow side
782+
- It is not thread-safe. One cannot just simply run multiple instances
783+
at the same time. However, with very careful set-up one can run
784+
multiple instances, but that is not the target use case.
785+
- Where possible bundle several actions together into a single call.
786+
For example if one wants to send 8 images, then it is significatly faster
787+
to call `matrix-commander` once with `-i` specifying 8 images, than
788+
to call `matrix-commander` 8 times with one image each call. One needs
789+
to send 5 messages, 10 images, 5 audios, 3 PDF files and 7 events to
790+
the same user? Call `matrix-commander` once, not 30 times.
791+
768792
# For Developers
769793

770794
- Don't change tabbing, spacing, or formating as file is automatically
771-
sorted, linted and formated.
795+
sorted, linted and formatted.
772796
- `pylama:format=pep8:linters=pep8`
773797
- first `isort` import sorter
774798
- then `flake8` linter/formater
@@ -777,7 +801,7 @@ Here is a sample snapshot of tab completion in action:
777801
- isort matrix-commander.py
778802
- flake8 matrix-commander.py
779803
- python3 -m black --line-length 79 matrix-commander.py
780-
- there is a script called `lintmc.sh` in `scripts` directory for that
804+
- There is a script called `lintmc.sh` in `scripts` directory for that.
781805

782806
# License
783807

matrix-commander.py

+39-15
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
- It is a simple but convenient app to
2222
- send Matrix text messages as well as text, image, audio, video or
2323
other arbitrary files
24-
- listen to and receive Matrix messages
24+
- listen to and receive Matrix messages, images, audio, video, etc.
25+
- download media files like images or audio
2526
- perform Matrix emoji verification
26-
- create rooms
27-
- invite to rooms
27+
- performs actions of rooms (create rooms, invite to rooms, etc.)
28+
- and much more
2829
- It exclusively offers a command-line interface (CLI).
2930
- Hence the word-play: matrix-command(lin)er
3031
- There is no GUI and there are no windows (except for pop-up windows in
@@ -40,14 +41,14 @@
4041
Use cases for this program could be
4142
- a bot or part of a bot,
4243
- to send alerts,
43-
- combine it with cron to publish periodic data,
44+
- combine it with `cron` to publish periodic data,
4445
- send yourself daily/weekly reminders via a cron job
4546
- send yourself a daily song from your music collection
4647
- a trivial way to fire off some instant messages from the command line
4748
- to automate sending via programs and scripts
4849
- a "blogger" who frequently sends messages and images to the same
4950
room(s) could use it
50-
- a person could write a diary or run a gratitutde journal by
51+
- a person could write a diary or run a gratitude journal by
5152
sending messages to her/his own room
5253
- as educational material that showcases the use of the `matrix-nio` SDK
5354
@@ -107,7 +108,7 @@
107108
108109
For sending messages the program supports various text formats:
109110
1) text: default
110-
2) html: HTML formated text
111+
2) html: HTML formatted text
111112
3) markdown: MarkDown formatted text
112113
4) code: used a block of fixed-sized font, ideal for ASCII art or
113114
tables, bash outputs, etc.
@@ -117,9 +118,12 @@
117118
Photos and images that can be sent. That includes files like
118119
.jpg, .gif, .png or .svg.
119120
120-
Arbirtary files like .txt, .pdf, .doc, audio files like .mp3
121+
Arbitrary files like .txt, .pdf, .doc, audio files like .mp3
121122
or video files like .mp4 can also be sent.
122123
124+
Matrix events like sending an emoji reaction, replying as a thread,
125+
message edits can be sent.
126+
123127
# Listening, Receiving
124128
125129
One can listen to one or multiple rooms. Received messages will be displayed
@@ -156,8 +160,8 @@
156160
# Summary, TLDR
157161
158162
This simple Matrix client written in Python allows you to send and
159-
receive messages and verify other devices. End-to-end encryption is enabled
160-
by default and cannot be turned off.
163+
receive messages and files and verify other devices. End-to-end encryption
164+
is enabled by default and cannot be turned off.
161165
162166
# Dependencies
163167
@@ -422,7 +426,7 @@
422426
Create this room or these rooms. One or multiple room
423427
aliases can be specified. The room (or multiple ones)
424428
provided in the arguments will be created. The user
425-
must be permitted to create rooms.Combine --room-
429+
must be permitted to create rooms. Combine --room-
426430
create with --name and --topic to add names and topics
427431
to the room(s) to be created.
428432
--room-join ROOM_JOIN [ROOM_JOIN ...]
@@ -551,7 +555,7 @@
551555
HTML tags are accepted by Matrix.
552556
-z, --markdown Send message as format "MARKDOWN". If not specified,
553557
message will be sent as format "TEXT". E.g. that
554-
allows sending of text formated in MarkDown language.
558+
allows sending of text formatted in MarkDown language.
555559
-k, --code Send message as format "CODE". If not specified,
556560
message will be sent as format "TEXT". If both --html
557561
and --code are specified then --code takes priority.
@@ -729,6 +733,7 @@
729733
- Storage for End-to-end encryption
730734
- Storage of credentials
731735
- Supports access token instead of password
736+
- Supports SSO (Single Sign-On)
732737
- Sending messages
733738
- Sending notices
734739
- Sending formatted messages
@@ -740,6 +745,8 @@
740745
- Sending image files (photos, etc.)
741746
- Sending of media files (music, videos, etc.)
742747
- Sending of arbitrary files (PDF, xls, doc, txt, etc.)
748+
- Sending events such as emoji reactions, or replies as threads
749+
- Using events to edit sent messages
743750
- Receiving messages forever
744751
- Receiving messages once
745752
- Receiving last messages
@@ -755,6 +762,9 @@
755762
- Unbanning from rooms
756763
- Kicking from rooms
757764
- Supports renaming of device
765+
- Supports renaming of display name
766+
- Supports skipping SSL verification to use HTTP instead of HTTPS
767+
- Supports providing local SSL certificate files
758768
- Supports notification via OS of received messages
759769
- Supports periodic execution via crontab
760770
- Supports room aliases
@@ -763,6 +773,7 @@
763773
- In-source documentation
764774
- Can be run as a service
765775
- Smart tab completion for shells like bash (thanks to PR from @mizlan :clap:)
776+
- More than 200 stars :stars: on Github
766777
767778
# Autocompletion
768779
@@ -772,10 +783,23 @@
772783
773784
![tab completion](./screenshots/tab_complete.png)
774785
786+
# Performance and Speed
787+
788+
- `matrix-commander` is written in Python and hence rather on the slow side
789+
- It is not thread-safe. One cannot just simply run multiple instances
790+
at the same time. However, with very careful set-up one can run
791+
multiple instances, but that is not the target use case.
792+
- Where possible bundle several actions together into a single call.
793+
For example if one wants to send 8 images, then it is significatly faster
794+
to call `matrix-commander` once with `-i` specifying 8 images, than
795+
to call `matrix-commander` 8 times with one image each call. One needs
796+
to send 5 messages, 10 images, 5 audios, 3 PDF files and 7 events to
797+
the same user? Call `matrix-commander` once, not 30 times.
798+
775799
# For Developers
776800
777801
- Don't change tabbing, spacing, or formating as file is automatically
778-
sorted, linted and formated.
802+
sorted, linted and formatted.
779803
- `pylama:format=pep8:linters=pep8`
780804
- first `isort` import sorter
781805
- then `flake8` linter/formater
@@ -784,7 +808,7 @@
784808
- isort matrix-commander.py
785809
- flake8 matrix-commander.py
786810
- python3 -m black --line-length 79 matrix-commander.py
787-
- there is a script called `lintmc.sh` in `scripts` directory for that
811+
- There is a script called `lintmc.sh` in `scripts` directory for that.
788812
789813
# License
790814
@@ -4128,7 +4152,7 @@ def initial_check_of_args() -> None: # noqa: C901
41284152
help="Create this room or these rooms. One or multiple "
41294153
"room aliases can be specified. The room (or multiple "
41304154
"ones) provided in the arguments will be created. "
4131-
"The user must be permitted to create rooms."
4155+
"The user must be permitted to create rooms. "
41324156
"Combine --room-create with --name and --topic to add "
41334157
"names and topics to the room(s) to be created.",
41344158
)
@@ -4386,7 +4410,7 @@ def initial_check_of_args() -> None: # noqa: C901
43864410
help="Send message as format "
43874411
'"MARKDOWN". If not specified, message will be sent '
43884412
'as format "TEXT". E.g. that allows sending of text '
4389-
"formated in MarkDown language.",
4413+
"formatted in MarkDown language.",
43904414
)
43914415
# -c is already used for --credentials, -k as it sounds like c
43924416
ap.add_argument(

0 commit comments

Comments
 (0)