geturl 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/geturl +6 -3
- data/lib/geturl/geturl-sources.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e0f18d4b3348468cfd0ae0dfe0c62a1e2f0933ddfe6e01aa4ff6f6e06a4d020
|
4
|
+
data.tar.gz: eba938568e8e945a24f8792637d6b7028ada88531c6143037b9f0c0d621086b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af35429dae7b92cc07933b2c1e2b5e3899e64c7edd216c7edebe95aa9acc6929c6eb4e3effbec5309118d055602b9d291ab0a3edcb1df6b69fd90f3c8c4fc4e2
|
7
|
+
data.tar.gz: 36105018d4ba595063c1313de1838aeea938d6d15ce149cd61e5fe71fb0067f62c57567090aac1823f645d9d5be2897e9460ec1ba21e64f46a0075775400beb0
|
data/bin/geturl
CHANGED
@@ -10,7 +10,7 @@ module GetUrlCli
|
|
10
10
|
|
11
11
|
# Reads the command line and runs the selected action.
|
12
12
|
def run
|
13
|
-
flags = %w(--save --delete --reload --sources --register --unregister
|
13
|
+
flags = %w(--save --delete --reload --sources --register --unregister --help
|
14
14
|
--reload -v --show-all --match-all -a --only-urls -u --color -c --show-score)
|
15
15
|
parameters = %w(--format --sources --tags --description --template -n)
|
16
16
|
@arguments, @options = CliParser.parse(flags, parameters)
|
@@ -33,6 +33,8 @@ module GetUrlCli
|
|
33
33
|
unregister
|
34
34
|
elsif @options.include?('--show-all')
|
35
35
|
show_all
|
36
|
+
elsif @options.include?('--help')
|
37
|
+
show_usage
|
36
38
|
elsif !@arguments.empty?
|
37
39
|
search
|
38
40
|
else
|
@@ -199,10 +201,11 @@ module GetUrlCli
|
|
199
201
|
# Outputs the given item as text.
|
200
202
|
def output_item(item)
|
201
203
|
String.disable_colorization = !@options['--color']
|
202
|
-
puts item['name'].colorize(:green)
|
204
|
+
puts item['name'].colorize(:green).bold
|
203
205
|
puts item['url'].colorize(:light_blue)
|
204
206
|
puts item['description'] unless item['description'].to_s.empty?
|
205
|
-
|
207
|
+
tags = item['tags'].map { | tag | tag.colorize(:light_yellow) }
|
208
|
+
puts 'Tags: '.colorize(:white).bold + tags.join(', ') unless item['tags'].empty?
|
206
209
|
if @options['--show-score']
|
207
210
|
score = item['score']
|
208
211
|
scored_keywords = item['scored_keywords']
|
@@ -77,7 +77,7 @@ module GetUrl
|
|
77
77
|
FileManager.clean_and_save_items_to_yaml_file(data, file)
|
78
78
|
puts "Loaded #{id}" + "".ljust(5) if (options[:verbose])
|
79
79
|
rescue Exception => e
|
80
|
-
|
80
|
+
puts "Failed to load #{id}: #{e.full_message}" if (options[:verbose])
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geturl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taco Jan Osinga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|