pinpress 1.1.2 → 1.2.0

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: d7185070529faee2eb5ebac9bfc6d005c4d113e0
4
- data.tar.gz: 26790b6920af2b9902084df5c7dd6bd784011904
3
+ metadata.gz: bfc060b12d9b6e434b9d53c0b0f5c23983c9eb22
4
+ data.tar.gz: 613901577d6178ba75f4457a948ca0577a41f1ea
5
5
  SHA512:
6
- metadata.gz: 8dadda3e5c48457e5c4dc5e64cc8919a8e6b98c23090ff71e7b526479d3e91dc3e507a4b51e44d49f04c451870e4c6ba56847ce5ac1fe0b7d9edc009578b19d5
7
- data.tar.gz: 532c8aca16572c57625febb2b2ec00fb7be283a2ab88f7f4bfb188bb3cf80c3f2f201dc645dab500525e6b399d5ea077a5eb65bce426076678df3baafea45580
6
+ metadata.gz: f31b07c49c017d7b936d8124ec5229b8277a1bf5d8fa7c01587d392e34c484700aa35b8ac35d0c9e152e064670ac85726110b384b4859dc875020b7dc91212a8
7
+ data.tar.gz: aa7889fc1b6403f315db8df1a6ccd276262781116fb3afdd406fcdc1f77a503a8c370380363f42dcf864e2c54a2aa5440060df2d233b349ad02d61ae47fd9129
data/HISTORY.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 1.2.0 (2014-04-29)
2
+
3
+ * Added `ignored_tags` configuration key
4
+ * Several bugfixes
5
+
6
+ # 1.1.2 (2014-04-29)
7
+
8
+ * Added the `-t` flag to the `tags` command
9
+
1
10
  # 1.1.1 (2014-04-19)
2
11
 
3
12
  * Small bugfixes
data/README.md CHANGED
@@ -34,7 +34,7 @@ SYNOPSIS
34
34
  pinpress [global options] command [command options] [arguments...]
35
35
 
36
36
  VERSION
37
- 1.1.2
37
+ 1.2.0
38
38
 
39
39
  GLOBAL OPTIONS
40
40
  --help - Show this message
@@ -305,10 +305,23 @@ $ pinpress tags -t 'tag1,tag2' -s 2014-01-01
305
305
 
306
306
  # Other Configuration Options
307
307
 
308
- In addition to `default_pin_template` and `default_tag_template`, you can place some other special keys in the `pinpress` section of `~/.pinpress`:
308
+ You can place special keys in the `pinpress` section of `~/.pinpress` to automate some actions:
309
309
 
310
- * `default_tags`: the default tags (e.g., `'ruby,pinboard'`) to be used when getting pins or associated tags. This can be overridden by using the `-t` flag.
311
- * `default_num_results`: the default number of results to return (e.g., '5'). This can be overridden by using the `-n` flag.
310
+ ```YAML
311
+ pinpress:
312
+ # ...other keys...
313
+ default_pin_template # The default `pins` template to use
314
+ default_tag_template # The default `tags` template to use
315
+ default_tags: ['tag1', 'tag2'] # The default tags to be used when getting pins or associated tags
316
+ ignored_tags: ['bad-tag', 'bad-tag2'] # The tags to ignore when executing either `pins` or `tags`
317
+ default_num_results: 5 # The default number of results to return
318
+ # ...other keys...
319
+ ```
320
+
321
+ Do note:
322
+
323
+ * The `default_tags` key can be overridden by the `-t` flag.
324
+ * The `default_num_results` key can be overridden by the `-n` flag.
312
325
 
313
326
  # Known Issues & Future Releases
314
327
 
data/bin/pinpress CHANGED
@@ -146,11 +146,15 @@ command :pins do |c|
146
146
  end
147
147
 
148
148
  if options[:t]
149
- opts.merge!(tag: options[:t])
149
+ tags = options[:t].split(',')
150
150
  elsif configuration.pinpress[:default_tags]
151
- opts.merge!(tag: configuration.pinpress[:default_tags])
151
+ tags = configuration.pinpress[:default_tags]
152
152
  end
153
153
 
154
+ ignored_tags = configuration.pinpress[:ignored_tags]
155
+ tags -= ignored_tags if ignored_tags
156
+ opts.merge!(tag: tags) if tags
157
+
154
158
  begin
155
159
  pins = client.posts(opts)
156
160
  if !pins.empty?
@@ -203,11 +207,15 @@ command :tags do |c|
203
207
  opts.merge!(fromdt: Chronic.parse(options[:s])) if options[:s]
204
208
 
205
209
  if options[:t]
206
- opts.merge!(tag: options[:t])
210
+ tags = options[:t].split(',')
207
211
  elsif configuration.pinpress[:default_tags]
208
- opts.merge!(tag: configuration.pinpress[:default_tags])
212
+ tags = configuration.pinpress[:default_tags]
209
213
  end
210
214
 
215
+ ignored_tags = configuration.pinpress[:ignored_tags]
216
+ tags -= ignored_tags if ignored_tags
217
+ opts.merge!(tag: tags) if tags
218
+
211
219
  begin
212
220
  pins = client.posts(opts)
213
221
  pins.each { |p| tags += p[:tag] }
@@ -28,5 +28,5 @@ module PinPress
28
28
  SUMMARY = 'A simple CLI to create HTML templates of Pinboard data.'
29
29
 
30
30
  # The Gem's version
31
- VERSION = '1.1.2'
31
+ VERSION = '1.2.0'
32
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinpress
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Bach