6 Aug 2019 |
darnir | Sure. How would you approach it though? | 23:15:12 |
darnir | I wanted the scripts to be purely POSIX. But had to settle for jq as a dependency. | 23:15:32 |
darnir | Parsing json is quite hard. You can do it with sed and awk. But it's difficult, unmaintainable and error prone | 23:16:57 |
AppAraat | yeah I was thinking sed & awk , since they're already present on most (all?) POSIX systems. However, doing that would indeed certainly not be easy. Perhaps add sed & awk as a fallback if jq is not found? | 23:40:23 |
10 Aug 2019 |
errhammr moved to a different home server | Als Antwort auf @AppAraat:matrix.org yeah I was thinking sed & awk , since they're already present on most (all?) POSIX systems. However, doing that would indeed certainly not be easy. Perhaps add sed & awk as a fallback if jq is not found? You mean, write a jq.sh script that does what jq does but in plain POSIX? | 11:32:55 |
AppAraat | Or just replace singular instances of jq with custom sed & awk lines. There are not many places now where jq is used but maybe it might grow in the future. | 11:47:07 |
darnir | More complex and interesting uses of jq are possible. And maybe we should use it. | 11:48:04 |
darnir | Provide better output to the user | 11:48:34 |
AppAraat | that might depend perhaps, is MSS supposed to be used interactively, or is it strictly to be used in automated fashion (like I'm going to do by sending transactional messages from my server, replacing e-mail alerts and the like) | 11:51:40 |
AppAraat | for users that might want to use matrix in the terminal interactively, wouldn't weechat-matrix be a better solution? | 11:53:05 |
darnir | In a way I agree. | 11:56:56 |
darnir | And now that I think about it. Machine readability should be more important for MSS. | 11:57:23 |
darnir | I originally started this project as a way to test new installations. | 11:57:38 |
darnir | I didn't want to make the rest api calls manually. But even for testing, I probably want to see the entire response clearly | 11:58:15 |
AppAraat | fair point | 12:01:30 |
AppAraat | also something to consider is what features might be planned in the future | 12:04:50 |
Gitlab Notifications | [Darshit Shah/Matrix Shell Suite] Darshit Shah merged merge request Removed "set -o pipefail" (!5) | 13:28:58 |
Gitlab Notifications | [Darshit Shah/Matrix Shell Suite#master] 2 new commits by Darshit Shah | 13:29:02 |
Gitlab Notifications | - Merge branch 'fix/remove_pipefail' into 'master' (...) (24e7dfb0)
- Removed "set -o pipefail" (...) (c10d882d)
| 13:29:04 |
11 Aug 2019 |
AppAraat | darnir: are both wget and curl dependencies? Or is it possible to install only one of them? Because on my FBSD server I don't have wget installed:
$ sh src/matrix-login
Command wget not found in $PATH
| 15:34:29 |
darnir | It's either / or | 15:34:57 |
darnir | Create a config file and set the client to curl- | 15:35:11 |
darnir | I believe even exporting HTTP_CLIENT=curl will do the trick | 15:36:00 |
AppAraat | I'm unfamiliar with how a config file should work (where can I read more about it?) so I'll try the var method | 15:38:39 |
darnir | Yeah, I should document that. I haven't done it yet. | 15:40:18 |
darnir | utils/optparse.sh shows how the config file is handled. | 15:40:50 |
darnir | I'll soon add some documentation for it | 15:40:57 |
AppAraat | cool, I'll take a look and if it's clear enough to me then I can also try to help with some documentation if you want | 15:41:39 |
darnir | That would be highly appreciated! | 15:42:04 |
AppAraat | ok, I'll see what I can do. Also, the docs link in the title only lists docs for the cookie.sh : https://i.imgur.com/uNmsDpR.png | 15:48:25 |