html_cs_run_parse 0.0.6 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/HTMLCS.js +33 -630
- data/lib/html_compilation/classes/builders/app_html.rb +62 -0
- data/lib/html_compilation/classes/builders/graph.rb +70 -0
- data/lib/html_compilation/classes/builders/html_builder.rb +27 -0
- data/lib/html_compilation/classes/builders/page_html.rb +91 -0
- data/lib/html_compilation/classes/builders/row_html.rb +13 -0
- data/lib/html_compilation/classes/objects/app.rb +28 -0
- data/lib/html_compilation/classes/objects/base_object.rb +12 -0
- data/lib/html_compilation/classes/objects/page.rb +99 -0
- data/lib/html_compilation/classes/objects/row.rb +22 -0
- data/lib/html_compilation/classes/setup/conditioning.rb +23 -0
- data/lib/html_compilation/classes/setup/output_generation.rb +21 -0
- data/lib/html_compilation/classes/setup/retrieval.rb +90 -0
- data/lib/html_compilation/classes/setup/setup.rb +83 -0
- data/lib/html_compilation/classes/struct_classes/score_collection.rb +33 -0
- data/lib/html_compilation/classes/struct_classes/suppressed_page_rules.rb +8 -0
- data/lib/html_compilation/data/html_data/app_data.yaml +39 -0
- data/lib/html_compilation/data/html_data/page_data.yaml +37 -0
- data/lib/html_compilation/data/html_data/row_data.yaml +4 -0
- data/lib/html_compilation/data/html_data/style_script.yaml +167 -0
- data/lib/html_compilation/execution.rb +18 -0
- data/lib/html_compilation/modules/image_interaction.rb +14 -0
- data/lib/html_compilation/modules/yaml_interaction.rb +26 -0
- data/lib/html_cs_run_parse.rb +6 -0
- metadata +53 -3
@@ -0,0 +1,18 @@
|
|
1
|
+
$:.unshift File.dirname(__FILE__)
|
2
|
+
require 'classes/setup/setup.rb'
|
3
|
+
require 'classes/objects/app'
|
4
|
+
require 'classes/setup/conditioning.rb'
|
5
|
+
require 'classes/setup/output_generation.rb'
|
6
|
+
class Execution
|
7
|
+
def build(file_prefix = "./data")
|
8
|
+
app = Application.new
|
9
|
+
|
10
|
+
setup = Setup.new(file_prefix + "/input")
|
11
|
+
setup.main_setup(app, file_prefix)
|
12
|
+
|
13
|
+
conditioning = Conditioning.new
|
14
|
+
conditioning.main_condition(app, skip_value = false, ddl = file_prefix)
|
15
|
+
|
16
|
+
out = OutputGeneration.new(app, file_prefix + "/output/files/")
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module ImageInteraction
|
2
|
+
#wonkavision
|
3
|
+
def retrieve_image_content(file_location)
|
4
|
+
File.read(file_location, mode: "rb")
|
5
|
+
end
|
6
|
+
|
7
|
+
def place_image_content(file_name, content, extension =".png")
|
8
|
+
File.write(file_name + extension, content, mode: "wb:ASCII-8BIT")
|
9
|
+
end
|
10
|
+
|
11
|
+
def return_all_files(current_location, file_type = '*', filter = '*')
|
12
|
+
Dir.glob("#{current_location}/#{filter}.#{file_type}")
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module YAMLInteraction
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
def read_yaml(relative_location, data)
|
5
|
+
return_yaml(relative_location)[data.upcase.tr(' ', '_')]
|
6
|
+
end
|
7
|
+
|
8
|
+
def key_value_add(file_location, key, value)
|
9
|
+
hash = return_yaml(file_location)
|
10
|
+
hash.store(key.upcase.tr(' ', '_'), value.to_s)
|
11
|
+
yaml_dump(file_location, hash)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def return_yaml(relative_location)
|
17
|
+
YAML.load(File.read(relative_location))
|
18
|
+
end
|
19
|
+
|
20
|
+
def yaml_dump(file_location, hash)
|
21
|
+
File.open(file_location, 'w+') {
|
22
|
+
|file| YAML.dump(hash, file)}
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
end
|
data/lib/html_cs_run_parse.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'utility/parse_machine'
|
2
|
+
require 'html_compilation/execution'
|
2
3
|
|
3
4
|
#this gem is specifically for running HTMLCS
|
4
5
|
class HTMLCS
|
@@ -9,4 +10,9 @@ class HTMLCS
|
|
9
10
|
parse = ParseMachine.new
|
10
11
|
parse.htmlcs_parse(output, file_name)
|
11
12
|
end
|
13
|
+
|
14
|
+
def self.compile_html_cs(data_location)
|
15
|
+
exec = Execution.new
|
16
|
+
exec.build(data_location)
|
17
|
+
end
|
12
18
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_cs_run_parse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jerren Every
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
12
|
-
dependencies:
|
11
|
+
date: 2021-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: googlecharts
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
13
41
|
description: ''
|
14
42
|
email: jerren1122@hotmail.com
|
15
43
|
executables: []
|
@@ -17,6 +45,28 @@ extensions: []
|
|
17
45
|
extra_rdoc_files: []
|
18
46
|
files:
|
19
47
|
- lib/HTMLCS.js
|
48
|
+
- lib/html_compilation/classes/builders/app_html.rb
|
49
|
+
- lib/html_compilation/classes/builders/graph.rb
|
50
|
+
- lib/html_compilation/classes/builders/html_builder.rb
|
51
|
+
- lib/html_compilation/classes/builders/page_html.rb
|
52
|
+
- lib/html_compilation/classes/builders/row_html.rb
|
53
|
+
- lib/html_compilation/classes/objects/app.rb
|
54
|
+
- lib/html_compilation/classes/objects/base_object.rb
|
55
|
+
- lib/html_compilation/classes/objects/page.rb
|
56
|
+
- lib/html_compilation/classes/objects/row.rb
|
57
|
+
- lib/html_compilation/classes/setup/conditioning.rb
|
58
|
+
- lib/html_compilation/classes/setup/output_generation.rb
|
59
|
+
- lib/html_compilation/classes/setup/retrieval.rb
|
60
|
+
- lib/html_compilation/classes/setup/setup.rb
|
61
|
+
- lib/html_compilation/classes/struct_classes/score_collection.rb
|
62
|
+
- lib/html_compilation/classes/struct_classes/suppressed_page_rules.rb
|
63
|
+
- lib/html_compilation/data/html_data/app_data.yaml
|
64
|
+
- lib/html_compilation/data/html_data/page_data.yaml
|
65
|
+
- lib/html_compilation/data/html_data/row_data.yaml
|
66
|
+
- lib/html_compilation/data/html_data/style_script.yaml
|
67
|
+
- lib/html_compilation/execution.rb
|
68
|
+
- lib/html_compilation/modules/image_interaction.rb
|
69
|
+
- lib/html_compilation/modules/yaml_interaction.rb
|
20
70
|
- lib/html_cs_run_parse.rb
|
21
71
|
- lib/licence.txt
|
22
72
|
- lib/utility/parse_machine.rb
|