Use the ruby programming language to handle your Pushover notifications
- In order to take advantage of this ruby script, you must first set the application token and user key in the config.yaml file:
- The script has ARGV[0] set by default for the message content. This is handled by calling the script, then the argument:
- push.rb relies on the config.yaml file to pull in various parameters, which limits the amount of time spent inside the push.rb script
- Configure the yaml file with your application token, user key, device name(s), notification sound, etc.
- By default, the priority & sound dictionaries are set in the push.rb script:
- Here, we can select which priority and sound to use (nested items have been marked with their corresponding numbers)
- Need to attach an image? Set the image flag to 1, set your image directory path and the type. push.rb will check for the flag, then check the file size before pushing:
- then push.rb will encode the image to a Base64 encoding:
Message limits are checked after each push with the following request:
Contains notification images that can be used as visuals (optional).
- Fork the main branch
- Switch to the dev branch:
git checkout dev
- Create your feature branch:
git checkout -b your-feature-name
- Commit your changes:
git commit -am 'your added feature'
- Push to the branch:
git push origin your-feature-name
- Create a new Pull Request against the dev repo