chimps_fb_analyzer 0.0.1 → 0.0.2
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/Sam_Schock_2_stats.csv +2173 -0
- data/Sam_Schock_stats.csv +2177 -0
- data/bin/chimps_fb_analyzer +21 -3
- data/lib/chimps_fb_analyzer/version.rb +1 -1
- metadata +4 -2
data/bin/chimps_fb_analyzer
CHANGED
@@ -2,8 +2,12 @@
|
|
2
2
|
require 'chimps_fb_analyzer'
|
3
3
|
|
4
4
|
grab_output = false
|
5
|
+
directory = false
|
5
6
|
path = ""
|
6
7
|
options = {}
|
8
|
+
|
9
|
+
# TODO Handling incorrect arguments
|
10
|
+
# TODO Documentation and help
|
7
11
|
ARGV.each do |arg|
|
8
12
|
if grab_output
|
9
13
|
grab_output = false
|
@@ -12,12 +16,26 @@ ARGV.each do |arg|
|
|
12
16
|
case arg
|
13
17
|
when "-o"
|
14
18
|
grab_output = true
|
19
|
+
when "-d"
|
20
|
+
directory = true
|
15
21
|
else
|
16
22
|
path = arg
|
17
23
|
end
|
18
24
|
end
|
19
25
|
end
|
20
26
|
|
21
|
-
|
22
|
-
|
23
|
-
|
27
|
+
if directory
|
28
|
+
Dir.foreach(path) do |item|
|
29
|
+
next if item == '.' or item == '..'
|
30
|
+
|
31
|
+
filepath = File.join path, item
|
32
|
+
fb_anaylzer = ChimpsFBAnalyzer::FBAnalyzer.new(filepath)
|
33
|
+
data = fb_anaylzer.analyze_wall
|
34
|
+
fb_anaylzer.write_data_to_csv(data, nil)
|
35
|
+
end
|
36
|
+
else
|
37
|
+
fb_anaylzer = ChimpsFBAnalyzer::FBAnalyzer.new(path)
|
38
|
+
data = fb_anaylzer.analyze_wall
|
39
|
+
fb_anaylzer.write_data_to_csv(data, options[:output_path])
|
40
|
+
|
41
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chimps_fb_analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Villena
|
@@ -65,6 +65,8 @@ files:
|
|
65
65
|
- LICENSE.txt
|
66
66
|
- README.md
|
67
67
|
- Rakefile
|
68
|
+
- Sam_Schock_2_stats.csv
|
69
|
+
- Sam_Schock_stats.csv
|
68
70
|
- bin/chimps_fb_analyzer
|
69
71
|
- chimps_fb_analyzer.gemspec
|
70
72
|
- lib/chimps_fb_analyzer.rb
|
@@ -90,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
92
|
version: '0'
|
91
93
|
requirements: []
|
92
94
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.2.1
|
94
96
|
signing_key:
|
95
97
|
specification_version: 4
|
96
98
|
summary: Analyze facebook pages
|