pincerna 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.rubocop.yml +77 -0
  4. data/.travis-gemfile +17 -0
  5. data/.travis.yml +7 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +3 -0
  8. data/Gemfile +23 -0
  9. data/LICENSE.md +21 -0
  10. data/README.md +211 -0
  11. data/Rakefile +45 -0
  12. data/bin/pincernad +56 -0
  13. data/docs/Pincerna.html +130 -0
  14. data/docs/Pincerna/Base.html +3051 -0
  15. data/docs/Pincerna/Bookmark.html +523 -0
  16. data/docs/Pincerna/Cache.html +767 -0
  17. data/docs/Pincerna/ChromeBookmark.html +308 -0
  18. data/docs/Pincerna/CurrencyConversion.html +589 -0
  19. data/docs/Pincerna/FirefoxBookmark.html +328 -0
  20. data/docs/Pincerna/Ip.html +1017 -0
  21. data/docs/Pincerna/Map.html +399 -0
  22. data/docs/Pincerna/SafariBookmark.html +308 -0
  23. data/docs/Pincerna/Server.html +673 -0
  24. data/docs/Pincerna/Translation.html +517 -0
  25. data/docs/Pincerna/UnitConversion.html +1042 -0
  26. data/docs/Pincerna/Version.html +189 -0
  27. data/docs/Pincerna/Vpn.html +561 -0
  28. data/docs/Pincerna/Weather.html +837 -0
  29. data/docs/_index.html +298 -0
  30. data/docs/class_list.html +54 -0
  31. data/docs/css/common.css +1 -0
  32. data/docs/css/full_list.css +57 -0
  33. data/docs/css/style.css +338 -0
  34. data/docs/file.README.html +327 -0
  35. data/docs/file_list.html +56 -0
  36. data/docs/frames.html +28 -0
  37. data/docs/index.html +327 -0
  38. data/docs/js/app.js +214 -0
  39. data/docs/js/full_list.js +178 -0
  40. data/docs/js/jquery.js +4 -0
  41. data/docs/method_list.html +389 -0
  42. data/docs/top-level-namespace.html +112 -0
  43. data/icon.png +0 -0
  44. data/images/chrome.png +0 -0
  45. data/images/currency.png +0 -0
  46. data/images/firefox.png +0 -0
  47. data/images/map.png +0 -0
  48. data/images/network.png +0 -0
  49. data/images/safari.png +0 -0
  50. data/images/translate.png +0 -0
  51. data/images/unit.png +0 -0
  52. data/images/vpn.png +0 -0
  53. data/images/weather.png +0 -0
  54. data/info.plist +961 -0
  55. data/it.cowtech.pincernad.plist +19 -0
  56. data/lib/pincerna.rb +30 -0
  57. data/lib/pincerna/base.rb +258 -0
  58. data/lib/pincerna/bookmark.rb +80 -0
  59. data/lib/pincerna/cache.rb +61 -0
  60. data/lib/pincerna/chrome_bookmark.rb +40 -0
  61. data/lib/pincerna/currency_conversion.rb +134 -0
  62. data/lib/pincerna/firefox_bookmark.rb +92 -0
  63. data/lib/pincerna/ip.rb +135 -0
  64. data/lib/pincerna/map.rb +30 -0
  65. data/lib/pincerna/safari_bookmark.rb +40 -0
  66. data/lib/pincerna/server.rb +85 -0
  67. data/lib/pincerna/translation.rb +67 -0
  68. data/lib/pincerna/unit_conversion.rb +120 -0
  69. data/lib/pincerna/version.rb +24 -0
  70. data/lib/pincerna/vpn.rb +74 -0
  71. data/lib/pincerna/weather.rb +188 -0
  72. data/pincerna.alfredworkflow +0 -0
  73. data/pincerna.gemspec +36 -0
  74. data/pincerna.sh +9 -0
  75. data/spec/cassettes/Pincerna_CurrencyConversion/_perform_filtering/should_return_valid_values.yml +38 -0
  76. data/spec/cassettes/Pincerna_Ip/_get_local_addresses/should_return_a_list_of_addresses.yml +47 -0
  77. data/spec/cassettes/Pincerna_Ip/_get_public_address/should_return_public_IP_address.yml +44 -0
  78. data/spec/cassettes/Pincerna_Translation/_perform_filtering/should_default_from_English_to_the_given_language_when_only_one_is_present.yml +124 -0
  79. data/spec/cassettes/Pincerna_Translation/_perform_filtering/should_query_Google_Translate_for_sentences_returning_no_alternatives.yml +51 -0
  80. data/spec/cassettes/Pincerna_Translation/_perform_filtering/should_query_Google_Translate_for_single_words.yml +71 -0
  81. data/spec/cassettes/Pincerna_Weather/_get_forecast/should_append_name.yml +177 -0
  82. data/spec/cassettes/Pincerna_Weather/_get_forecast/should_get_correct_forecasts.yml +339 -0
  83. data/spec/cassettes/Pincerna_Weather/_lookup_places/should_return_an_existing_WOEID_without_making_any_request.yml +56 -0
  84. data/spec/cassettes/Pincerna_Weather/_lookup_places/should_search_for_places.yml +189 -0
  85. data/spec/cassettes/Pincerna_Weather/_perform_filtering/should_get_forecast.yml +56 -0
  86. data/spec/coverage_helper.rb +44 -0
  87. data/spec/pincerna/base_spec.rb +166 -0
  88. data/spec/pincerna/bookmark_spec.rb +65 -0
  89. data/spec/pincerna/cache_spec.rb +88 -0
  90. data/spec/pincerna/chrome_bookmark_spec.rb +114 -0
  91. data/spec/pincerna/currency_conversion_spec.rb +46 -0
  92. data/spec/pincerna/firefox_bookmark_spec.rb +46 -0
  93. data/spec/pincerna/ip_spec.rb +194 -0
  94. data/spec/pincerna/map_spec.rb +24 -0
  95. data/spec/pincerna/safari_bookmark_spec.rb +237 -0
  96. data/spec/pincerna/server_spec.rb +108 -0
  97. data/spec/pincerna/translation_spec.rb +55 -0
  98. data/spec/pincerna/unit_conversion_spec.rb +98 -0
  99. data/spec/pincerna/vpn_spec.rb +68 -0
  100. data/spec/pincerna/weather_spec.rb +131 -0
  101. data/spec/spec_helper.rb +48 -0
  102. metadata +283 -0
