Skip to content

Commit

Permalink
Publication Prep (#290)
Browse files Browse the repository at this point in the history
* add readme

* copyover root indexhtml

* generate statichtml from respec

* disable extension and regen statichtml

* tidy statichtml as overviewhtml

* fix capitalization

* copyover images

* add w3c group note

* regenerate static and overview after respec working

* get results from html tidy

* change ed to note

* change ed to note

* fix capitalization

* regen everything with NOTE option

* make links absolute

* correct link

* regen after link correction

* correct mqtt  ontology link

* document guide page

* fix tidy mistakes

* change respec config to github from githubApi
  • Loading branch information
egekorkan authored May 31, 2023
1 parent 605149d commit 2ccbd44
Show file tree
Hide file tree
Showing 11 changed files with 8,513 additions and 9 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ $ node render.js
This rendering process is mandated through the use of a [Husky](https://www.npmjs.com/package/husky) pre-commit hook.
Make sure to run `npm install` first to install husky in the first place.

## Specberus

Many information about a spec can be obtained from [Specberus](https://github.com/w3c/specberus) hosted by the W3C.
Below are some requests that are usually useful:

1. Get general information: `curl "https://www.w3.org/pubrules/api/metadata?url=https://w3c.github.io/wot-binding-templates/"`
2. Validate document: `curl "https://www.w3.org/pubrules/api/validate?url=https://w3c.github.io/wot-binding-templates/&profile=auto"`

## Editing Conventions

Please use [EditorConfig](https://editorconfig.org/) by installing a plugin for your favorite editor.
Expand Down
18 changes: 9 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
noRecTrack: true,
wgPublicList: "public-wot-wg",
edDraftURI: "https://w3c.github.io/wot-binding-templates/",
githubAPI: "https://api.github.com/repos/w3c/wot-binding-templates",
github: "https://github.com/w3c/wot-binding-templates",
issueBase: "https://www.github.com/w3c/wot-binding-templates/issues",
editors: [{
name: "Michael Koster",
Expand Down Expand Up @@ -556,26 +556,26 @@ <h4>Existing Protocol Binding Templates</h4>
<tr>
<td>HTTP</td>
<td>Hypertext Transfer Protocol</td>
<td><a href="./bindings/protocols/http/index.html">Binding Template</a></td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/protocols/http/index.html">Binding Template</a></td>
<td><a href="https://www.w3.org/TR/HTTP-in-RDF10/">Ontology</a></td>
</tr>
<tr>
<td>CoAP</td>
<td>Constrained Application Protocol</td>
<td><a href="./bindings/protocols/coap/index.html">Binding Template</a></td>
<td><a href="./bindings/protocols/coap/ontology.html">Ontology</a></td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/protocols/coap/index.html">Binding Template</a></td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/protocols/coap/ontology.html">Ontology</a></td>
</tr>
<tr>
<td>MQTT</td>
<td>Message Queuing Telemetry Transport</td>
<td><a href="./bindings/protocols/mqtt/index.html">Binding Template</a></td>
<td><a href="./bindings/protocols/mqtt/ontology.html">Ontology</a></td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/protocols/mqtt/index.html">Binding Template</a></td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/protocols/mqtt/ontology.html">Ontology</a></td>
</tr>
<tr>
<td>Modbus</td>
<td>Modbus</td>
<td><a href="./bindings/protocols/modbus/index.html">Binding Template</a></td>
<td><a href="./bindings/protocols/modbus/ontology.html">Ontology</a></td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/protocols/modbus/index.html">Binding Template</a></td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/protocols/modbus/ontology.html">Ontology</a></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -908,7 +908,7 @@ <h4>Existing Payload Binding Templates</h4>
<td>XML</td>
<td>eXtensible Markup Language</td>
<td><code>application/xml</code></td>
<td><a href="./bindings/payloads/xml/index.html">Link</a>(Work in Progress)</td>
<td><a href="https://w3c.github.io/wot-binding-templates/bindings/payloads/xml/index.html">Link</a> (Work in Progress)</td>
</tr>
<tr>
<td>text</td>
Expand Down
31 changes: 31 additions & 0 deletions publication/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# How to Edit the Draft for Publication

In each sub directory, you can find the relevant files for the publication process.
In general, you should always consult the W3C Guide page at <https://www.w3.org/Guide>.

## Files

* Overview.html - static HTML for publication
* diff.html - diff between the [previous published verion](https://www.w3.org/TR/2020/NOTE-wot-binding-templates-20200130/) and Overview.html
* index.html - same as the index.html at <https://w3c.github.io/wot-binding-templates/> ([or at the root of the repository](../index.html)) as of 24 May 2023, except for changing the respec option from ED to NOTE.
* static.html - static HTML generated by ReSpec from the index.html above

## How to Generate Each File

Overview.html is generated as follows:

1. Copy index.html from [the root of the repository](../index.html).
2. Change `specStatus` to `"NOTE"` from `"ED"`.
3. Generate static.html by ReSpec from <https://w3c.github.io/wot-binding-templates/> (click "ReSpec" top right and choose "Export" then export as "HTML"). Make sure that you disable browser extensions or open in private window.
4. Output Overview.html as a result of [HTML Tidy](https://www.html-tidy.org/). Use the following command (`tidy -ashtml -i static.html > Overview.html`). The `-ashtml` option is needed until [this issue](https://github.com/htacg/tidy-html5/issues/660) is resolved at HTML Tidy.

## How to Add your Edits based on the Pubrules Errors and Warnings

After checking Overview.html using the [Pubrules checker](https://www.w3.org/pubrules/), we have to edit index.html and then
regenerate the static HTML based on the procedure above to make it easier to generate a Pull Request to update the original
at <https://w3c.github.io/wot-binding-templates> later.

1. Edit index.html,
2. Generate static.html by ReSpec from the index.html (click "ReSpec" top right and choose "Export" then export as "HTML",
3. copy static.html to Overview.html and tidy it up,
4. If there are any remaining errors/warnings with the Pubrules checker results, repeat the edit by going back to #1.
Loading

0 comments on commit 2ccbd44

Please sign in to comment.