geturl 0.6.1 → 0.7.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
  SHA256:
3
- metadata.gz: a275a154fd86d5f7952ffacc831fc766e6a39bf94c8365122c541a75ff3e22ec
4
- data.tar.gz: e590599e8cde60e3a014248a1a0d4807f72670d04afa0c46ccc35141aae9ad28
3
+ metadata.gz: 8e0f18d4b3348468cfd0ae0dfe0c62a1e2f0933ddfe6e01aa4ff6f6e06a4d020
4
+ data.tar.gz: eba938568e8e945a24f8792637d6b7028ada88531c6143037b9f0c0d621086b6
5
5
  SHA512:
6
- metadata.gz: 5c7b21208317533078698f3e992d757823b0bfe198ce16e6712acc41c7c1a1feafb7df5cc3e2653f9c59a67b40842e212ad7cfc5fc68ac4e593498dfd4d0284b
7
- data.tar.gz: de66fa18062213acabd6b31acae292b90e81a7f01bde97a1fb12348f5aeb94e7f3d385534d53f1d2b7b66b69736c36af8b56b054264eea2b9c83af259d1e71ad
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
- puts 'Tags: ' + item['tags'].join(', ').colorize(:gray) unless item['tags'].empty?
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
- puts "Failed to load #{id}: #{e.message}" if (options[:verbose])
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.6.1
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-20 00:00:00.000000000 Z
11
+ date: 2019-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize