cmsend 0.2.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cmsend-0.2.0 → cmsend-0.3.1}/PKG-INFO +8 -4
- {cmsend-0.2.0 → cmsend-0.3.1}/README.md +7 -3
- {cmsend-0.2.0 → cmsend-0.3.1}/cmsend.egg-info/PKG-INFO +8 -4
- {cmsend-0.2.0 → cmsend-0.3.1}/cmsend.py +8 -4
- {cmsend-0.2.0 → cmsend-0.3.1}/LICENSE +0 -0
- {cmsend-0.2.0 → cmsend-0.3.1}/cmsend.egg-info/SOURCES.txt +0 -0
- {cmsend-0.2.0 → cmsend-0.3.1}/cmsend.egg-info/dependency_links.txt +0 -0
- {cmsend-0.2.0 → cmsend-0.3.1}/cmsend.egg-info/entry_points.txt +0 -0
- {cmsend-0.2.0 → cmsend-0.3.1}/cmsend.egg-info/requires.txt +0 -0
- {cmsend-0.2.0 → cmsend-0.3.1}/cmsend.egg-info/top_level.txt +0 -0
- {cmsend-0.2.0 → cmsend-0.3.1}/pyproject.toml +0 -0
- {cmsend-0.2.0 → cmsend-0.3.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmsend
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: ping messages between chatmail relays
|
|
5
5
|
Project-URL: Repository, https://github.com/chatmail/cmsend
|
|
6
6
|
Project-URL: Changelog, https://github.com/chatmail/cmsend/blob/master/CHANGELOG.md
|
|
@@ -21,13 +21,17 @@ To send and receive from a single chatmail relay:
|
|
|
21
21
|
|
|
22
22
|
cmsend --init nine.testrun.org # <-- substitute with the domain you want to set as origin
|
|
23
23
|
|
|
24
|
-
To setup a chat using an invite link:
|
|
24
|
+
To setup a genesis chat using an invite link:
|
|
25
25
|
|
|
26
26
|
cmsend --join INVITELINK
|
|
27
27
|
|
|
28
|
-
To send a message to
|
|
28
|
+
To send a message to the genesis chat:
|
|
29
29
|
|
|
30
|
-
echo "hello" | cmsend
|
|
30
|
+
echo "hello" | cmsend
|
|
31
|
+
|
|
32
|
+
To send a message to the genesis chat with an attachment:
|
|
33
|
+
|
|
34
|
+
cmsend -m "here is the file" -a README.md
|
|
31
35
|
|
|
32
36
|
To show help:
|
|
33
37
|
|
|
@@ -8,13 +8,17 @@ To send and receive from a single chatmail relay:
|
|
|
8
8
|
|
|
9
9
|
cmsend --init nine.testrun.org # <-- substitute with the domain you want to set as origin
|
|
10
10
|
|
|
11
|
-
To setup a chat using an invite link:
|
|
11
|
+
To setup a genesis chat using an invite link:
|
|
12
12
|
|
|
13
13
|
cmsend --join INVITELINK
|
|
14
14
|
|
|
15
|
-
To send a message to
|
|
15
|
+
To send a message to the genesis chat:
|
|
16
16
|
|
|
17
|
-
echo "hello" | cmsend
|
|
17
|
+
echo "hello" | cmsend
|
|
18
|
+
|
|
19
|
+
To send a message to the genesis chat with an attachment:
|
|
20
|
+
|
|
21
|
+
cmsend -m "here is the file" -a README.md
|
|
18
22
|
|
|
19
23
|
To show help:
|
|
20
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmsend
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: ping messages between chatmail relays
|
|
5
5
|
Project-URL: Repository, https://github.com/chatmail/cmsend
|
|
6
6
|
Project-URL: Changelog, https://github.com/chatmail/cmsend/blob/master/CHANGELOG.md
|
|
@@ -21,13 +21,17 @@ To send and receive from a single chatmail relay:
|
|
|
21
21
|
|
|
22
22
|
cmsend --init nine.testrun.org # <-- substitute with the domain you want to set as origin
|
|
23
23
|
|
|
24
|
-
To setup a chat using an invite link:
|
|
24
|
+
To setup a genesis chat using an invite link:
|
|
25
25
|
|
|
26
26
|
cmsend --join INVITELINK
|
|
27
27
|
|
|
28
|
-
To send a message to
|
|
28
|
+
To send a message to the genesis chat:
|
|
29
29
|
|
|
30
|
-
echo "hello" | cmsend
|
|
30
|
+
echo "hello" | cmsend
|
|
31
|
+
|
|
32
|
+
To send a message to the genesis chat with an attachment:
|
|
33
|
+
|
|
34
|
+
cmsend -m "here is the file" -a README.md
|
|
31
35
|
|
|
32
36
|
To show help:
|
|
33
37
|
|
|
@@ -25,14 +25,18 @@ def main():
|
|
|
25
25
|
help="setup a chat using the specified invite link",
|
|
26
26
|
)
|
|
27
27
|
parser.add_argument(
|
|
28
|
-
"
|
|
28
|
+
"-m",
|
|
29
29
|
type=str,
|
|
30
|
+
dest="msg",
|
|
30
31
|
default=None,
|
|
31
32
|
help="the text message to send (defaults to reading from stdin)",
|
|
32
33
|
)
|
|
33
34
|
parser.add_argument(
|
|
34
35
|
"-v", dest="verbose", action="count", default=0, help="increase verbosity"
|
|
35
36
|
)
|
|
37
|
+
parser.add_argument(
|
|
38
|
+
"-a", dest="filename", type=str, default=None, help="add file attachment"
|
|
39
|
+
)
|
|
36
40
|
args = parser.parse_args()
|
|
37
41
|
|
|
38
42
|
try:
|
|
@@ -54,7 +58,7 @@ def perform_main(args):
|
|
|
54
58
|
else:
|
|
55
59
|
if args.msg is None:
|
|
56
60
|
args.msg = sys.stdin.read()
|
|
57
|
-
profile.perform_send(args.msg)
|
|
61
|
+
profile.perform_send(args.msg, filename=args.filename)
|
|
58
62
|
|
|
59
63
|
|
|
60
64
|
class Profile:
|
|
@@ -110,12 +114,12 @@ class Profile:
|
|
|
110
114
|
print(f"joining completed with contact_id == {ev.contact_id}")
|
|
111
115
|
return 0
|
|
112
116
|
|
|
113
|
-
def perform_send(self, text):
|
|
117
|
+
def perform_send(self, text, filename=None):
|
|
114
118
|
self._account.start_io()
|
|
115
119
|
for chat in self._account.get_chatlist():
|
|
116
120
|
snap = chat.get_full_snapshot()
|
|
117
121
|
if snap.is_encrypted and snap.can_send:
|
|
118
|
-
msg = chat.
|
|
122
|
+
msg = chat.send_message(text=text, file=filename)
|
|
119
123
|
print(f"message {msg.id} was queued, waiting for delivery")
|
|
120
124
|
msg.wait_until_delivered()
|
|
121
125
|
return 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|