pick-pocket 0.0.3 → 0.1.0

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: 1fa9a86328a7bbf01972683f1836a1441fee1028
4
- data.tar.gz: 69524557c5b3d16aa0141e8adc1cf090b3ad945a
3
+ metadata.gz: 4e731e49201cc7f59a111c2013b62e153f4ecb50
4
+ data.tar.gz: 6175f05ce25f8f1323bea9911e54ba4a47759715
5
5
  SHA512:
6
- metadata.gz: f8319e12ea91fa8e4714dd7be5a8347fe035ac3a0a19d214521f5baba696daafdce08040fee23bd66e0ba0ae5e920ea05bceb0786cca22bd019052933fe372cc
7
- data.tar.gz: 5d59ae9cbe11bf3fc9239a5001931172a77eb5aaf9688a1b369fda34d6f57a12ed9d0883672aabad6fc180875c20a907d29671c110a2590243a15c507a806e26
6
+ metadata.gz: e10015f678460caf36857b43529cfa4a3f13d8b5da9e410b79ccd29deecfd5cedf902a31c7b61e491c91541b7a6b7467992aa12a3e11dc7722686a1f2f654937
7
+ data.tar.gz: 206e32c75f6257a9fe12724951751f74664679a5a5874ffebc2fac98b0aa3e2ac4ddd60fb7dd987e3d5cd4d7f80badf5c56822bf10fb9119c928da98a41636c3
data/README.md CHANGED
@@ -29,6 +29,19 @@ To use Pickpocket, you first need to go through Pocket's OAuth authentication pr
29
29
  - Selects a random article from your list, and open your browser with its resolved URL
30
30
  - `pickpocket renew`
31
31
  - This will synchronize your local library with your remote. Keep in mind: any article marked as read locally **WILL DELETED** from your remote library
32
+ - `pickpocket stats`
33
+ - Show the number of read/unread articles you have on your local library
34
+
35
+ ## Pickpocket Files
36
+
37
+ All Pickpocket files are stored at the `~/.pickpocket` folder.
38
+
39
+ - `library_file`
40
+ - YAML file which stores your local library, marking articles as unread or read
41
+ - `authorization_token`
42
+ - File which stores your authorization token
43
+ - `oauth_token`
44
+ - File which stores your OAuth token
32
45
 
33
46
  ## Don't Trust Me?
34
47
 
data/bin/pickpocket CHANGED
@@ -31,6 +31,12 @@ class PickpocketCLI < Thor
31
31
  library = Pickpocket::Articles::Library.new
32
32
  library.renew
33
33
  end
34
+
35
+ desc 'stats', 'Show the number of read/unread articles you have on your local library'
36
+ def stats
37
+ library = Pickpocket::Articles::Library.new
38
+ library.stats
39
+ end
34
40
  end
35
41
 
36
42
  PickpocketCLI.start(ARGV)
@@ -53,6 +53,18 @@ module Pickpocket
53
53
  store[:read] = {}
54
54
  end
55
55
  end
56
+
57
+ # Show stats from your local articles
58
+ def stats
59
+ guarantee_inventory
60
+ store.transaction do
61
+ unread_count = store[:unread].keys.size
62
+ read_count = store[:read].keys.size
63
+
64
+ logger.info %Q{You have #{read_count} read articles}
65
+ logger.info %Q{You have #{unread_count} unread articles}
66
+ end
67
+ end
56
68
  end
57
69
  end
58
70
  end
@@ -1,3 +1,3 @@
1
1
  module Pickpocket
2
- VERSION = '0.0.3'
2
+ VERSION = '0.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pick-pocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Amaro