| Title: | Lightweight Wrapper to the 'ntfy.sh' Service |
|---|---|
| Description: | The 'ntfy' (pronounce: notify) service is a simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, entirely without signup, cost or setup. It's also open source if you want to run your own. Visit <https://ntfy.sh> for more details. |
| Authors: | Jonathan Carroll [aut, cre] (ORCID: <https://orcid.org/0000-0002-1404-5264>), Andrew Heiss [ctb] (ORCID: <https://orcid.org/0000-0002-3948-3914>), Hadley Wickham [ctb] (ORCID: <https://orcid.org/0000-0003-4757-117X>) |
| Maintainer: | Jonathan Carroll <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-05-13 09:19:23 UTC |
| Source: | https://github.com/jonocarroll/ntfy |
Emoji symbols available in ntfy
emojiemoji
emojiA data frame with 7,240 rows and 60 columns:
Symbol
Name of the emoji that can be used in a tag
Alternative names
Category
Description
Unicode Version
...
https://github.com/binwiederhier/ntfy/blob/main/web/src/app/emojis.js
ntfy_done() tells you when the code completed, and
ntfy_done_with_timing() tells you how long it took.
ntfy_done( x, message = paste0("Process completed at ", format(Sys.time())), title = "ntfy_done()", tags = "white_check_mark", topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password(), ... ) ntfy_done_with_timing( x, message = paste0("Process completed in ", format(time_result), "s"), title = "ntfy_done_with_timing()", tags = "stopwatch", topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password(), ... )ntfy_done( x, message = paste0("Process completed at ", format(Sys.time())), title = "ntfy_done()", tags = "white_check_mark", topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password(), ... ) ntfy_done_with_timing( x, message = paste0("Process completed in ", format(time_result), "s"), title = "ntfy_done_with_timing()", tags = "stopwatch", topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password(), ... )
x |
a result (ignored) |
message |
Text to send as notification |
title |
Title of notification. See https://docs.ntfy.sh/publish/#message-title |
tags |
Text tags or emoji shortcodes from https://docs.ntfy.sh/emojis/, provided as a list |
topic |
Subscribed topic to which to send notification |
server |
ntfy server (when not using https://ntfy.sh) |
auth |
(logical) indicating if the topic requires password authorization |
username |
username with access to a protected topic |
password |
password with access to a protected topic |
... |
other arguments passed to |
The input x (for further piping). A notification will be sent as a
side-effect.
# report that a process has completed Sys.sleep(3) |> ntfy_done("Woke up") # report that a process has completed, and how long it took Sys.sleep(3) |> ntfy_done_with_timing()# report that a process has completed Sys.sleep(3) |> ntfy_done("Woke up") # report that a process has completed, and how long it took Sys.sleep(3) |> ntfy_done_with_timing()
Retrieve History of Notifications
ntfy_history( since = "all", topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password(), ... )ntfy_history( since = "all", topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password(), ... )
since |
duration (e.g. |
topic |
Subscribed topic to which to send notification |
server |
ntfy server (when not using https://ntfy.sh) |
auth |
(logical) indicating if the topic requires password authorization |
username |
username with access to a protected topic |
password |
password with access to a protected topic |
... |
any other (named) query parameters to add to the request |
a data.frame() with one row per notification, with columns as
described in the documentation
https://ntfy.sh/docs/subscribe/api/#json-message-format
# get the last hour of notifications ntfy_history(since = "1h")# get the last hour of notifications ntfy_history(since = "1h")
Send a Notification
ntfy_send( message = "test", title = NULL, tags = NULL, priority = 3, actions = NULL, click = NULL, image = NULL, attach = NULL, filename = NULL, delay = NULL, email = NULL, markdown = ntfy_md(), topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password() )ntfy_send( message = "test", title = NULL, tags = NULL, priority = 3, actions = NULL, click = NULL, image = NULL, attach = NULL, filename = NULL, delay = NULL, email = NULL, markdown = ntfy_md(), topic = ntfy_topic(), server = ntfy_server(), auth = ntfy_auth(), username = ntfy_username(), password = ntfy_password() )
message |
Text to send as notification |
title |
Title of notification. See https://docs.ntfy.sh/publish/#message-title |
tags |
Text tags or emoji shortcodes from https://docs.ntfy.sh/emojis/, provided as a list |
priority |
Message priority with 1=min, 3=default and 5=max. See https://docs.ntfy.sh/publish/#message-priority |
actions |
Custom user action buttons for notifications. See https://docs.ntfy.sh/publish/#action-buttons |
click |
Website opened when notification is clicked. See https://docs.ntfy.sh/publish/#click-action |
image |
Image to include in the body of the notification. Either a |
attach |
URL of an attachment, see attach via URL. See https://docs.ntfy.sh/publish/#attach-file-from-url |
filename |
File name of the attachment |
delay |
Timestamp or duration for delayed delivery |
email |
E-mail address for e-mail notifications |
markdown |
(logical) use markdown formatting ( |
topic |
Subscribed topic to which to send notification |
server |
ntfy server (when not using https://ntfy.sh) |
auth |
(logical) indicating if the topic requires password authorization |
username |
username with access to a protected topic |
password |
password with access to a protected topic |
topic, server, auth, username, password, and markdown can be set
via environment variables NTFY_TOPIC, NTFY_SERVER, NTFY_AUTH,
NTFY_USERNAME, NTFY_PASSWORD, and NTFY_MD, respectively.
a httr2::response() object, invisibly.
# send a message to the default topic ('mytopic') ntfy_send("test from R!") # can use tags (emoji) ntfy_send(message = "sending with tags!", tags = c(tags$cat, tags$dog) ) # if supported, can use markdown ntfy_send(message = "**Important**: see _details_ [here](https://example.com)")# send a message to the default topic ('mytopic') ntfy_send("test from R!") # can use tags (emoji) ntfy_send(message = "sending with tags!", tags = c(tags$cat, tags$dog) ) # if supported, can use markdown ntfy_send(message = "**Important**: see _details_ [here](https://example.com)")
Show an emoji symbol, or find one by name
show_emoji(name = NULL, search = FALSE)show_emoji(name = NULL, search = FALSE)
name |
name of emoji to either print or find |
search |
search the |
Emoji are loaded with data("emoji") and the aliases column
contains the names compatible with ntfy. Alternative names are
included in the tags column and these will be searched if the
name is not found in aliases.
nothing, just prints the emoji if one or more are found
show_emoji("dog") show_emoji("party")show_emoji("dog") show_emoji("party")
Emoji symbols compatible with ntfy to be used as tags
tagstags
An object of class list of length 1855.