argosnap 0.0.4.1 → 0.0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 696e301ac27f9dd17331161df5c31f302b8163cf
4
- data.tar.gz: f576bb88e66428e2babf57b751ca27c421205170
3
+ metadata.gz: cce8626211d00aa0d0330a8c6fd8e5d0db4bc0fd
4
+ data.tar.gz: cff12a72214c7fef2af796067661429b7c5e8d2b
5
5
  SHA512:
6
- metadata.gz: a680ac6a16e91ad24491683d552abdc8a06d567327581feba679e52dc395c32bfaff54e065cd8a8781483486f3e2ac93f5a22760abaed9f16b542678bb14d2c6
7
- data.tar.gz: fec5b2bf62572f0c6b67822b0788682378d0e4eac6f4704d6cc21927d892cf7cc09a539caa3accba562856c904a8f805fbaadc8d28dd104e79425a5ea40678e0
6
+ metadata.gz: 7d3f867e5616740ee7cb4ac9e2b8c3cf1f972f38c73a9ccfe09eab808a5f3d76ca71e9a42c666a602a79ab93561a24344546b9961b847c541353891626c1510d
7
+ data.tar.gz: ea90a440f7d48d92e051e05818884327323a97d5ffa91772811efd69e14701b9e3579137ec8cab82cf15f921b71b616732e68af3e51c7f1d500c6d1e6ab1974c
data/README.md CHANGED
@@ -1,29 +1,24 @@
1
- # Argosnap
2
- Argosnap is a ruby script that displays your current [tarsnap](http://www.tarsnap.com/) ballance in [picoUSD](http://www.tarsnap.com/picoUSD-why.html). The script can send notifications when the account balance falls below the predefined threshold. Argosnap supports email, [pushover](https://pushover.net/) and [OSX notifications](https://support.apple.com/en-us/HT204079).
1
+ **Argosnap** is a [tarsnap](https://www.tarsnap.com/) utility designed to send notifications when the picoUSD balance falls below a predefined threshold. Currently the following notifications methods are supported:
2
+
3
+ * [Pushover notifications.](https://pushover.net/)
4
+ * Email notifications
5
+ * [OSX notifications](https://support.apple.com/en-us/HT204079)
3
6
 
4
7
  # Installation
5
8
 
6
9
  ## Linux, *BSD and MacOSX
7
- In order to run `argosnap` you need only the [mechanize](https://github.com/sparklemotion/mechanize) gem. If you want to use receive [HTML](https://en.wikipedia.org/wiki/HTML) email notifications you are going to need the `haml` as well and `mail` gem. In case you want TXT email, you are going to need only the `mail` gem.
8
-
9
- Install the gems via rubygems:
10
-
11
- $ gem install mail mechanize haml argosnap
10
+ The main dependency is [mechanize](https://github.com/sparklemotion/mechanize). Install the gems via rubygems:
12
11
 
13
- ## MacOSX Launchd
14
- If you want to use OSX notifications, you need to instal `plist` and `terminal-notifier` too. To install the gems type:
12
+ $ gem install mail mechanize argosnap
15
13
 
16
- $ gem install mail mechanize haml plist terminal-notifier argosnap
17
-
18
- # Settings
19
14
 
20
- ## General Setup
15
+ # Setup
21
16
 
22
- After successful installation, run the following command:
17
+ Run `argosnap` to create the configuration files:
23
18
 
24
19
  $ argosnap -i config
25
20
 
26
- Argosnap will create a configuration file. You need to adjust the settings accordingly. The configuration `$HOME/.argosnap/config.yml` looks like this:
21
+ You need to edit the settings accordingly. The configuration file is located at `$HOME/.argosnap/config.yml` and looks like this:
27
22
 
28
23
  ---
29
24
  :email: tarsnap_email@domain.net
@@ -31,7 +26,7 @@ Argosnap will create a configuration file. You need to adjust the settings accor
31
26
  :threshold: 10
32
27
  :seconds: 86400
33
28
  :notifications_osx: false
34
- :notifications_email: true
29
+ :notifications_email: false
35
30
  :smtp:
36
31
  :email_delivery_method: smtp
37
32
  :smtpd_user: my_smtp_user
@@ -41,19 +36,45 @@ Argosnap will create a configuration file. You need to adjust the settings accor
41
36
  :smtpd_from: no-reply@domain.net
42
37
  :smtpd_to: user@domain.net
43
38
  :format: txt
44
- :notifications_pushover: false
39
+ :notifications_pushover: true
45
40
  :pushover:
46
41
  :key: <my-hash-key>
47
42
  :token: <app-token-key>
48
43
 
49
- You need to enable the notifications you are going to use. For example is you plan to use email notifications, you must enable them in your config like `notifications_email: true` and adjust the SMTPd settings accordingly.
50
-
51
- For more detailed info read [notifications](https://github.com/atmosx/argosnap/wiki/notifications).
44
+ You need to enable notifications to use them. See [the wiki](https://github.com/atmosx/argosnap/wiki) for details on how to setup notifications.
45
+
46
+ # Usage
47
+ Argosnap usage is straight forward:
48
+
49
+ $ argosnap -h
50
+ argosnap 0.0.4.1 ( https://github.com/atmosx/argosnap/ )
51
+ Usage: argosnap [OPTIONS]
52
+
53
+ -v: dislay version
54
+ -i config: install configuration files
55
+ -i plist: install plist file for OSX
56
+ -p: prints the current amount in picoUSD
57
+ -p clean: prints only the picollars (float rounded in 4 decimals), to use in cli
58
+ -n mail: send notification via email
59
+ -n pushover: send notification via pushover
60
+ -n osx: display osx notification
61
+ -n notify: send notifications everywhere
62
+
63
+ -v, --version display version
64
+ -i, --install [OPTION] install configuration files
65
+ -p, --print [OPTION] fetch current amount in picoUSD
66
+ -n, --notification [OPTION] send notification via email
67
+ -h, --help help
68
+
69
+ $ argosnap -p
70
+ Current picoUSD balance: 4.287
71
+ $ argosnap -p clean
72
+ 4.287
52
73
 
53
74
 
54
75
  # License
55
76
 
56
- MIT, see [License.txt](https://github.com/atmosx/argosnap/blob/master/LICENSE.txt) for details.
77
+ See [License.txt](https://github.com/atmosx/argosnap/blob/master/LICENSE.txt) for details.
57
78
 
58
79
  # Contributing
59
80
 
@@ -5,6 +5,7 @@ module Argosnap
5
5
 
6
6
  # Creates launchd script with user's variables
7
7
  def install_plist
8
+ Install.new.ensure_installation
8
9
  if configuration.gem_available?('plist')
9
10
  require 'plist'
10
11
  time_interval = configuration.data[:seconds]
@@ -42,7 +42,7 @@ module Argosnap
42
42
  puts "Configuration file created! To setup argosnap: "
43
43
  puts "1. Edit the configuration file: #{configuration.files[:config]}"
44
44
  puts "2. Run argosnap by typing in the terminal 'argosnap -p' to fetch current balance"
45
- puts "3. To configure notifications see: <link>"
45
+ puts "3. To configure notifications see: https://github.com/atmosx/argosnap/wiki"
46
46
  puts ""
47
47
 
48
48
  end
@@ -1,3 +1,3 @@
1
1
  module Argosnap
2
- VERSION = "0.0.4.1"
2
+ VERSION = "0.0.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: argosnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.1
4
+ version: 0.0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Panagiotis Atmatzidis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-24 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler