feedlrop 0.1.20 → 0.1.21

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: 4d02856b3bf488c375d4f533bf7fa10be0607111
4
- data.tar.gz: 633d78623de1190cac13fa5d68267460032eb29d
3
+ metadata.gz: bf0bc7da6aa4156a032092d337f8f8a30421ec22
4
+ data.tar.gz: 44c9ed8aab21f88e6b7326e2254d0a649e2610a9
5
5
  SHA512:
6
- metadata.gz: a21c70a548193f7a606e2383183d81b1ced2b952dd43124de846d4800bcfe25cbd298b1ba17d5b9d76e2fa74fd9fc339f49c8866ac07dac458b1d9f09dee7f0a
7
- data.tar.gz: b33b393863783e5ea6e14137f49cdf9694580e348874a126fd1dfb7e36bc979ff6a31d6caa92f4303896969973421f1d16afe3b5ccc55a6270fa9994fc6203bd
6
+ metadata.gz: 067bbb6532f342e1ea9acb9434e18b5a3f83e30d3af3215c1d9562d42caf4cf3c8e57e6b9cd8140eb0cc400e3ef53b65df2ae35075a9518ffd443d8cf5eb5fe1
7
+ data.tar.gz: 48612fefc03009d4e0c2dfd43e911bea829db10ac969fb64cd2355e2c97c717edacd15af01e42b504d0fb37f154cf3ebf157e1d3d6921be9aeaedc932b33094d
data/.gitignore CHANGED
@@ -7,3 +7,11 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /db/
11
+ /bundle/
12
+ /*.csv
13
+ /config/
14
+ /memo/
15
+ /TAGS
16
+ /*.bat
17
+
data/exe/f ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'arxutils'
4
+ require 'feedlrop'
5
+
6
+ dbconfig = Arxutils::Dbutil::DBCONFIG_MYSQL
7
+ dbconfig = Arxutils::Dbutil::DBCONFIG_SQLITE3
8
+
9
+ token = ARGV[0]
10
+ hs = {
11
+ "db_dir" => Arxutils::Dbutil::DB_DIR,
12
+ "migrate_dir" => Arxutils::Dbutil::MIGRATE_DIR,
13
+ "config_dir" => Arxutils::Dbutil::CONFIG_DIR,
14
+ "dbconfig" => dbconfig,
15
+ "log_fname" => Arxutils::Dbutil::DATABASELOG,
16
+ }
17
+
18
+ fo = Feedlrop::Feedlrop.new(
19
+ token ,
20
+ :db,
21
+ hs
22
+ )
23
+ #fo.get_all_unread_count
24
+ fo.print_user_profile
25
+ fo.print_subscription
26
+
27
+
data/exe/makemigrate CHANGED
@@ -4,7 +4,7 @@
4
4
  require 'arxutils'
5
5
  require 'feedlrop'
6
6
 
7
- data_ary = [
7
+ db_def_ary = [
8
8
  {
9
9
  :flist => %W!noitem!,
10
10
  :classname => "Countdatetime",
@@ -35,7 +35,7 @@ dbconfig = Arxutils::Dbutil::DBCONFIG_SQLITE3
35
35
 
36
36
  forced = true
37
37
  Arxutils::Migrate.migrate(
38
- data_ary,
38
+ db_def_ary,
39
39
  0,
40
40
  dbconfig,
41
41
  forced
data/f.bat ADDED
@@ -0,0 +1,2 @@
1
+ set token='AnHvEXJ7ImEiOiJGZWVkbHkgRGV2ZWxvcGVyIiwiZSI6MTQ0OTMxNTQ3MTA1NiwiaSI6IjA0ZmE3ODczLWE3NjEtNDZkMy05MmRjLTNmNjIzNWRmMDA0ZiIsInAiOjYsInQiOjEsInYiOiJwcm9kdWN0aW9uIiwidyI6IjIwMTMuMTEiLCJ4Ijoic3RhbmRhcmQifQ:feedlydev'
2
+ bundle exec f %token%
data/feedlrop.gemspec CHANGED
@@ -32,7 +32,8 @@ Gem::Specification.new do |spec|
32
32
  spec.add_runtime_dependency "activerecord"
33
33
  spec.add_runtime_dependency "sqlite3"
34
34
  spec.add_runtime_dependency "arxutils", "~> 0.1.10"
35
-
35
+ spec.add_runtime_dependency "awesome_print"
36
+
36
37
  spec.add_development_dependency "bundler", "~> 1.10"
37
38
  spec.add_development_dependency "rake", "~> 10.0"
38
39
  spec.add_development_dependency "rspec"
@@ -3,6 +3,8 @@ require 'arxutils'
3
3
  require 'arxutils/store'
4
4
  require 'csv'
5
5
  require 'pp'
6
+ require 'feedlr'
7
+ require 'awesome_print'
6
8
 
7
9
  module Feedlrop
8
10
  class Feedlrop
@@ -24,31 +26,20 @@ module Feedlrop
24
26
  File.open( fname , "w")
25
27
  end
26
28
 
27
- def csv_open
28
- @csv = CSV.new(get_output_file("csv") , {
29
- :headers => %w!category_id id count!,
30
- :write_headers => true
31
- } )
32
- end
33
-
34
- def csv_add(category_id , id , count)
35
- @csv << [category_id , id , count ]
36
- end
37
-
38
29
  def get_all_unread_count
39
- #p categories
40
30
  @categories.each do | x |
41
31
  # f.puts "id=#{x.id.split('/')[-1]}"
42
32
  f = true
43
- if x.class == String
33
+ if x.class != String
44
34
  category_id = x.id.split('/')[-1]
45
35
  else
46
36
  f = false
47
37
  end
48
38
  next unless f
49
-
39
+
50
40
  en = @client.user_unread_counts( {:streamId => x.id } )
51
41
  en.unreadcounts.each do |y|
42
+ puts "y.id=#{y.id}"
52
43
  if y.id =~ /^feed\/(.+)/
53
44
  url = $1
54
45
  csv_add( category_id , url , y[:count] )
@@ -58,6 +49,29 @@ module Feedlrop
58
49
  end
59
50
  end
60
51
 
52
+ def print_user_profile
53
+ pp @profile
54
+ end
55
+
56
+ def print_subscription
57
+ option = {:plain => true }
58
+ puts @client.user_subscriptions.size
59
+ @client.user_subscriptions.map{|m| puts m.id}
60
+ puts "==============="
61
+ @client.user_subscriptions.map{|m| ap m , option }
62
+ end
63
+
64
+ def csv_open
65
+ @csv = CSV.new(get_output_file("csv") , {
66
+ :headers => %w!category_id id count!,
67
+ :write_headers => true
68
+ } )
69
+ end
70
+
71
+ def csv_add(category_id , id , count)
72
+ @csv << [category_id , id , count ]
73
+ end
74
+
61
75
  def csv_close
62
76
  @csv.close
63
77
  end
@@ -1,3 +1,3 @@
1
1
  module Feedlrop
2
- VERSION = "0.1.20"
2
+ VERSION = "0.1.21"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedlrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - yasuo kominami
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: feedlr
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.1.10
69
+ - !ruby/object:Gem::Dependency
70
+ name: awesome_print
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -112,6 +126,7 @@ description: utility functions for Feedly API.
112
126
  email:
113
127
  - ykominami@gmail.com
114
128
  executables:
129
+ - f
115
130
  - feedlrop
116
131
  - makemigrate
117
132
  extensions: []
@@ -125,8 +140,10 @@ files:
125
140
  - Rakefile
126
141
  - bin/console
127
142
  - bin/setup
143
+ - exe/f
128
144
  - exe/feedlrop
129
145
  - exe/makemigrate
146
+ - f.bat
130
147
  - feedlrop.gemspec
131
148
  - lib/feedlrop.rb
132
149
  - lib/feedlrop/dbutil.rb
@@ -154,9 +171,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
171
  version: '0'
155
172
  requirements: []
156
173
  rubyforge_project:
157
- rubygems_version: 2.4.8
174
+ rubygems_version: 2.4.5.1
158
175
  signing_key:
159
176
  specification_version: 4
160
177
  summary: utility functions for Feedly API.
161
178
  test_files: []
162
- has_rdoc: