项目作者: atmosx

项目描述 :
Enhanced tarsnap notifications
高级语言: Ruby
项目地址: git://github.com/atmosx/argosnap.git
创建时间: 2014-04-21T19:03:06Z
项目社区:https://github.com/atmosx/argosnap

开源协议:MIT License

下载


PullReview stats

Argosnap is a tarsnap utility designed to send notifications when the picoUSD balance falls below a predefined threshold. Currently the following notification methods are supported:

Installation

Linux, *BSD and MacOSX

The main dependency is mechanize. Install the gems via rubygems:

  1. $ gem install mail mechanize argosnap

Setup

Run argosnap to create the configuration files:

  1. $ argosnap -i config

You need to edit the settings accordingly. The configuration file is located at $HOME/.argosnap/config.yml and looks like this:

  1. ---
  2. :email: tarsnap_email@domain.net
  3. :password: tarsnap_password
  4. :threshold: 10
  5. :seconds: 86400
  6. :notifications_osx: false
  7. :notifications_email: false
  8. :smtp:
  9. :email_delivery_method: smtp
  10. :smtpd_user: my_smtp_user
  11. :smtpd_password: my_smtp_password
  12. :smtpd_address: smtp.domain.net
  13. :smtpd_port: 465
  14. :smtpd_from: no-reply@domain.net
  15. :smtpd_to: user@domain.net
  16. :format: txt
  17. :notifications_pushover: true
  18. :pushover:
  19. :key: <my-hash-key>
  20. :token: <app-token-key>

You need to enable notifications to use them. See the wiki for details on how to setup notifications.

Usage

Argosnap usage is straight forward:

  1. $ argosnap -h
  2. argosnap 0.0.4.1 ( https://github.com/atmosx/argosnap/ )
  3. Usage: argosnap [OPTIONS]
  4. -v: dislay version
  5. -i config: install configuration files
  6. -i plist: install plist file for OSX
  7. -p: prints the current amount in picoUSD
  8. -p clean: prints only the picollars (float rounded in 4 decimals), to use in cli
  9. -n mail: send notification via email
  10. -n pushover: send notification via pushover
  11. -n osx: display osx notification
  12. -n notify: send notifications everywhere
  13. -v, --version display version
  14. -i, --install [OPTION] install configuration files
  15. -p, --print [OPTION] fetch current amount in picoUSD
  16. -n, --notification [OPTION] send notification via email
  17. -h, --help help
  18. $ argosnap -p
  19. Current picoUSD balance: 4.287
  20. $ argosnap -p clean
  21. 4.287

License

See License.txt for details.

Contributing

  1. Fork it ( http://github.com/atmosx/argosnap/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request