brand2csv 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.1.3 22.05.2013
2
+
3
+ * Updated Manifest.txt to include bin/brand2csv
4
+
1
5
  === 0.1.2 / 22.05.2013
2
6
 
3
7
  * Added forgotton bin/brand2csv
data/Manifest.txt CHANGED
@@ -8,6 +8,7 @@ LICENSE
8
8
  Manifest.txt
9
9
  README.md
10
10
  Rakefile
11
+ bin/brand2csv
11
12
  lib/brand2csv.rb
12
13
  lib/brand2csv/version.rb
13
14
  protocol.2013.05.12.textile
data/bin/brand2csv ADDED
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pathname'
4
+ root = Pathname.new(__FILE__).realpath.parent.parent
5
+ $:.unshift root.join('lib') if $0 == __FILE__
6
+
7
+ require 'optparse'
8
+ require 'brand2csv'
9
+
10
+ def help
11
+ <<EOS
12
+ #$0 ver.#{Brand2csv::VERSION}
13
+ Usage:
14
+ #{File.basename(__FILE__)} timespan
15
+ Find all brands registered in switzerland during the given timespan.
16
+ The following examples valid timespan periods:
17
+ 1.10.2005
18
+ 1.10.2005-31.10.2005
19
+ 1.10.2005, 5.10.2005-31.10.2005
20
+ The results are stored in the file ausgabe.csv.
21
+ The trademark name is either a real brand name or a link to an image.
22
+ EOS
23
+ end
24
+
25
+ parser = OptionParser.new
26
+ opts = {}
27
+ parser.on_tail('-h', '--help') { puts help; exit }
28
+
29
+ args = ARGV.dup
30
+ begin
31
+ parser.parse!(args)
32
+ rescue OptionParser::MissingArgument,
33
+ OptionParser::InvalidArgument,
34
+ OptionParser::InvalidOption
35
+ puts help
36
+ exit 1
37
+ end
38
+
39
+
40
+ unless args.size == 1
41
+ puts help
42
+ exit 1
43
+ end
44
+
45
+ begin
46
+ Brand2csv::run(args[0])
47
+ rescue Interrupt
48
+ puts "Unterbrochen. Breche mit Fehler ab"
49
+ exit 1
50
+ end
51
+
52
+ puts "#{__FILE__} completed successfully" if $VERBOSE
@@ -1,3 +1,3 @@
1
1
  module Brand2csv
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brand2csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -95,7 +95,8 @@ description: ! "brand2csv creates csv files for swiss brand registered in a spec
95
95
  time period. \n The csv contains the brand, link to image (if present), link to
96
96
  the detailinfo at swissreg.ch, name and address of owner (Inhaber)"
97
97
  email: yasaka@ywesee.com, zdavatz@ywesee.com
98
- executables: []
98
+ executables:
99
+ - brand2csv
99
100
  extensions: []
100
101
  extra_rdoc_files:
101
102
  - History.txt
@@ -113,6 +114,7 @@ files:
113
114
  - Manifest.txt
114
115
  - README.md
115
116
  - Rakefile
117
+ - bin/brand2csv
116
118
  - lib/brand2csv.rb
117
119
  - lib/brand2csv/version.rb
118
120
  - protocol.2013.05.12.textile