From f5cc45176d82ee9c25fc54ab02aec75848560c70 Mon Sep 17 00:00:00 2001 From: Tony Scimone Date: Tue, 26 May 2020 13:07:19 -0600 Subject: [PATCH 1/8] Fix Examples Files html page data issue where data for sections which have more than one example file were being overwritten due to the nature of the nested loop. --- web/templates/examples_template.html | 4 +++- web/web-content.py | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/web/templates/examples_template.html b/web/templates/examples_template.html index 65c8708..ed1cf83 100644 --- a/web/templates/examples_template.html +++ b/web/templates/examples_template.html @@ -7,9 +7,10 @@

{{headline}}


+ {{content.md}}
diff --git a/web/templates/schema_template.html b/web/templates/schema_template.html index 1cf5fd1..97536bc 100644 --- a/web/templates/schema_template.html +++ b/web/templates/schema_template.html @@ -22,6 +22,7 @@

{{item['title']}}
+ {{content.md}}
diff --git a/web/templates/templates_template.html b/web/templates/templates_template.html index f2b8341..a3be80d 100644 --- a/web/templates/templates_template.html +++ b/web/templates/templates_template.html @@ -25,6 +25,7 @@

{{item['description']}}

{% endfor %} + {{content.md}}
diff --git a/web/templates/tk205_template.html b/web/templates/tk205_template.html index e38fde9..f26961a 100644 --- a/web/templates/tk205_template.html +++ b/web/templates/tk205_template.html @@ -8,6 +8,7 @@

Toolkit 205


A toolkit to facilitate the adoption of the ASHRAE Standard 205P data exchange specification.

Toolkit 205 Github Repository + {{content.md}}
diff --git a/web/web-content.py b/web/web-content.py index 6637da3..5f3326e 100644 --- a/web/web-content.py +++ b/web/web-content.py @@ -5,6 +5,7 @@ from collections import OrderedDict from distutils.dir_util import copy_tree from jinja2 import Environment, FileSystemLoader +import markdown import tk205 from tk205.file_io import set_dir @@ -195,7 +196,13 @@ def generate(web_dir): generate_page(env, 'templates_template.html', 'templates.html', web_dir, 'XLSX Templates', templates_page_data) # Create index.html AKA about page - generate_page(env, 'about_template.html', 'index.html', web_dir, '', None) + md_file = open(os.path.join(root_dir, '..', "README.md")) + md_content = md_file.read() + md_file.close() + html = markdown.markdown(md_content) + about_page_data = OrderedDict() + about_page_data['md'] = html + generate_page(env, 'about_template.html', 'index.html', web_dir, '', about_page_data) # Create toolkit205.html generate_page(env, 'tk205_template.html', 'tk205.html', web_dir, '', None) From 661c8c071e17060ceea07c50966f88f4e661b3e2 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Wed, 27 May 2020 16:11:31 -0600 Subject: [PATCH 3/8] Add markdown content to web pages. --- web/markdown-content/about.md | 33 ++++++++++++++++++++ web/markdown-content/examples.md | 8 +++++ web/markdown-content/schema.md | 1 + web/markdown-content/templates.md | 1 + web/markdown-content/tk205.md | 1 + web/templates/about_template.html | 9 +----- web/templates/examples_template.html | 3 +- web/templates/schema_template.html | 6 ++-- web/templates/templates_template.html | 5 +-- web/templates/tk205_template.html | 6 ++-- web/web-content.py | 44 +++++++++++++++++++-------- 11 files changed, 87 insertions(+), 30 deletions(-) create mode 100644 web/markdown-content/about.md create mode 100644 web/markdown-content/examples.md create mode 100644 web/markdown-content/schema.md create mode 100644 web/markdown-content/templates.md create mode 100644 web/markdown-content/tk205.md diff --git a/web/markdown-content/about.md b/web/markdown-content/about.md new file mode 100644 index 0000000..3829823 --- /dev/null +++ b/web/markdown-content/about.md @@ -0,0 +1,33 @@ +# ASHRAE Standard 205P: Representation of Performance Data for HVAC&R and Other Facility Equipment + +## Purpose + +To facilitate automated sharing of equipment performance characteristics by defining data models and data serialization formats. + +## Scope + +This standard applies to performance data for any HVAC&R or other facility system, equipment, or component. + +## About ASHRAE Standard 205P + +ASHRAE Standard 205P defines common data models and serialization formats for facility equipment performance data needed for engineering applications such as energy simulation. The formats allow automated exchange among data sources (manufacturers), simulation models, and other engineering applications. The formats and procedures specified in the standard are developed by SPC (Standard Project Committee) 205 under ASHRAE and ANSI consensus processes. SPC-205 membership includes equipment manufacturers, application software developers, and engineering practitioners. + +Review copies of Standard 205P are available until July 29, 2020 at [ASHRAE’s online review portal](https://osr.ashrae.org/default.aspx). + +Standard 205 defines the term representation to mean a Concise Binary Object Representation (CBOR) file conforming to a JSON schema defined by a human-readable (text) document called a representation specification. Representation specifications are included in Standard 205P appended as an open-ended set. + +Standard 205 structure and application can be visualized as follows: + +![Visualization of Standard 205 structure and application](assets/images/standard-205-diagram.svg) + +This web site hosts supporting material for each representation specification, including: + +- [***JSON schema***](schema.html) files are the software-readable equivalent of the data model portion of each representation specification. The files are a normative portion of Standard 205. + +- [***Examples files***](examples.html) provide illustrative examples of each representation. Several file formats are provided. + +- [***XLSX templates***](templates.html) can be downloaded, populated by hand, and then process with [Toolkit 205](tk205.html) procedures to convert to a standard CBOR representation. + +All representations have common structures and elements. An open source project https://github.com/open205 is underway to provide software components for use by data publishers and application developers. + +SPC 205 is developing representation specifications for additional equipment types. These will be published in future revisions of the standard. \ No newline at end of file diff --git a/web/markdown-content/examples.md b/web/markdown-content/examples.md new file mode 100644 index 0000000..1ba1ccc --- /dev/null +++ b/web/markdown-content/examples.md @@ -0,0 +1,8 @@ +Examples provided here are for illustrative purposes only. While CBOR is the official representation format defined by ASHRAE Standard 205P, it is sometime convenient to view and edit representation data in other formats. All other file formats must be translated to CBOR for use in application software. [Toolkit 205](tk205.html) + +Each example represntation is provided in four formats: + +- **[CBOR](https://cbor.io/):** CBOR is machine-readable, but not human-readable. +- **XLSX:** Convenient spreadsheet format for viewing and editing representation data (see [XLSX Templates](templates.html) for empty examples for creating new representations). +- **[JSON](https://www.json.org/):** A common, human-and-machine-readable data exchange format. +- **[YAML](https://yaml.org/):** An alterntaive common, human-and-machine-readable data exchange format. \ No newline at end of file diff --git a/web/markdown-content/schema.md b/web/markdown-content/schema.md new file mode 100644 index 0000000..11e7bf2 --- /dev/null +++ b/web/markdown-content/schema.md @@ -0,0 +1 @@ +***Informative note:*** The schema is maintained in the [schema-205](https://github.com/open205/schema-205) GitHub repository. \ No newline at end of file diff --git a/web/markdown-content/templates.md b/web/markdown-content/templates.md new file mode 100644 index 0000000..8080b2e --- /dev/null +++ b/web/markdown-content/templates.md @@ -0,0 +1 @@ +Templates set up in the XLSX format for users to generate 205 compliant data. These templates will need to be translated into CBOR, but can be validated directly using *Toolkit 205*. \ No newline at end of file diff --git a/web/markdown-content/tk205.md b/web/markdown-content/tk205.md new file mode 100644 index 0000000..7872bee --- /dev/null +++ b/web/markdown-content/tk205.md @@ -0,0 +1 @@ +A software toolkit to facilitate the adoption of the ASHRAE Standard 205P data exchange specification. \ No newline at end of file diff --git a/web/templates/about_template.html b/web/templates/about_template.html index 5b10834..fbc184d 100644 --- a/web/templates/about_template.html +++ b/web/templates/about_template.html @@ -4,14 +4,7 @@
-

ASHRAE Standard 205P

-
-

Representation of Performance Data for HVAC&R and Other Facility Equipment

-

Purpose

-

To facilitate automated sharing of equipment performance characteristics by defining data models and data serialization formats.

-

Scope

-

This standard applies to performance data for any HVAC&R or other facility system, equipment, or component.

- {{content.md}} + {{markdown}}
diff --git a/web/templates/examples_template.html b/web/templates/examples_template.html index 11d2322..fc45550 100644 --- a/web/templates/examples_template.html +++ b/web/templates/examples_template.html @@ -6,6 +6,8 @@

{{headline}}


+ {{markdown}} +
    {% for key, items in content.items() %}
  • @@ -64,7 +66,6 @@

    {{item['description']}} {% endfor %}
- {{content.md}}
diff --git a/web/templates/schema_template.html b/web/templates/schema_template.html index 97536bc..23a4b4d 100644 --- a/web/templates/schema_template.html +++ b/web/templates/schema_template.html @@ -7,8 +7,9 @@

{{headline}}


- - {% for key, item in content.items() %} + {{markdown}} +
+ {% for key, item in content.items() %}

{{item['title']}}

@@ -22,7 +23,6 @@

{{item['title']}}
- {{content.md}}

diff --git a/web/templates/templates_template.html b/web/templates/templates_template.html index a3be80d..98ef2c7 100644 --- a/web/templates/templates_template.html +++ b/web/templates/templates_template.html @@ -6,6 +6,8 @@

{{headline}}


+ {{markdown}} +
    {% for key, rs_item in content.items() %}
  • @@ -25,12 +27,11 @@

    {{item['description']}}

  • {% endfor %}
- {{content.md}}
- +