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 +4 -4
- data/HISTORY.md +9 -0
- data/README.md +17 -4
- data/bin/pinpress +12 -4
- data/lib/pinpress/constants.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfc060b12d9b6e434b9d53c0b0f5c23983c9eb22
|
4
|
+
data.tar.gz: 613901577d6178ba75f4457a948ca0577a41f1ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f31b07c49c017d7b936d8124ec5229b8277a1bf5d8fa7c01587d392e34c484700aa35b8ac35d0c9e152e064670ac85726110b384b4859dc875020b7dc91212a8
|
7
|
+
data.tar.gz: aa7889fc1b6403f315db8df1a6ccd276262781116fb3afdd406fcdc1f77a503a8c370380363f42dcf864e2c54a2aa5440060df2d233b349ad02d61ae47fd9129
|
data/HISTORY.md
CHANGED
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.
|
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
|
-
|
308
|
+
You can place special keys in the `pinpress` section of `~/.pinpress` to automate some actions:
|
309
309
|
|
310
|
-
|
311
|
-
|
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
|
-
|
149
|
+
tags = options[:t].split(',')
|
150
150
|
elsif configuration.pinpress[:default_tags]
|
151
|
-
|
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
|
-
|
210
|
+
tags = options[:t].split(',')
|
207
211
|
elsif configuration.pinpress[:default_tags]
|
208
|
-
|
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] }
|
data/lib/pinpress/constants.rb
CHANGED