fb_scrape 0.0.9 → 0.0.10

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
  SHA1:
3
- metadata.gz: 29b58f6847d52acf4ddb42d640ec83381bfd98e2
4
- data.tar.gz: 3515cb9e1354420f8ffd7e87ae4c175ff17ee137
3
+ metadata.gz: 8fd44361f2a83fe3e46e497c795209d4af1dd96c
4
+ data.tar.gz: 1470c97d9c2e9d9b7f45e52e2a0500abd9dccf4f
5
5
  SHA512:
6
- metadata.gz: 61813248a7541451c4094330fea755093473df2afc2ccf636f75348a3a5c1d32bbbdcd5f86d8669f21fe55a26b34e50b43b9fb9d0a5c73dcbe5b402f8224d7e0
7
- data.tar.gz: 3ca16bfe693e365e770664424b2f50aa2d3faab081fa595460627e99f44d2038269dd4c50553677a0941ec9005d9334692548df744b24b0f87389d165b5ec35e
6
+ metadata.gz: 49f47daace408a63c05e8cd86c40e2dd4152e88c49c6e5efcbdfe95ca705b4d0cb5790ae4d2af7e41166cefce7e52025762856a5e4dd00bc2fde4e8adf4b036f
7
+ data.tar.gz: 9ae18b4d7ba0f2f220d8c33897bff60286766591154bdb243cc8b035dec141da2fd74213b373cb6ba34c1b9740e4f6b6c8ee3444f04c2f8e8723ace31961d610
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /debug/
11
+ *.DS_Store
@@ -3,6 +3,7 @@
3
3
  require 'fb_scrape'
4
4
  require 'thor'
5
5
  require 'json'
6
+ require 'csv'
6
7
 
7
8
  class FBScrape::CLI < Thor
8
9
 
@@ -79,6 +80,15 @@ class FBScrape::CLI < Thor
79
80
  messages = client.conversations.collect{ |c| c.messages }.flatten
80
81
  puts "Total messages #{messages.count}"
81
82
 
83
+ CSV.open(options[:out_file], "w") do |w|
84
+ w << ["message_id", "conversation_id", "from", "text", "is_reply", "created_at"]
85
+
86
+ messages.each do |m|
87
+ w << [m.id, m.conversation_id, m.from_name, m.text, m.is_reply?, m.created_at ]
88
+ end
89
+ end
90
+
91
+
82
92
  rescue ArgumentError => e
83
93
  puts e.message
84
94
  end
@@ -1,3 +1,3 @@
1
1
  module FBScrape
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb_scrape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Kimenye
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler