htmleval 0.1.0__tar.gz

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.
htmleval-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Markus Mobius
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: htmleval
3
+ Version: 0.1.0
4
+ Summary: A Python package that facilitates the creation of HTML evaluations.
5
+ Author: Markus Mobius
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Markus Mobius
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/markusmobius/htmleval
29
+ Project-URL: Repository, https://github.com/markusmobius/htmleval
30
+ Project-URL: Bug Tracker, https://github.com/markusmobius/htmleval/issues
31
+ Keywords: html,evaluation,surveys,audits
32
+ Classifier: Development Status :: 3 - Alpha
33
+ Classifier: Intended Audience :: Developers
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Operating System :: OS Independent
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.7
38
+ Classifier: Programming Language :: Python :: 3.8
39
+ Classifier: Programming Language :: Python :: 3.9
40
+ Classifier: Programming Language :: Python :: 3.10
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Requires-Python: >=3.7
45
+ Description-Content-Type: text/markdown
46
+ License-File: LICENSE
47
+ Dynamic: license-file
48
+
49
+ # HtmlEval Documentation
50
+
51
+ **HtmlEval** is a framework for constructing **evaluation surveys** with reusable, structured **blocks**.
52
+ It enables the creation of **simple and complex survey layouts**, allowing users to:
53
+
54
+ - **Evaluate text**
55
+ - **Categorize content**
56
+ - **Interact with structured data**
57
+
58
+ ## Overview
59
+
60
+ This documentation explains how to:
61
+
62
+ - **Build surveys using simple blocks** (text, checkboxes, selection questions).
63
+ - **Combine blocks into compound layouts** (columns, tabs, interactive fragments).
64
+ - **Generate and customize survey examples**.
65
+
66
+ ## Getting Started
67
+
68
+ To generate a survey, use:
69
+
70
+ ```bash
71
+ python ../createDemo.py
72
+ ```
73
+
74
+ ## For more:
75
+ - **Simple Blocks**: Basic building blocks for surveys.
76
+ - **Compound Blocks**: Advanced layouts using structured containers.
77
+
78
+ ## Documentation Structure
79
+
80
+ ### [1. Simple Blocks - Building Survey Components](simpleBlocks.html)
81
+ 1.1. [Introduction](simpleBlocks.html#introduction)
82
+ 1.2. [Starting with a Basic Text Block](simpleBlocks.html#starting-with-a-basic-text-block)
83
+ 1.3. [Adding Multi-Row Checked Questions](simpleBlocks.html#adding-multi-row-checked-questions)
84
+ 1.4. [Using Multi-Row Selection (Dropdown)](simpleBlocks.html#using-multi-row-selection-dropdown)
85
+ 1.5. [Final Full Code: Complete Running Example](simpleBlocks.html#final-full-code-complete-running-example)
86
+ 1.6. [Next Steps](simpleBlocks.html#next-steps)
87
+
88
+ ### [2. Compound Blocks - Structuring Surveys](compoundBlocks.html)
89
+ 2.1. [Introduction](compoundBlocks.html#introduction)
90
+ 2.2. [Using Columns](compoundBlocks.html#using-columns)
91
+ 2.3. [Using Tabs](compoundBlocks.html#using-tabs)
92
+ 2.4. [Adding Interactive Elements](compoundBlocks.html#adding-interactive-elements)
93
+ 2.5. [Final Full Code: Complete Running Example](compoundBlocks.html#final-full-code-complete-running-example)
94
+ 2.6. [Next Steps](compoundBlocks.html#next-steps)
95
+
96
+ ---
97
+
98
+ ## Navigation
99
+ - [1. Simple Blocks - Building Survey Components](simpleBlocks.html)
100
+ - [2. Compound Blocks - Structuring Surveys](compoundBlocks.html)
101
+
102
+ ---
@@ -0,0 +1,54 @@
1
+ # HtmlEval Documentation
2
+
3
+ **HtmlEval** is a framework for constructing **evaluation surveys** with reusable, structured **blocks**.
4
+ It enables the creation of **simple and complex survey layouts**, allowing users to:
5
+
6
+ - **Evaluate text**
7
+ - **Categorize content**
8
+ - **Interact with structured data**
9
+
10
+ ## Overview
11
+
12
+ This documentation explains how to:
13
+
14
+ - **Build surveys using simple blocks** (text, checkboxes, selection questions).
15
+ - **Combine blocks into compound layouts** (columns, tabs, interactive fragments).
16
+ - **Generate and customize survey examples**.
17
+
18
+ ## Getting Started
19
+
20
+ To generate a survey, use:
21
+
22
+ ```bash
23
+ python ../createDemo.py
24
+ ```
25
+
26
+ ## For more:
27
+ - **Simple Blocks**: Basic building blocks for surveys.
28
+ - **Compound Blocks**: Advanced layouts using structured containers.
29
+
30
+ ## Documentation Structure
31
+
32
+ ### [1. Simple Blocks - Building Survey Components](simpleBlocks.html)
33
+ 1.1. [Introduction](simpleBlocks.html#introduction)
34
+ 1.2. [Starting with a Basic Text Block](simpleBlocks.html#starting-with-a-basic-text-block)
35
+ 1.3. [Adding Multi-Row Checked Questions](simpleBlocks.html#adding-multi-row-checked-questions)
36
+ 1.4. [Using Multi-Row Selection (Dropdown)](simpleBlocks.html#using-multi-row-selection-dropdown)
37
+ 1.5. [Final Full Code: Complete Running Example](simpleBlocks.html#final-full-code-complete-running-example)
38
+ 1.6. [Next Steps](simpleBlocks.html#next-steps)
39
+
40
+ ### [2. Compound Blocks - Structuring Surveys](compoundBlocks.html)
41
+ 2.1. [Introduction](compoundBlocks.html#introduction)
42
+ 2.2. [Using Columns](compoundBlocks.html#using-columns)
43
+ 2.3. [Using Tabs](compoundBlocks.html#using-tabs)
44
+ 2.4. [Adding Interactive Elements](compoundBlocks.html#adding-interactive-elements)
45
+ 2.5. [Final Full Code: Complete Running Example](compoundBlocks.html#final-full-code-complete-running-example)
46
+ 2.6. [Next Steps](compoundBlocks.html#next-steps)
47
+
48
+ ---
49
+
50
+ ## Navigation
51
+ - [1. Simple Blocks - Building Survey Components](simpleBlocks.html)
52
+ - [2. Compound Blocks - Structuring Surveys](compoundBlocks.html)
53
+
54
+ ---
@@ -0,0 +1,59 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "htmleval" # *** IMPORTANT: Changed to your package name ***
7
+ version = "0.1.0" # Start with an initial version
8
+ description = "A Python package that facilitates the creation of HTML evaluations." # *** TODO: Update with accurate description ***
9
+ readme = "README.md"
10
+ requires-python = ">=3.7"
11
+ license = { file = "LICENSE" }
12
+ authors = [
13
+ { name = "Markus Mobius" }
14
+ # Add other authors if needed
15
+ ]
16
+
17
+ # *** TODO: Add your actual dependencies here ***
18
+ dependencies = [
19
+ # e.g., "beautifulsoup4",
20
+ # "requests"
21
+ ]
22
+
23
+ classifiers = [
24
+ # Choose appropriate classifiers
25
+ "Development Status :: 3 - Alpha",
26
+ "Intended Audience :: Developers",
27
+ "License :: OSI Approved :: MIT License", # Or your chosen license
28
+ "Operating System :: OS Independent",
29
+ "Programming Language :: Python :: 3",
30
+ "Programming Language :: Python :: 3.7",
31
+ "Programming Language :: Python :: 3.8",
32
+ "Programming Language :: Python :: 3.9",
33
+ "Programming Language :: Python :: 3.10",
34
+ "Programming Language :: Python :: 3.11",
35
+ "Programming Language :: Python :: 3.12",
36
+ "Programming Language :: Python :: 3.13",
37
+ # Add relevant topic classifiers
38
+ # "Topic :: Text Processing :: Markup :: HTML",
39
+ ]
40
+
41
+ # *** TODO: Add relevant keywords ***
42
+ keywords = ["html", "evaluation", "surveys", "audits"]
43
+
44
+ [project.urls]
45
+ "Homepage" = "https://github.com/markusmobius/htmleval" # *** Updated ***
46
+ "Repository" = "https://github.com/markusmobius/htmleval" # *** Updated ***
47
+ "Bug Tracker" = "https://github.com/markusmobius/htmleval/issues" # *** Updated ***
48
+ # "Documentation" = "..." # Optional: Add link if you have separate docs
49
+
50
+ # This tells setuptools to look for packages under the 'src' directory
51
+ [tool.setuptools.packages.find]
52
+ where = ["src"]
53
+
54
+ # Optional: Define development dependencies
55
+ # [project.optional-dependencies]
56
+ # dev = [
57
+ # "pytest",
58
+ # "ruff",
59
+ # ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: htmleval
3
+ Version: 0.1.0
4
+ Summary: A Python package that facilitates the creation of HTML evaluations.
5
+ Author: Markus Mobius
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Markus Mobius
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/markusmobius/htmleval
29
+ Project-URL: Repository, https://github.com/markusmobius/htmleval
30
+ Project-URL: Bug Tracker, https://github.com/markusmobius/htmleval/issues
31
+ Keywords: html,evaluation,surveys,audits
32
+ Classifier: Development Status :: 3 - Alpha
33
+ Classifier: Intended Audience :: Developers
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Operating System :: OS Independent
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.7
38
+ Classifier: Programming Language :: Python :: 3.8
39
+ Classifier: Programming Language :: Python :: 3.9
40
+ Classifier: Programming Language :: Python :: 3.10
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Requires-Python: >=3.7
45
+ Description-Content-Type: text/markdown
46
+ License-File: LICENSE
47
+ Dynamic: license-file
48
+
49
+ # HtmlEval Documentation
50
+
51
+ **HtmlEval** is a framework for constructing **evaluation surveys** with reusable, structured **blocks**.
52
+ It enables the creation of **simple and complex survey layouts**, allowing users to:
53
+
54
+ - **Evaluate text**
55
+ - **Categorize content**
56
+ - **Interact with structured data**
57
+
58
+ ## Overview
59
+
60
+ This documentation explains how to:
61
+
62
+ - **Build surveys using simple blocks** (text, checkboxes, selection questions).
63
+ - **Combine blocks into compound layouts** (columns, tabs, interactive fragments).
64
+ - **Generate and customize survey examples**.
65
+
66
+ ## Getting Started
67
+
68
+ To generate a survey, use:
69
+
70
+ ```bash
71
+ python ../createDemo.py
72
+ ```
73
+
74
+ ## For more:
75
+ - **Simple Blocks**: Basic building blocks for surveys.
76
+ - **Compound Blocks**: Advanced layouts using structured containers.
77
+
78
+ ## Documentation Structure
79
+
80
+ ### [1. Simple Blocks - Building Survey Components](simpleBlocks.html)
81
+ 1.1. [Introduction](simpleBlocks.html#introduction)
82
+ 1.2. [Starting with a Basic Text Block](simpleBlocks.html#starting-with-a-basic-text-block)
83
+ 1.3. [Adding Multi-Row Checked Questions](simpleBlocks.html#adding-multi-row-checked-questions)
84
+ 1.4. [Using Multi-Row Selection (Dropdown)](simpleBlocks.html#using-multi-row-selection-dropdown)
85
+ 1.5. [Final Full Code: Complete Running Example](simpleBlocks.html#final-full-code-complete-running-example)
86
+ 1.6. [Next Steps](simpleBlocks.html#next-steps)
87
+
88
+ ### [2. Compound Blocks - Structuring Surveys](compoundBlocks.html)
89
+ 2.1. [Introduction](compoundBlocks.html#introduction)
90
+ 2.2. [Using Columns](compoundBlocks.html#using-columns)
91
+ 2.3. [Using Tabs](compoundBlocks.html#using-tabs)
92
+ 2.4. [Adding Interactive Elements](compoundBlocks.html#adding-interactive-elements)
93
+ 2.5. [Final Full Code: Complete Running Example](compoundBlocks.html#final-full-code-complete-running-example)
94
+ 2.6. [Next Steps](compoundBlocks.html#next-steps)
95
+
96
+ ---
97
+
98
+ ## Navigation
99
+ - [1. Simple Blocks - Building Survey Components](simpleBlocks.html)
100
+ - [2. Compound Blocks - Structuring Surveys](compoundBlocks.html)
101
+
102
+ ---
@@ -0,0 +1,15 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/htmleval.egg-info/PKG-INFO
5
+ src/htmleval.egg-info/SOURCES.txt
6
+ src/htmleval.egg-info/dependency_links.txt
7
+ src/htmleval.egg-info/top_level.txt
8
+ src/json/reviewJsonLib.py
9
+ src/json/compoundBlocks/column.py
10
+ src/json/compoundBlocks/interactive.py
11
+ src/json/compoundBlocks/tabs.py
12
+ src/json/simpleBlocks/multiRowChecked.py
13
+ src/json/simpleBlocks/multiRowOption.py
14
+ src/json/simpleBlocks/multiRowSelect.py
15
+ src/json/simpleBlocks/text.py
@@ -0,0 +1,3 @@
1
+ html
2
+ js
3
+ json
@@ -0,0 +1,13 @@
1
+ import json
2
+
3
+ class Column:
4
+
5
+ def __init__(self):
6
+ self.type="column"
7
+ self.content=[]
8
+
9
+ def add_column(self,blocks):
10
+ self.content.append(blocks)
11
+
12
+
13
+
@@ -0,0 +1,25 @@
1
+ class InteractiveFragment:
2
+
3
+ def __init__(self, text: str, block):
4
+ self.text=text
5
+ self.block=block
6
+
7
+ class InteractiveParagraph:
8
+
9
+ def __init__(self):
10
+ self.fragments=[]
11
+
12
+ def addFragment(self,f : InteractiveFragment):
13
+ self.fragments.append(f)
14
+
15
+ class Interactive:
16
+
17
+ def __init__(self):
18
+ self.type="interactive"
19
+ self.content=[]
20
+
21
+ def addParagraph(self,p : InteractiveParagraph):
22
+ self.content.append(p)
23
+
24
+
25
+
@@ -0,0 +1,14 @@
1
+ class Tabs:
2
+
3
+ def __init__(self):
4
+ self.type="tabs";
5
+ self.content=[]
6
+
7
+ def add_tab(self,tabName: str, block):
8
+ self.content.append({
9
+ "tabName": tabName,
10
+ "block" : block
11
+ })
12
+
13
+
14
+
@@ -0,0 +1,12 @@
1
+ import json
2
+
3
+ class ReviewJSON:
4
+
5
+ def __init__(self,root):
6
+ self.root=root
7
+
8
+ def get_json(self):
9
+ return json.dumps(self.root,default=lambda x: x.__dict__)
10
+
11
+
12
+
@@ -0,0 +1,21 @@
1
+ from src.json.simpleBlocks.multiRowOption import MultiRowOption
2
+
3
+ class MultiRowChecked:
4
+
5
+ def __init__(self,rowLabel: str, id: dict, options : list[MultiRowOption]):
6
+ self.type="multi_row_checked"
7
+ self.content={
8
+ "rowLabel" : rowLabel,
9
+ "id" : id,
10
+ "options" : options,
11
+ "rows": []
12
+ }
13
+
14
+ def add_row(self,id: dict, text: str):
15
+ self.content["rows"].append(
16
+ {
17
+ "id" : id,
18
+ "text" : text
19
+ }
20
+ )
21
+
@@ -0,0 +1,7 @@
1
+ class MultiRowOption:
2
+
3
+ def __init__(self,label : str,value : str,color :str =None):
4
+ self.label=label
5
+ self.value=value
6
+ if color is not None:
7
+ self.color=color
@@ -0,0 +1,27 @@
1
+ from src.json.simpleBlocks.multiRowOption import MultiRowOption
2
+
3
+ class MultiRowSelectQuestion:
4
+
5
+ def __init__(self,label: str, id: dict, options : list[MultiRowOption]):
6
+ self.label=label
7
+ self.id=id
8
+ self.options=options
9
+
10
+ class MultiRowSelect:
11
+
12
+ def __init__(self,rowLabels: list[str],questions: list[MultiRowSelectQuestion]):
13
+ self.type="multi_row_select"
14
+ self.content={
15
+ "rowLabels" : rowLabels,
16
+ "questions": questions,
17
+ "rows": []
18
+ }
19
+
20
+ def add_row(self,text:list[str], id: dict):
21
+ self.content["rows"].append(
22
+ {
23
+ "text" : text,
24
+ "id" : id
25
+ }
26
+ )
27
+
@@ -0,0 +1,18 @@
1
+ class Text:
2
+
3
+ def __init__(self, title: str,titleSize: int, body: list[str] = None,scrollable : bool = False,is_table : bool = False):
4
+ self.type="text"
5
+ self.content={
6
+ "scrollable" : scrollable
7
+ }
8
+ if title is not None:
9
+ self.content["title"]={
10
+ "text": title,
11
+ "size" : titleSize
12
+ }
13
+ if body is not None:
14
+ self.content["body"]={
15
+ "is_table" : is_table,
16
+ "text": body
17
+ }
18
+