macbot 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +48 -15
- data/lib/macbot.rb +7 -3
- data/lib/macbot/metadata.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9007bf94c0644e60213ac6e69fa591a92347a6b
|
4
|
+
data.tar.gz: b4739018549c978eda3741e89885c2023248687b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95825406f0feb198c71b1f601a3ee05d36598cf108cc0816892a8be04a0ad67ec93a0e813e8311ceadee8ad6e0d94fedfc5f68733d669ed850ea52b48f7bcc8c
|
7
|
+
data.tar.gz: ffd081aaf793a230d011617e3ff80f5d1fb8eb9bb724dd09f0fbbbeb4349e419fc93d9b4f88c1e90da8c8156a86ef555fad4f7142ad78daea858ba7ce4cf61f1
|
data/README.md
CHANGED
@@ -1,34 +1,67 @@
|
|
1
1
|
# Macbot
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/macbot.svg)](http://badge.fury.io/rb/macbot)
|
4
4
|
|
5
|
-
|
5
|
+
This is a gem for better workflow on you Mac. This only works on OSX and Mail.
|
6
|
+
For now the only thing the gem does is Disable and Enables email accounts, but I have planned to add more stuff that I feel wil make it easier to balanse between work and fun on my mac.
|
7
|
+
|
8
|
+
## Why this gem?
|
9
|
+
I often found myself in the situation where I'm at work and personal email keeps flying into my mailbox, or I'm at home enjoying my weekend and work mail keeps flying in. This was really annoying, and manually disable accounts in Mail didn't cut it for me. So this is a gem you can use for disabling and enabling groups of email accounts.
|
6
10
|
|
7
11
|
## Installation
|
8
12
|
|
9
|
-
Add this line to your application's Gemfile:
|
10
13
|
|
11
|
-
|
12
|
-
gem 'macbot'
|
13
|
-
```
|
14
|
+
$ gem install macbot
|
14
15
|
|
15
|
-
|
16
|
+
$ macbot setup #creates initial yml file
|
17
|
+
## Usage
|
18
|
+
The initial setup has two groups: work and privat, but you can create your own groups and manage them as you like
|
16
19
|
|
17
|
-
|
20
|
+
### Add a group
|
18
21
|
|
19
|
-
|
22
|
+
$ macbot add --group yourGroupName
|
23
|
+
|
24
|
+
### Add email to a group
|
20
25
|
|
21
|
-
|
26
|
+
**Important:** account must be name of your emailaccount in Mail
|
22
27
|
|
23
|
-
|
28
|
+
$ macbot add --group yourGroupName --account youAccountName
|
29
|
+
|
30
|
+
### Disable/Enable accounts
|
31
|
+
|
32
|
+
If your config is the following
|
33
|
+
````yaml
|
34
|
+
work:
|
35
|
+
work1
|
36
|
+
work2
|
37
|
+
private:
|
38
|
+
private1
|
39
|
+
private2
|
40
|
+
someother:
|
41
|
+
other1
|
42
|
+
other2
|
43
|
+
````
|
44
|
+
And u simply want to enable your work accounts
|
45
|
+
|
46
|
+
$ macbot work --enable
|
47
|
+
|
48
|
+
or u want to enable your work accounts, and disable all other accounts
|
49
|
+
|
50
|
+
$ macbot work --enable --zen
|
51
|
+
|
52
|
+
or u want to disable your work accounts
|
24
53
|
|
25
|
-
|
54
|
+
$ macbot work --disable
|
55
|
+
|
56
|
+
All the commands can be found in
|
26
57
|
|
27
|
-
|
58
|
+
$ macbot --help
|
59
|
+
|
60
|
+
Commands directly to your email group
|
28
61
|
|
29
|
-
|
62
|
+
$ macbot work --help
|
63
|
+
$ macbot [group] --help
|
30
64
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
65
|
|
33
66
|
## Contributing
|
34
67
|
|
data/lib/macbot.rb
CHANGED
@@ -18,7 +18,7 @@ module Macbot
|
|
18
18
|
emails = data[type]
|
19
19
|
string = ''
|
20
20
|
string += build_string(emails, enable)
|
21
|
-
string += enable_zen(
|
21
|
+
string += enable_zen(type, enable, data) if options.zen
|
22
22
|
|
23
23
|
MAIL_START + string + MAIL_END
|
24
24
|
end
|
@@ -31,9 +31,13 @@ module Macbot
|
|
31
31
|
puts 'what?'
|
32
32
|
end
|
33
33
|
|
34
|
-
def self.enable_zen(
|
34
|
+
def self.enable_zen(type, enable, data)
|
35
35
|
puts 'enable zen mode'
|
36
|
-
|
36
|
+
string = ''
|
37
|
+
Macbot::EMAIL_GROUPS.each do |group|
|
38
|
+
string += build_string(data[group], !enable) unless group == type
|
39
|
+
end
|
40
|
+
string
|
37
41
|
end
|
38
42
|
|
39
43
|
def self.build_string(arr, enable)
|
data/lib/macbot/metadata.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hilde Vestol
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|