@@ -0,0 +1,327 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>
7
+ File: README
8
+
9
+ &mdash; Documentation by YARD 0.8.7
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index</a> &raquo;
35
+ <span class="title">File: README</span>
36
+
37
+
38
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
39
+ </div>
40
+
41
+ <div id="search">
42
+
43
+ <a class="full_list_link" id="class_list_link"
44
+ href="class_list.html">
45
+ Class List
46
+ </a>
47
+
48
+ <a class="full_list_link" id="method_list_link"
49
+ href="method_list.html">
50
+ Method List
51
+ </a>
52
+
53
+ <a class="full_list_link" id="file_list_link"
54
+ href="file_list.html">
55
+ File List
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame"></iframe>
63
+
64
+ <div id="content"><div id='filecontents'><h1 id="pincerna">pincerna</h1>
65
+
66
+ <p><a href="http://badge.fury.io/rb/pincerna"><img src="https://badge.fury.io/rb/pincerna.png" alt="Gem Version" /></a>
67
+ <a href="https://gemnasium.com/ShogunPanda/pincerna"><img src="https://gemnasium.com/ShogunPanda/pincerna.png?travis" alt="Dependency Status" /></a>
68
+ <a href="https://travis-ci.org/ShogunPanda/pincerna"><img src="https://secure.travis-ci.org/ShogunPanda/pincerna.png?branch=master" alt="Build Status" /></a>
69
+ <a href="https://codeclimate.com/github/ShogunPanda/pincerna"><img src="https://codeclimate.com/github/ShogunPanda/pincerna.png" alt="Code Climate" /></a>
70
+ <a href="https://coveralls.io/github/ShogunPanda/pincerna?branch=master"><img src="https://coveralls.io/repos/github/ShogunPanda/pincerna/badge.svg?branch=master" alt="Coverage Status" /></a></p>
71
+
72
+ <p>A bunch of useful Alfred 2 workflows.</p>
73
+
74
+ <p>https://sw.cowtech.it/pincerna</p>
75
+
76
+ <h2 id="installation">Installation</h2>
77
+
78
+ <h3 id="preparation-of-the-environment">Preparation of the environment</h3>
79
+
80
+ <h4 id="users-of-macosx-mavericks">Users of MacOSX Mavericks</h4>
81
+
82
+ <p>On OSX Mountain Lion (10.9), the default Ruby version is 2.0.0, so no additional steps are required.</p>
83
+
84
+ <h4 id="users-of-macosx-mountain-lion-and-older">Users of MacOSX Mountain Lion and older</h4>
85
+
86
+ <p>On OSX Mountain Lion (10.8) and older, the default Ruby version is 1.8.7.</p>
87
+
88
+ <p>This version is really older and no longer maintained. Pincerna requires at least Ruby 1.9 and works on 2.0 too.</p>
89
+
90
+ <p>The scripts support using <a href="https://rvm.io/">rvm</a> for loading a new Ruby version. To install, check its documentation. In short, it should resolv to these steps:</p>
91
+
92
+ <pre class="code ruby"><code class="ruby">\curl -L https://get.rvm.io | sudo bash -s stable
93
+ rvm install [1.9.3|2.0.0]
94
+ rvm use [1.9.3|2.0.0] --default
95
+ </code></pre>
96
+
97
+ <h3 id="installation-of-the-gem-and-the-workflow">Installation of the gem and the workflow</h3>
98
+
99
+ <p>From the terminal:</p>
100
+
101
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_i'>i</span> <span class='id identifier rubyid_pincerna'>pincerna</span>
102
+ <span class='id identifier rubyid_pincernad'>pincernad</span> <span class='id identifier rubyid_install'>install</span>
103
+ </code></pre>
104
+
105
+ <h2 id="uninstallation">Uninstallation</h2>
106
+
107
+ <p>From the terminal:</p>
108
+
109
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_pincernad'>pincernad</span> <span class='id identifier rubyid_uninstall'>uninstall</span>
110
+ <span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_uni'>uni</span> <span class='id identifier rubyid_pincerna'>pincerna</span>
111
+ </code></pre>
112
+
113
+ <p>Then remove the workflow from Alfred settings.</p>
114
+
115
+ <h2 id="usage">Usage</h2>
116
+
117
+ <p>Pincerna supports many shortcut which will save your work. Here’s the comprehensive list.</p>
118
+
119
+ <h3 id="unit-conversion">Unit conversion</h3>
120
+
121
+ <p>Thanks to the <a href="http://github.com/olbrich/ruby-units">ruby-units</a> gem, you can convert values between units.</p>
122
+
123
+ <p>The recognized syntaxes are:</p>
124
+
125
+ <ul>
126
+ <li><code>convert 123 $FROM_UNIT to $TO_UNIT</code></li>
127
+ <li><code>c 123.45 $FROM_UNIT to $TO_UNIT</code></li>
128
+ </ul>
129
+
130
+ <p><code>to</code> can be omitted. Actioning on the result will copy the result to the clipboard.</p>
131
+
132
+ <p>If <code>with rate</code> is appended, also the conversion rate will be copied as well.</p>
133
+
134
+ <p>If <code>split units</code> is appended, the value in feet will be shown in <code>X ft Y in</code> form, pounds (lbs) or ounces (oz) will be shown in <code>X lbs Y oz</code> form.</p>
135
+
136
+ <p>Examples:</p>
137
+
138
+ <ul>
139
+ <li><code>convert 123.45 m to m</code></li>
140
+ <li><code>c 123 kg oz with rate split units</code></li>
141
+ </ul>
142
+
143
+ <h3 id="currency-conversion">Currency conversion</h3>
144
+
145
+ <p>Thanks to the <a href="http://rate-exchange.appspot.com/">rate-exchange API</a>, you can convert values between currencies.</p>
146
+
147
+ <p>The recognized syntaxes are:</p>
148
+
149
+ <ul>
150
+ <li><code>currency 123 $FROM_CURRENCY to $TO_CURRENCY</code></li>
151
+ <li><code>cc 123.45 $FROM_CURRENCY to $TO_CURRENCY</code></li>
152
+ </ul>
153
+
154
+ <p><code>to</code> can be omitted. Actioning on the result will copy the result to the clipboard.</p>
155
+
156
+ <p>If <code>with rate</code> is appended, also the conversion rate will be copied as well.</p>
157
+
158
+ <p>Examples:</p>
159
+
160
+ <ul>
161
+ <li><code>currency 123.45 EUR to USD</code></li>
162
+ <li><code>cc 123 EUR JPY with rate</code></li>
163
+ <li><code>cc 123 € $ with rate</code></li>
164
+ </ul>
165
+
166
+ <h3 id="translation-with-google-translate">Translation with Google Translate</h3>
167
+
168
+ <p>You can translate words or sentences between languages using <a href="http://translate.google.com/">Google Translate</a>.</p>
169
+
170
+ <p>The recognized syntax is:</p>
171
+
172
+ <ul>
173
+ <li><code>translate $FROM_LANGUAGE to $TO_LANGUAGE $TEXT</code></li>
174
+ <li><code>t $FROM_LANGUAGE to $TO_LANGUAGE $TEXT</code></li>
175
+ </ul>
176
+
177
+ <p><code>to</code> can be omitted. Actioning on the result will copy the first result to the clipboard.</p>
178
+
179
+ <p><code>$FROM_LANGUAGE</code> can also be omitted as well, will default to <code>en</code>.</p>
180
+
181
+ <p>Examples:</p>
182
+
183
+ <ul>
184
+ <li><code>translate it to en Ciao mondo</code></li>
185
+ <li><code>t it en Ciao mondo</code></li>
186
+ <li><code>t it Hello</code></li>
187
+ </ul>
188
+
189
+ <h3 id="view-location-in-google-maps">View location in Google Maps</h3>
190
+
191
+ <p>You can view locations on <a href="http://maps.google.com">Google Maps</a>.</p>
192
+
193
+ <p>The recognized syntax is:</p>
194
+
195
+ <ul>
196
+ <li><code>map $LOCATION</code></li>
197
+ <li><code>m $LOCATION</code></li>
198
+ </ul>
199
+
200
+ <p>Actioning on the result will open the location in Google Maps on the default browser.</p>
201
+
202
+ <p>Examples:</p>
203
+
204
+ <ul>
205
+ <li><code>map Campobasso, Italy</code></li>
206
+ <li><code>m San Mateo, CA</code></li>
207
+ <li><code>m 12.34,56.78</code></li>
208
+ </ul>
209
+
210
+ <h3 id="yahoo-weather-forecast">Yahoo! Weather Forecast</h3>
211
+
212
+ <p>You can view the current weather condition and tomorrow’s forecast on <a href="http://weather.yahoo.com">Yahoo! Weather</a>.</p>
213
+
214
+ <p>The recognized syntax is:</p>
215
+
216
+ <ul>
217
+ <li><code>forecast $LOCATION</code></li>
218
+ </ul>
219
+
220
+ <p>The location can be a name or a WOEID. Actioning on the result will open the forecast in Yahoo! Weather on the default browser.</p>
221
+
222
+ <p>Examples:</p>
223
+
224
+ <ul>
225
+ <li><code>forecast San Mateo</code></li>
226
+ <li><code>forecast 2406170</code></li>
227
+ </ul>
228
+
229
+ <h3 id="fetch-the-list-of-local-and-public-ip">Fetch the list of local and public IP</h3>
230
+
231
+ <p>You can view the list of all IP address of the current machine, including the public IP (thanks to <a href="http://exip.org">exip.org</a>). Both IPv4 and IPv6 are supported.</p>
232
+
233
+ <p>The recognized syntax is:</p>
234
+
235
+ <ul>
236
+ <li><code>ip $INTERFACE</code></li>
237
+ </ul>
238
+
239
+ <p><code>$INTERFACE</code> is optional and it is only used to filter results (use <code>public</code> to get only the public IP).</p>
240
+
241
+ <p>Actioning on the results will copy the IP on the clipboard.</p>
242
+
243
+ <p>Examples:</p>
244
+
245
+ <ul>
246
+ <li><code>ip</code></li>
247
+ <li><code>ip Ethernet</code></li>
248
+ <li><code>ip lo0</code></li>
249
+ <li><code>ip public</code></li>
250
+ </ul>
251
+
252
+ <h3 id="connect-or-disconnect-from-vpns">Connect or disconnect from VPNs</h3>
253
+
254
+ <p>You can connect or disconnect from your VPNs.</p>
255
+
256
+ <p>The recognized syntax is:</p>
257
+
258
+ <ul>
259
+ <li><code>vpn $NAME</code></li>
260
+ </ul>
261
+
262
+ <p><code>$NAME</code> is optional and it is only used to filter results.</p>
263
+
264
+ <p>Examples:</p>
265
+
266
+ <ul>
267
+ <li><code>vpn</code></li>
268
+ <li><code>vpn Office</code></li>
269
+ </ul>
270
+
271
+ <h3 id="open-chrome-firefox-or-safari-bookmarks">Open Chrome, Firefox or Safari bookmarks</h3>
272
+
273
+ <p>You can search and open your Chrome, Firefox or Safari bookmarks and open in the respective browsers.</p>
274
+
275
+ <p>The recognized syntax is:</p>
276
+
277
+ <ul>
278
+ <li><code>bc $NAME</code> for Chrome</li>
279
+ <li><code>bs $NAME</code> for Safari</li>
280
+ <li><code>bf $NAME</code> for Firefox</li>
281
+ </ul>
282
+
283
+ <p><code>$NAME</code> is optional and it is only used to filter results.</p>
284
+
285
+ <p>Examples:</p>
286
+
287
+ <ul>
288
+ <li><code>bc Google</code></li>
289
+ <li><code>bf Google</code></li>
290
+ <li><code>bs Google</code></li>
291
+ </ul>
292
+
293
+ <p>Actioning on the results will open the bookmark in the browser. Note that this won’t use the default browser but the one the bookmarks belongs to.</p>
294
+
295
+ <h2 id="api-documentation">API Documentation</h2>
296
+
297
+ <p>The API documentation can be found <a href="https://sw.cowtech.it/pincerna/docs">here</a>.</p>
298
+
299
+ <h2 id="contributing-to-pincerna">Contributing to pincerna</h2>
300
+
301
+ <ul>
302
+ <li>Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.</li>
303
+ <li>Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.</li>
304
+ <li>Fork the project.</li>
305
+ <li>Start a feature/bugfix branch.</li>
306
+ <li>Commit and push until you are happy with your contribution.</li>
307
+ <li>Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.</li>
308
+ <li>Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.</li>
309
+ </ul>
310
+
311
+ <h2 id="copyright">Copyright</h2>
312
+
313
+ <p>Copyright (C) 2013 and above Shogun (shogun@cowtech.it).</p>
314
+
315
+ <p>Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.</p>
316
+
317
+ <p>The icons used are by the <a href="http://chrisbanks2.deviantart.com/art/Cold-Fusion-HD-Icon-Pack-277808597">Cold Fusion HD set</a> by <em>chrisbanks2</em>.</p>
318
+ </div></div>
319
+
320
+ <div id="footer">
321
+ Generated on Thu Aug 18 15:50:04 2016 by
322
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
323
+ 0.8.7 (ruby-2.3.0).
324
+ </div>
325
+
326
+ </body>
327
+ </html>
@@ -0,0 +1,56 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>File List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <script type="text/javascript" charset="utf-8">
23
+ if (window.top.frames.main) {
24
+ document.getElementById('base_target').target = 'main';
25
+ document.body.className = 'frames';
26
+ }
27
+ </script>
28
+ <div id="content">
29
+ <h1 id="full_list_header">File List</h1>
30
+ <div id="nav">
31
+
32
+ <span><a target="_self" href="class_list.html">
33
+ Classes
34
+ </a></span>
35
+
36
+ <span><a target="_self" href="method_list.html">
37
+ Methods
38
+ </a></span>
39
+
40
+ <span><a target="_self" href="file_list.html">
41
+ Files
42
+ </a></span>
43
+
44
+ </div>
45
+ <div id="search">Search: <input type="text" /></div>
46
+
47
+ <ul id="full_list" class="file">
48
+
49
+
50
+ <li class="r1"><span class="object_link"><a href="index.html" title="README">README</a></a></li>
51
+
52
+
53
+ </ul>
54
+ </div>
55
+ </body>
56
+ </html>
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
+ <title>Documentation by YARD 0.8.7</title>
8
+ </head>
9
+ <script type="text/javascript" charset="utf-8">
10
+ window.onload = function() {
11
+ var match = window.location.hash.match(/^#!(.+)/);
12
+ var name = 'index.html';
13
+ if (match) {
14
+ name = unescape(match[1]);
15
+ }
16
+ document.writeln('<frameset cols="20%,*">' +
17
+ '<frame name="list" src="class_list.html" />' +
18
+ '<frame name="main" src="' + name + '" />' +
19
+ '</frameset>');
20
+ }
21
+ </script>
22
+ <noscript>
23
+ <frameset cols="20%,*">
24
+ <frame name="list" src="class_list.html" />
25
+ <frame name="main" src="index.html" />
26
+ </frameset>
27
+ </noscript>
28
+ </html>
@@ -0,0 +1,327 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>
7
+ File: README
8
+
9
+ &mdash; Documentation by YARD 0.8.7
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index</a> &raquo;
35
+ <span class="title">File: README</span>
36
+
37
+
38
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
39
+ </div>
40
+
41
+ <div id="search">
42
+
43
+ <a class="full_list_link" id="class_list_link"
44
+ href="class_list.html">
45
+ Class List
46
+ </a>
47
+
48
+ <a class="full_list_link" id="method_list_link"
49
+ href="method_list.html">
50
+ Method List
51
+ </a>
52
+
53
+ <a class="full_list_link" id="file_list_link"
54
+ href="file_list.html">
55
+ File List
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame"></iframe>
63
+
64
+ <div id="content"><div id='filecontents'><h1 id="pincerna">pincerna</h1>
65
+
66
+ <p><a href="http://badge.fury.io/rb/pincerna"><img src="https://badge.fury.io/rb/pincerna.png" alt="Gem Version" /></a>
67
+ <a href="https://gemnasium.com/ShogunPanda/pincerna"><img src="https://gemnasium.com/ShogunPanda/pincerna.png?travis" alt="Dependency Status" /></a>
68
+ <a href="https://travis-ci.org/ShogunPanda/pincerna"><img src="https://secure.travis-ci.org/ShogunPanda/pincerna.png?branch=master" alt="Build Status" /></a>
69
+ <a href="https://codeclimate.com/github/ShogunPanda/pincerna"><img src="https://codeclimate.com/github/ShogunPanda/pincerna.png" alt="Code Climate" /></a>
70
+ <a href="https://coveralls.io/github/ShogunPanda/pincerna?branch=master"><img src="https://coveralls.io/repos/github/ShogunPanda/pincerna/badge.svg?branch=master" alt="Coverage Status" /></a></p>
71
+
72
+ <p>A bunch of useful Alfred 2 workflows.</p>
73
+
74
+ <p>https://sw.cowtech.it/pincerna</p>
75
+
76
+ <h2 id="installation">Installation</h2>
77
+
78
+ <h3 id="preparation-of-the-environment">Preparation of the environment</h3>
79
+
80
+ <h4 id="users-of-macosx-mavericks">Users of MacOSX Mavericks</h4>
81
+
82
+ <p>On OSX Mountain Lion (10.9), the default Ruby version is 2.0.0, so no additional steps are required.</p>
83
+
84
+ <h4 id="users-of-macosx-mountain-lion-and-older">Users of MacOSX Mountain Lion and older</h4>
85
+
86
+ <p>On OSX Mountain Lion (10.8) and older, the default Ruby version is 1.8.7.</p>
87
+
88
+ <p>This version is really older and no longer maintained. Pincerna requires at least Ruby 1.9 and works on 2.0 too.</p>
89
+
90
+ <p>The scripts support using <a href="https://rvm.io/">rvm</a> for loading a new Ruby version. To install, check its documentation. In short, it should resolv to these steps:</p>
91
+
92
+ <pre class="code ruby"><code class="ruby">\curl -L https://get.rvm.io | sudo bash -s stable
93
+ rvm install [1.9.3|2.0.0]
94
+ rvm use [1.9.3|2.0.0] --default
95
+ </code></pre>
96
+
97
+ <h3 id="installation-of-the-gem-and-the-workflow">Installation of the gem and the workflow</h3>
98
+
99
+ <p>From the terminal:</p>
100
+
101
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_i'>i</span> <span class='id identifier rubyid_pincerna'>pincerna</span>
102
+ <span class='id identifier rubyid_pincernad'>pincernad</span> <span class='id identifier rubyid_install'>install</span>
103
+ </code></pre>
104
+
105
+ <h2 id="uninstallation">Uninstallation</h2>
106
+
107
+ <p>From the terminal:</p>
108
+
109
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_pincernad'>pincernad</span> <span class='id identifier rubyid_uninstall'>uninstall</span>
110
+ <span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_uni'>uni</span> <span class='id identifier rubyid_pincerna'>pincerna</span>
111
+ </code></pre>
112
+
113
+ <p>Then remove the workflow from Alfred settings.</p>
114
+
115
+ <h2 id="usage">Usage</h2>
116
+
117
+ <p>Pincerna supports many shortcut which will save your work. Here’s the comprehensive list.</p>
118
+
119
+ <h3 id="unit-conversion">Unit conversion</h3>
120
+
121
+ <p>Thanks to the <a href="http://github.com/olbrich/ruby-units">ruby-units</a> gem, you can convert values between units.</p>
122
+
123
+ <p>The recognized syntaxes are:</p>
124
+
125
+ <ul>
126
+ <li><code>convert 123 $FROM_UNIT to $TO_UNIT</code></li>
127
+ <li><code>c 123.45 $FROM_UNIT to $TO_UNIT</code></li>
128
+ </ul>
129
+
130
+ <p><code>to</code> can be omitted. Actioning on the result will copy the result to the clipboard.</p>
131
+
132
+ <p>If <code>with rate</code> is appended, also the conversion rate will be copied as well.</p>
133
+
134
+ <p>If <code>split units</code> is appended, the value in feet will be shown in <code>X ft Y in</code> form, pounds (lbs) or ounces (oz) will be shown in <code>X lbs Y oz</code> form.</p>
135
+
136
+ <p>Examples:</p>
137
+
138
+ <ul>
139
+ <li><code>convert 123.45 m to m</code></li>
140
+ <li><code>c 123 kg oz with rate split units</code></li>
141
+ </ul>
142
+
143
+ <h3 id="currency-conversion">Currency conversion</h3>
144
+
145
+ <p>Thanks to the <a href="http://rate-exchange.appspot.com/">rate-exchange API</a>, you can convert values between currencies.</p>
146
+
147
+ <p>The recognized syntaxes are:</p>
148
+
149
+ <ul>
150
+ <li><code>currency 123 $FROM_CURRENCY to $TO_CURRENCY</code></li>
151
+ <li><code>cc 123.45 $FROM_CURRENCY to $TO_CURRENCY</code></li>
152
+ </ul>
153
+
154
+ <p><code>to</code> can be omitted. Actioning on the result will copy the result to the clipboard.</p>
155
+
156
+ <p>If <code>with rate</code> is appended, also the conversion rate will be copied as well.</p>
157
+
158
+ <p>Examples:</p>
159
+
160
+ <ul>
161
+ <li><code>currency 123.45 EUR to USD</code></li>
162
+ <li><code>cc 123 EUR JPY with rate</code></li>
163
+ <li><code>cc 123 € $ with rate</code></li>
164
+ </ul>
165
+
166
+ <h3 id="translation-with-google-translate">Translation with Google Translate</h3>
167
+
168
+ <p>You can translate words or sentences between languages using <a href="http://translate.google.com/">Google Translate</a>.</p>
169
+
170
+ <p>The recognized syntax is:</p>
171
+
172
+ <ul>
173
+ <li><code>translate $FROM_LANGUAGE to $TO_LANGUAGE $TEXT</code></li>
174
+ <li><code>t $FROM_LANGUAGE to $TO_LANGUAGE $TEXT</code></li>
175
+ </ul>
176
+
177
+ <p><code>to</code> can be omitted. Actioning on the result will copy the first result to the clipboard.</p>
178
+
179
+ <p><code>$FROM_LANGUAGE</code> can also be omitted as well, will default to <code>en</code>.</p>
180
+
181
+ <p>Examples:</p>
182
+
183
+ <ul>
184
+ <li><code>translate it to en Ciao mondo</code></li>
185
+ <li><code>t it en Ciao mondo</code></li>
186
+ <li><code>t it Hello</code></li>
187
+ </ul>
188
+
189
+ <h3 id="view-location-in-google-maps">View location in Google Maps</h3>
190
+
191
+ <p>You can view locations on <a href="http://maps.google.com">Google Maps</a>.</p>
192
+
193
+ <p>The recognized syntax is:</p>
194
+
195
+ <ul>
196
+ <li><code>map $LOCATION</code></li>
197
+ <li><code>m $LOCATION</code></li>
198
+ </ul>
199
+
200
+ <p>Actioning on the result will open the location in Google Maps on the default browser.</p>
201
+
202
+ <p>Examples:</p>
203
+
204
+ <ul>
205
+ <li><code>map Campobasso, Italy</code></li>
206
+ <li><code>m San Mateo, CA</code></li>
207
+ <li><code>m 12.34,56.78</code></li>
208
+ </ul>
209
+
210
+ <h3 id="yahoo-weather-forecast">Yahoo! Weather Forecast</h3>
211
+
212
+ <p>You can view the current weather condition and tomorrow’s forecast on <a href="http://weather.yahoo.com">Yahoo! Weather</a>.</p>
213
+
214
+ <p>The recognized syntax is:</p>
215
+
216
+ <ul>
217
+ <li><code>forecast $LOCATION</code></li>
218
+ </ul>
219
+
220
+ <p>The location can be a name or a WOEID. Actioning on the result will open the forecast in Yahoo! Weather on the default browser.</p>
221
+
222
+ <p>Examples:</p>
223
+
224
+ <ul>
225
+ <li><code>forecast San Mateo</code></li>
226
+ <li><code>forecast 2406170</code></li>
227
+ </ul>
228
+
229
+ <h3 id="fetch-the-list-of-local-and-public-ip">Fetch the list of local and public IP</h3>
230
+
231
+ <p>You can view the list of all IP address of the current machine, including the public IP (thanks to <a href="http://exip.org">exip.org</a>). Both IPv4 and IPv6 are supported.</p>
232
+
233
+ <p>The recognized syntax is:</p>
234
+
235
+ <ul>
236
+ <li><code>ip $INTERFACE</code></li>
237
+ </ul>
238
+
239
+ <p><code>$INTERFACE</code> is optional and it is only used to filter results (use <code>public</code> to get only the public IP).</p>
240
+
241
+ <p>Actioning on the results will copy the IP on the clipboard.</p>
242
+
243
+ <p>Examples:</p>
244
+
245
+ <ul>
246
+ <li><code>ip</code></li>
247
+ <li><code>ip Ethernet</code></li>
248
+ <li><code>ip lo0</code></li>
249
+ <li><code>ip public</code></li>
250
+ </ul>
251
+
252
+ <h3 id="connect-or-disconnect-from-vpns">Connect or disconnect from VPNs</h3>
253
+
254
+ <p>You can connect or disconnect from your VPNs.</p>
255
+
256
+ <p>The recognized syntax is:</p>
257
+
258
+ <ul>
259
+ <li><code>vpn $NAME</code></li>
260
+ </ul>
261
+
262
+ <p><code>$NAME</code> is optional and it is only used to filter results.</p>
263
+
264
+ <p>Examples:</p>
265
+
266
+ <ul>
267
+ <li><code>vpn</code></li>
268
+ <li><code>vpn Office</code></li>
269
+ </ul>
270
+
271
+ <h3 id="open-chrome-firefox-or-safari-bookmarks">Open Chrome, Firefox or Safari bookmarks</h3>
272
+
273
+ <p>You can search and open your Chrome, Firefox or Safari bookmarks and open in the respective browsers.</p>
274
+
275
+ <p>The recognized syntax is:</p>
276
+
277
+ <ul>
278
+ <li><code>bc $NAME</code> for Chrome</li>
279
+ <li><code>bs $NAME</code> for Safari</li>
280
+ <li><code>bf $NAME</code> for Firefox</li>
281
+ </ul>
282
+
283
+ <p><code>$NAME</code> is optional and it is only used to filter results.</p>
284
+
285
+ <p>Examples:</p>
286
+
287
+ <ul>
288
+ <li><code>bc Google</code></li>
289
+ <li><code>bf Google</code></li>
290
+ <li><code>bs Google</code></li>
291
+ </ul>
292
+
293
+ <p>Actioning on the results will open the bookmark in the browser. Note that this won’t use the default browser but the one the bookmarks belongs to.</p>
294
+
295
+ <h2 id="api-documentation">API Documentation</h2>
296
+
297
+ <p>The API documentation can be found <a href="https://sw.cowtech.it/pincerna/docs">here</a>.</p>
298
+
299
+ <h2 id="contributing-to-pincerna">Contributing to pincerna</h2>
300
+
301
+ <ul>
302
+ <li>Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.</li>
303
+ <li>Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.</li>
304
+ <li>Fork the project.</li>
305
+ <li>Start a feature/bugfix branch.</li>
306
+ <li>Commit and push until you are happy with your contribution.</li>
307
+ <li>Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.</li>
308
+ <li>Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.</li>
309
+ </ul>
310
+
311
+ <h2 id="copyright">Copyright</h2>
312
+
313
+ <p>Copyright (C) 2013 and above Shogun (shogun@cowtech.it).</p>
314
+
315
+ <p>Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.</p>
316
+
317
+ <p>The icons used are by the <a href="http://chrisbanks2.deviantart.com/art/Cold-Fusion-HD-Icon-Pack-277808597">Cold Fusion HD set</a> by <em>chrisbanks2</em>.</p>
318
+ </div></div>
319
+
320
+ <div id="footer">
321
+ Generated on Thu Aug 18 15:50:04 2016 by
322
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
323
+ 0.8.7 (ruby-2.3.0).
324
+ </div>
325
+
326
+ </body>
327
+ </html>