badslava2csv 0.0.4 → 0.0.5
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/VERSION +1 -1
- data/badslava2csv.gemspec +5 -4
- data/bin/badslava2csv +15 -6
- data/bin/cronjob +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 336537c69b82749fd9b9335822cbb2d2acb60f3f
|
|
4
|
+
data.tar.gz: a5bbec32e84e6472c7b86fc888d20465b0a8abce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 394308e6731a7ad0504ffed29e702f25e8ee9b816b62f4b76d6e82cf03fb89a727637b1be4d30f8dc1b00a504450298a8551dbbbf10cd7d0a59369081b7e89e7
|
|
7
|
+
data.tar.gz: fb16113abd847b1caf5564447306661e0347d45f8daafec8c6f7748f957d2a1b2a294c3c73708fd596d4108e5f9e84384f367866e49c4f1c53f4b36bb3dbabd4
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.5
|
data/badslava2csv.gemspec
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: badslava2csv 0.0.
|
|
5
|
+
# stub: badslava2csv 0.0.5 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "badslava2csv"
|
|
9
|
-
s.version = "0.0.
|
|
9
|
+
s.version = "0.0.5"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib"]
|
|
13
13
|
s.authors = ["brettshollenberger"]
|
|
14
|
-
s.date = "2017-01-
|
|
14
|
+
s.date = "2017-01-15"
|
|
15
15
|
s.description = "Import Badslava events to Google Calendar"
|
|
16
16
|
s.email = "brett.shollenberger@gmail.com"
|
|
17
|
-
s.executables = ["badslava2csv"]
|
|
17
|
+
s.executables = ["badslava2csv", "cronjob"]
|
|
18
18
|
s.extra_rdoc_files = [
|
|
19
19
|
"LICENSE.txt",
|
|
20
20
|
"README.md"
|
|
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
|
|
|
31
31
|
"badslava2csv.gemspec",
|
|
32
32
|
"badslava_import.gemspec",
|
|
33
33
|
"bin/badslava2csv",
|
|
34
|
+
"bin/cronjob",
|
|
34
35
|
"data/google.csv"
|
|
35
36
|
]
|
|
36
37
|
s.homepage = "http://github.com/brettshollenberger/badslava2csv"
|
data/bin/badslava2csv
CHANGED
|
@@ -8,11 +8,11 @@ require "pathname"
|
|
|
8
8
|
require "rake"
|
|
9
9
|
require 'optparse'
|
|
10
10
|
|
|
11
|
-
Options = Struct.new(:city, :output_dir)
|
|
11
|
+
Options = Struct.new(:city, :output_dir, :programmatic)
|
|
12
12
|
|
|
13
13
|
class Parser
|
|
14
14
|
def self.parse(options)
|
|
15
|
-
args = Options.new("San Francisco", "./data")
|
|
15
|
+
args = Options.new("San Francisco", "./data", false)
|
|
16
16
|
|
|
17
17
|
opt_parser = OptionParser.new do |opts|
|
|
18
18
|
opts.banner = "Usage: badslava2csv [options]"
|
|
@@ -25,6 +25,10 @@ class Parser
|
|
|
25
25
|
args.output_dir = output_dir
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
opts.on("-p", "--programmatic", "Output Director") do
|
|
29
|
+
args.programmatic = true
|
|
30
|
+
end
|
|
31
|
+
|
|
28
32
|
opts.on("-h", "--help", "Prints this help") do
|
|
29
33
|
puts opts
|
|
30
34
|
exit
|
|
@@ -37,10 +41,15 @@ class Parser
|
|
|
37
41
|
end
|
|
38
42
|
options = Parser.parse(ARGV)
|
|
39
43
|
|
|
40
|
-
city
|
|
41
|
-
output_dir
|
|
44
|
+
city = options.city
|
|
45
|
+
output_dir = File.expand_path(options.output_dir)
|
|
46
|
+
@programmatic = options.programmatic
|
|
47
|
+
|
|
48
|
+
def pp(msg)
|
|
49
|
+
puts msg unless @programmatic
|
|
50
|
+
end
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
pp "Listing events for #{city}"
|
|
44
53
|
|
|
45
54
|
url = "http://badslava.com/open-mics.php?city=#{URI.encode(city)}&state=CA&type=Comedy"
|
|
46
55
|
output_path = Pathname.new(output_dir)
|
|
@@ -99,4 +108,4 @@ CSV.open(path, "wb") do |csv|
|
|
|
99
108
|
end
|
|
100
109
|
end
|
|
101
110
|
|
|
102
|
-
puts path
|
|
111
|
+
puts "{path: '#{path}'}"
|
data/bin/cronjob
ADDED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: badslava2csv
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- brettshollenberger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-01-
|
|
11
|
+
date: 2017-01-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -70,6 +70,7 @@ description: Import Badslava events to Google Calendar
|
|
|
70
70
|
email: brett.shollenberger@gmail.com
|
|
71
71
|
executables:
|
|
72
72
|
- badslava2csv
|
|
73
|
+
- cronjob
|
|
73
74
|
extensions: []
|
|
74
75
|
extra_rdoc_files:
|
|
75
76
|
- LICENSE.txt
|
|
@@ -86,6 +87,7 @@ files:
|
|
|
86
87
|
- badslava2csv.gemspec
|
|
87
88
|
- badslava_import.gemspec
|
|
88
89
|
- bin/badslava2csv
|
|
90
|
+
- bin/cronjob
|
|
89
91
|
- data/google.csv
|
|
90
92
|
homepage: http://github.com/brettshollenberger/badslava2csv
|
|
91
93
|
licenses:
|