adncv 0.2 → 0.3

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: 8fb7cefcb0019df6d96bec41011db1263f8f0367
4
- data.tar.gz: 4a68e0625a6ad8fa686f268447f947a28b3d3e6b
3
+ metadata.gz: 35dbb7e2a3ea78edd0e3ddd07d5859d2a95a7ea2
4
+ data.tar.gz: df4b18cb729f48d9d7902647975074daa36ba660
5
5
  SHA512:
6
- metadata.gz: ec076280c3647d51787e4e047f79a690ce0d3f001ccdfad71de03e1b06ddf9987ed6c9a3beb0fc87107499d6c2c0caf134da4aced379fff311397846af6d939d
7
- data.tar.gz: 37b40b66bb68da042c32db57b2c25531cefbc2d7a389b590ac9a9748fee43353bcd1cdd256fa4daa26be3ba084243d77660d695faeccb9f33b82918a17691e39
6
+ metadata.gz: 42a8a402031c067812bce3cf5fabdf20fb2f7d7ee9e1a16e12a2c780c2eba611124a06031fe54b461b558cb176a0253327fa1103e64aa6489d750e5765f5b3b7
7
+ data.tar.gz: ea22e713f23d8efe5d8f0debcf1eaa32a104ef6e7dee59f66095794382151474a839267275fb1ac7a7f9686101dff473fa4a31b1813b827a8d2dd9ab29e54f27
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # 0.3
2
+
3
+ Custom path for exported file.
4
+
5
+ # 0.2
6
+
7
+ Added details option for display.
8
+
9
+ # 0.1
10
+
11
+ Displays statistics.
12
+
13
+ Exports complete results as JSON file.
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Gem Version](https://badge.fury.io/rb/adncv.svg)](http://badge.fury.io/rb/adncv)
2
+
1
3
  # ADNCV
2
4
 
3
5
  Statistics from your App.net data.
@@ -11,7 +13,7 @@ Statistics from your App.net data.
11
13
  3. Run the Gem on the downloaded file:
12
14
 
13
15
  ```
14
- adncv /path/to/appdotnet-data-you-xxxxx-posts.json
16
+ adncv -d /path/to/appdotnet-data-you-xxxxx-posts.json
15
17
  ```
16
18
 
17
19
  ## Commands
@@ -22,8 +24,12 @@ adncv /path/to/appdotnet-data-you-xxxxx-posts.json
22
24
 
23
25
  Displays informations.
24
26
 
27
+ Add `-f` for full details (all posted links, mentioned users, etc).
28
+
25
29
  ### Export
26
30
 
27
31
  `adncv -e posts.json`
28
32
 
29
- Exports informations as a JSON file, including all your posted links and mentioned users.
33
+ Exports informations as a JSON file, including all your posted links and mentioned users.
34
+
35
+ Add `-p` to specify the destination folder path (default: in ~).
data/lib/ADNCV/app.rb CHANGED
@@ -15,9 +15,10 @@ module ADNCV
15
15
 
16
16
  desc "export", "Export your account statistics (-e)"
17
17
  map "-e" => :export
18
+ option :path, aliases: "-p", type: :string, desc: "Specify the path for the exported file"
18
19
  def export(file)
19
20
  analyze(file)
20
- @data.export
21
+ @data.export(options)
21
22
  @display.exported(@data.export_path)
22
23
  end
23
24
 
data/lib/ADNCV/data.rb CHANGED
@@ -73,7 +73,15 @@ module ADNCV
73
73
 
74
74
  end
75
75
 
76
- def export
76
+ def export(options)
77
+ root = if options["path"]
78
+ options["path"]
79
+ else
80
+ Dir.home
81
+ end
82
+
83
+ @export_path = "#{root}/adncv_export.json"
84
+
77
85
  export = {
78
86
  meta: {
79
87
  created_at: Time.now,
@@ -110,7 +118,6 @@ module ADNCV
110
118
  }
111
119
  }
112
120
 
113
- @export_path = "#{Dir.home}/adncv_export.json"
114
121
  File.write(@export_path, export.to_json)
115
122
  end
116
123
 
data/lib/ADNCV/display.rb CHANGED
@@ -6,8 +6,20 @@ module ADNCV
6
6
  @thor = Thor::Shell::Color.new
7
7
  end
8
8
 
9
+ def banner
10
+ <<-ADNCV
11
+ ___ ___ _ ________ __
12
+ / _ | / _ \\/ |/ / ___/ | / /
13
+ / __ |/ // / / /__ | |/ /
14
+ /_/ |_/____/_/|_/\\___/ |___/
15
+
16
+ ADNCV
17
+ end
18
+
9
19
  def version
20
+ puts banner()
10
21
  @thor.say_status :version, "#{VERSION}", :red
22
+ puts "\n"
11
23
  end
12
24
 
13
25
  def analyzing
data/lib/ADNCV/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ADNCV
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adncv
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dejonckheere
@@ -62,6 +62,7 @@ extra_rdoc_files: []
62
62
  files:
63
63
  - ".gitignore"
64
64
  - ADNCV.gemspec
65
+ - CHANGELOG.md
65
66
  - Gemfile
66
67
  - LICENSE.txt
67
68
  - README.md