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 +4 -4
- data/README.md +13 -0
- data/bin/pickpocket +6 -0
- data/lib/pickpocket/articles/library.rb +12 -0
- data/lib/pickpocket/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e731e49201cc7f59a111c2013b62e153f4ecb50
|
4
|
+
data.tar.gz: 6175f05ce25f8f1323bea9911e54ba4a47759715
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/pickpocket/version.rb
CHANGED