!qAVFqlBoxJSJCUdUSS:matrix.org

matrix-shell-suite

51 Members
Sending matrix messages using shell scripts. Check it out over on GitLab: https://gitlab.com/darnir/matrix-shell-suite. Documentation: https://darnir.gitlab.io/matrix-shell-suite/index.html37 Servers

Load older messages


SenderMessageTime
6 Aug 2019
@darnir:talk.go7box.xyzdarnirSure. How would you approach it though?23:15:12
@darnir:talk.go7box.xyzdarnirI wanted the scripts to be purely POSIX. But had to settle for jq as a dependency.23:15:32
@darnir:talk.go7box.xyzdarnir 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:matrix.orgAppAraat 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:matrix.orgerrhammr 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:matrix.orgAppAraatOr 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:talk.go7box.xyzdarnirMore complex and interesting uses of jq are possible. And maybe we should use it.11:48:04
@darnir:talk.go7box.xyzdarnirProvide better output to the user11:48:34
@AppAraat:matrix.orgAppAraatthat 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:matrix.orgAppAraat for users that might want to use matrix in the terminal interactively, wouldn't weechat-matrix be a better solution? 11:53:05
@darnir:talk.go7box.xyzdarnirIn a way I agree.11:56:56
@darnir:talk.go7box.xyzdarnirAnd now that I think about it. Machine readability should be more important for MSS.11:57:23
@darnir:talk.go7box.xyzdarnirI originally started this project as a way to test new installations.11:57:38
@darnir:talk.go7box.xyzdarnir 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:matrix.orgAppAraatfair point12:01:30
@AppAraat:matrix.orgAppAraatalso something to consider is what features might be planned in the future12:04:50
@gitlab:t2bot.ioGitlab Notifications [Darshit Shah/Matrix Shell Suite] Darshit Shah merged merge request Removed "set -o pipefail" (!5) 13:28:58
@gitlab:t2bot.ioGitlab Notifications [Darshit Shah/Matrix Shell Suite#master] 2 new commits by Darshit Shah 13:29:02
@gitlab:t2bot.ioGitlab Notifications
  • Merge branch 'fix/remove_pipefail' into 'master' (...) (24e7dfb0)
  • Removed "set -o pipefail" (...) (c10d882d)
13:29:04
11 Aug 2019
@AppAraat:matrix.orgAppAraat

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:talk.go7box.xyzdarnirIt's either / or15:34:57
@darnir:talk.go7box.xyzdarnirCreate a config file and set the client to curl-15:35:11
@darnir:talk.go7box.xyzdarnir I believe even exporting HTTP_CLIENT=curl will do the trick 15:36:00
@AppAraat:matrix.orgAppAraatI'm unfamiliar with how a config file should work (where can I read more about it?) so I'll try the var method15:38:39
@darnir:talk.go7box.xyzdarnirYeah, I should document that. I haven't done it yet.15:40:18
@darnir:talk.go7box.xyzdarnir utils/optparse.sh shows how the config file is handled. 15:40:50
@darnir:talk.go7box.xyzdarnirI'll soon add some documentation for it15:40:57
@AppAraat:matrix.orgAppAraatcool, 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 want15:41:39
@darnir:talk.go7box.xyzdarnirThat would be highly appreciated!15:42:04
@AppAraat:matrix.orgAppAraat 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

Show newer messages


Back to Room ListRoom Version: 1