json2xslx 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -7
- data/json2xslx.gemspec +2 -2
- data/lib/json2xslx/generator.rb +8 -8
- data/lib/json2xslx/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f782efa4046772be7bb9ec1f374cd750335f761
|
|
4
|
+
data.tar.gz: 1248937c26410d144b55061c1a71531627fdc6c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03a269687c1af5ee97dc866e93136e4c54172b285fdac63c013246a61ef41c1deed95098cb9892453324d4731a323d40b889c1148680497cdaf75508a4f80e4a
|
|
7
|
+
data.tar.gz: 3a78dea2b6664b9d72c3dad2e99f082837947e700ce06204b2e75a0d4be1bef9a483e800bcae611aaa2ccf99847428e12aa711ee8b3785358ed4298eda69c4b2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
# Deprecated Please use https://github.com/NehaChopra/json2xls
|
|
2
|
+
|
|
1
3
|
# Json2xslx
|
|
2
4
|
|
|
3
5
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/json2xslx`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
-
This gem will expect an file
|
|
6
|
+
This gem will expect an file containing JSON in it and convert it into the respective .XLS file as an exporter.
|
|
5
7
|
|
|
6
8
|
## Installation
|
|
7
9
|
|
|
@@ -25,19 +27,19 @@ Or install it yourself as:
|
|
|
25
27
|
Json2xslx::Generator.new(["../spec/sample.json""])
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
Json2xslx can take single file containing the JSON formatted data and export it to respect .
|
|
30
|
+
Json2xslx can take single file containing the JSON formatted data and export it to respect .xls.
|
|
29
31
|
A folder of Json2xslx will be created in your home directory where you can find your exported files in various time stamp taken on running this file.
|
|
30
32
|
|
|
31
33
|
```
|
|
32
|
-
Json2xslx::Generator.new(["../spec/sample.json","../spec/sample1.json"], {name: "Test", path: "#{ENV['HOME']}/
|
|
34
|
+
Json2xslx::Generator.new(["../spec/sample.json","../spec/sample1.json"], {name: "Test", path: "#{ENV['HOME']}/Json2x/"})
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
Json2xslx can take more than a single file containing the JSON formatted data and export it to respect .
|
|
36
|
-
When more than single files are provided to the Json2xslx in order to export the .
|
|
37
|
-
A folder of
|
|
37
|
+
Json2xslx can take more than a single file containing the JSON formatted data and export it to respect .xls.
|
|
38
|
+
When more than single files are provided to the Json2xslx in order to export the .xls a single workbook with multiple sheet tabs are created.
|
|
39
|
+
A folder of Json2xls will be created in your home directory where you can find your exported files in various time stamp taken on running this file.
|
|
38
40
|
|
|
39
41
|
Where to find your generated excel export:
|
|
40
|
-
Folder structure: home_directory/
|
|
42
|
+
Folder structure: home_directory/Json2xls/time_stamp/created_file.xls
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
## Development
|
data/json2xslx.gemspec
CHANGED
|
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.authors = ["neha"]
|
|
10
10
|
spec.email = ["nchopra456@gmail.com"]
|
|
11
11
|
|
|
12
|
-
spec.summary = "Convert JSON formatted file to .
|
|
13
|
-
spec.description = "File containing the JSON data is converted to .
|
|
12
|
+
spec.summary = "Convert JSON formatted file to .XLS file"
|
|
13
|
+
spec.description = "File containing the JSON data is converted to .XLS file"
|
|
14
14
|
spec.homepage = "https://github.com/NehaChopra/json2xslx"
|
|
15
15
|
spec.license = "MIT"
|
|
16
16
|
|
data/lib/json2xslx/generator.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
##
|
|
2
2
|
#
|
|
3
3
|
# author: neha chopra,
|
|
4
|
-
# Reads the files containing the JSON and convert them to .
|
|
4
|
+
# Reads the files containing the JSON and convert them to .XLS file
|
|
5
5
|
#
|
|
6
6
|
#
|
|
7
7
|
|
|
@@ -42,7 +42,7 @@ module Json2xslx
|
|
|
42
42
|
|
|
43
43
|
##
|
|
44
44
|
#
|
|
45
|
-
# writing to .
|
|
45
|
+
# writing to .XLS file
|
|
46
46
|
#
|
|
47
47
|
#
|
|
48
48
|
def write file
|
|
@@ -83,7 +83,7 @@ module Json2xslx
|
|
|
83
83
|
|
|
84
84
|
##
|
|
85
85
|
#
|
|
86
|
-
# After processing of the objects .
|
|
86
|
+
# After processing of the objects .XLS file is build
|
|
87
87
|
#
|
|
88
88
|
#
|
|
89
89
|
def process_json json_objects
|
|
@@ -95,9 +95,9 @@ module Json2xslx
|
|
|
95
95
|
|
|
96
96
|
##
|
|
97
97
|
#
|
|
98
|
-
# Building the .
|
|
99
|
-
# build_headers method build the headers for .
|
|
100
|
-
# build_values method ensures the values get generated for .
|
|
98
|
+
# Building the .XLS files
|
|
99
|
+
# build_headers method build the headers for .XLS file
|
|
100
|
+
# build_values method ensures the values get generated for .XLS file
|
|
101
101
|
#
|
|
102
102
|
def build_xslx json_objects, key, sheet
|
|
103
103
|
|
|
@@ -110,7 +110,7 @@ module Json2xslx
|
|
|
110
110
|
|
|
111
111
|
##
|
|
112
112
|
#
|
|
113
|
-
# building headers for .
|
|
113
|
+
# building headers for .XLS file
|
|
114
114
|
#
|
|
115
115
|
#
|
|
116
116
|
def build_headers json_objects, sheet
|
|
@@ -128,7 +128,7 @@ module Json2xslx
|
|
|
128
128
|
|
|
129
129
|
##
|
|
130
130
|
#
|
|
131
|
-
# building result set row values for .
|
|
131
|
+
# building result set row values for .XLS file
|
|
132
132
|
#
|
|
133
133
|
#
|
|
134
134
|
def build_values json_objects, excel_headers, key, sheet
|
data/lib/json2xslx/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: json2xslx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- neha
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-08-
|
|
11
|
+
date: 2017-08-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -80,7 +80,7 @@ dependencies:
|
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '1.8'
|
|
83
|
-
description: File containing the JSON data is converted to .
|
|
83
|
+
description: File containing the JSON data is converted to .XLS file
|
|
84
84
|
email:
|
|
85
85
|
- nchopra456@gmail.com
|
|
86
86
|
executables: []
|
|
@@ -125,5 +125,5 @@ rubyforge_project:
|
|
|
125
125
|
rubygems_version: 2.6.12
|
|
126
126
|
signing_key:
|
|
127
127
|
specification_version: 4
|
|
128
|
-
summary: Convert JSON formatted file to .
|
|
128
|
+
summary: Convert JSON formatted file to .XLS file
|
|
129
129
|
test_files: []
|