diff --git a/Troubleshooting.md b/Troubleshooting.md index 3c5e0a1..0217b97 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -136,3 +136,35 @@ The thing with Apprise is it doesn't know what you're feeding it (the format the **What it boils down to is:** * Developers can use the `body_format` tag which is telling Apprise what the **INPUT source** is. If a Apprise knows this it can go ahead and make special accommodations for the services that are expecting another format. By default the `body_format` is `None` and no modifications to the data fed to Apprise is touched at all (it's just passed right through to the upstream provider). * End User can modify their URL to specify a `format=` which can be either `text`, `markdown`, or `html` which sets the **OUTPUT source**. Notification Plugins can use this information to accommodate the data it's being fed and behave differently to help accommodate your situation. + +## Scripting Multi-Line Input/Output with CLI +If you're using the `apprise` tool from the command line, you may be trying to script it to send multiple lines. To acomplish this, there are a number of tweaks you can do with `bash`, `sh`, or `ksh` such as: +Those who want to deliver multiple line output can use the CLI as follows: +```bash +# Send ourselves a DBus related multi-line notification using `stdin` and +# the `cat` tool: +cat << _EOF | apprise -vv -t "Multi-line STDIN Redirect Example" dbus:// +Line 1 of output +Line 2 of output +Line 3 of output +_EOF + +# Another way is to just redirect the contents of file straight back +# into apprise: +cat ~/notes.txt | apprise -vv -t "Multi-line cat STDIN Redirect Example 2" \ + email://user:pass@hotmail.com + +# You can also use pass content from a multi-line variable you +# declared: +MULTILINE_VAR=" +This variable has been defined +with multiple lines in it." + +# Now send our variable straight into apprise: +apprise -vv -t "Multi-line Variable Example" -b "$MULTILINE_VAR" \ + gotify://localhost + +# Note: to preserve the new lines, be sure to wrap your +# variable in quotes (like example does above). + +``` \ No newline at end of file