TIL today I RTFM!
command
ntfy
Today I read the brief synopsis of ntfy Android. I saw there that via linux the control and operation is fairly simple & straightforward
I went to the site and started reading.
ntfy via linux is easy to use
- simple HTTP PUT/POST commands are used
sh
curl -d "Backup successful π" ntfy.sh/mytopic
a.out
ntfy publish mytopic
"Backup successful π"
HTML
POST /mytopic HTTP/1.1
Host: ntfy.sh
Backup successful π
javascript
fetch('https://ntfy.sh/mytopic', {
method: 'POST', // PUT works too
body: 'Backup successful π'
})
golang
http.Post("https://ntfy.sh/mytopic", "text/plain",
strings.NewReader("Backup successful π"))
python
requests.post("https://ntfy.sh/mytopic",
data="Backup successful π".encode(encoding='utf-8'))
php
file_get_contents('https://ntfy.sh/mytopic', false, stream_context_create([
'http' => [
'method' => 'POST', // PUT also works
'header' => 'Content-Type: text/plain',
'content' => 'Backup successful π'
]
]));
Markdown formattingΒΆ
Supported on Android & webApp
You can format messages using Markdown π€©. That means you can use bold text, italicized text, links, images, and more. Supported Markdown features (web app only for now):
Emphasis such as bold (bold), italics (italics)
Links (some tool)
Images ()
Code blocks (code blocks) and inline code (inline code)
Headings (# headings, ## headings, etc.)
Lists (- lists, 1. lists, etc.)
Blockquotes (> blockquotes)
Horizontal rules (---)
Read more on
https://docs.ntfy.sh/publish/#markdown-formatting
Sources:
https://docs.ntfy.sh/
https://docs.ntfy.sh/install/
https://docs.ntfy.sh/publish/#markdown-formatting
#ntfy #notifications #programming #Android #Linux #sh #bash #csh #ksh #zsh #fish #curl #http #javascript #golang #powershell #python #php #technology #OpenSource #POSIX