New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Documentation cli 2.0.0] Example to send a message with cli (Plain Text and Markdown) #17
Comments
Where exactly is the ambiguity? With text/plain the text just get rendered as text, therefore only a |
Yes you are right. :-) My contribution is just an information for people who has the same problems as i. Sorry for this way, but better at the wrong place than at no place. ;-) |
I think for those who just want to get it working, they would not bother to use the markdown feature either, and from my point of view, it is evident that a "\n" should be used to send a newline when the message is rendered as plain text. |
On the one hand you are right, but on the other hand where to put the "\n"?? Have a look here please:
But this does not work! The in-string "\n" is send as characters.
You have to do it like this with a use of a variable or pipe:
It took me hours to figure that out and I don't want others to have to search that long. ;-) |
I think this is more of bash usage & trick rather than a problem regarding how to use gotify. If you really need this, I think we can open up a dedicated section to include these "tips" while using gotify. /cc @jmattheis |
You are right of course. So i will help users to find a quick working solution. A Section with "Tips" or "Examples" would be very helpful from my point. A quick start with working examples is more often helpful than reading long and unkown (deep and dark) documention. ;-) |
We can add documentation for this to gotify/website, however in gotify/cli we can fix this behavior and just see \n as a linebreak, see above pr. |
Hello.
I have my problems to understand the doku. ;-)
I will give some examples to send a message from bash.
As Mardown: Value of CR are two spaces and carriage return!
printf -v CR " \n" # Fill variable $CR
./gotify-cli-linux-amd64 p -p 0 --url "https://mydomain.com/gotify" --token "Axxxxxxxxxxxxxx" --contentType "text/markdown" -t "Title" "FirstLine${CR}**SecondLine**${CR}\*\*ThirdLine\*\*"
Result:
As Plain Text: Value of CR is only carriage return.
printf -v CR "\n" # Fill variable $CR
./gotify-cli-linux-amd64 p -p 0 --url "https://mydomain.com/gotify" --token "Axxxxxxxxxxxxxx" --contentType "text/plain" -t "Title" "FirstLine${CR}**SecondLine**"
Result:
The text was updated successfully, but these errors were encountered: