Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML output: capture date of XML file prep and date of HTML rendering #1032

Open
1 task done
ajeanmahoney opened this issue Sep 18, 2023 · 6 comments · May be fixed by #1033
Open
1 task done

HTML output: capture date of XML file prep and date of HTML rendering #1032

ajeanmahoney opened this issue Sep 18, 2023 · 6 comments · May be fixed by #1033
Assignees
Labels
enhancement New feature or request

Comments

@ajeanmahoney
Copy link
Collaborator

Description

Currently the HTML output captures the version of xml2rfc in the <meta> element, e.g., <meta content="xml2rfc 3.17.4" name="generator"> and also in a comment:

<!-- Generator version information:
  xml2rfc 3.17.4
    Python 3.9.15
    ConfigArgParse 1.5.3
    google-i18n-address 3.0.0
    intervaltree 3.1.0
    Jinja2 3.1.2
    lxml 4.9.0
    platformdirs 3.8.0
    pycountry 22.3.5
    PyYAML 6.0
    requests 2.28.0
    setuptools 44.1.1
    six 1.16.0
    wcwidth 0.2.5
    weasyprint 56.1
-->

When the HTML output is created, it would be good to also have a timestamp of publication (that is, propagate the timestamp from the prepTime attribute found in the XML file) and a timestamp that captures when the HTML was rendered. If the HTML is then rerendered in the future, then these two timestamps will capture that info (that is, the publication timestamp will be older than the rendering timestamp).
See the RPAT meeting notes.

Code of Conduct

@ajeanmahoney ajeanmahoney added the enhancement New feature or request label Sep 18, 2023
@kesara kesara self-assigned this Sep 21, 2023
kesara added a commit to kesara/xml2rfc that referenced this issue Sep 21, 2023
This change adds the created datetime in the UTC time zone using ISO
datetime format for HTML output of an RFC.
Example:
```
<meta content="2023-09-21T10:47:04.440964+00:00" name="created">
```

Fixes ietf-tools#1032
@kesara kesara linked a pull request Sep 21, 2023 that will close this issue
@kesara
Copy link
Member

kesara commented Sep 21, 2023

With the change proposed in #1033, xml2rfc will add a new meta tag with name created.
This content for the meta tag will have the date & time (with UTC timezone) in ISO format.
Example:

    <meta content="2023-09-21T10:47:04.440964+00:00" name="created">

kesara added a commit to kesara/xml2rfc that referenced this issue Sep 22, 2023
This change adds the created datetime in the UTC time zone using ISO
datetime format for HTML output of an RFC.
Example:
```
<meta content="2023-09-21T10:47:04.440964+00:00" name="created">
```

Fixes ietf-tools#1032
kesara added a commit to kesara/xml2rfc that referenced this issue Sep 22, 2023
This change adds the created datetime in the UTC time zone using ISO
datetime format for HTML output of an RFC.
Example:
```
<meta content="2023-09-22T11:16Z" name="created">
```

Fixes ietf-tools#1032
@kesara
Copy link
Member

kesara commented Sep 22, 2023

I've updated the created timestamp to show hours and minutes with Z instead of +00:00.
Example:

<meta content="2023-09-22T11:16Z" name="created">

@kesara
Copy link
Member

kesara commented Sep 25, 2023

@ajeanmahoney, Are you proposing to have two new meta tags with this request?
i.e. publication date (derived from prepTime) and HTML created date.

Do we need to include time as well?

Note that the current prepTime includes time but not the timezone.

@ajeanmahoney
Copy link
Collaborator Author

Yes, two new meta tags, which don't need HH:MM info:

  • one that captures the prepTime of the XML file, for instance, with a label like the following (using the term 'publication' in the label would not be accurate because a file can be prepped for a while before it's published):
    <meta content="2023-08-01" name="XML-source-prepTime">
  • one that captures when the HTML file was created:
    <meta content="2023-09-22" name="created">

@rjsparks
Copy link
Member

If we have the time, why not include it?

@ajeanmahoney
Copy link
Collaborator Author

Mainly it's an accuracy versus precision thing. There is a nonzero span of time between generating the document and making it publicly available. It's why RFCs currently show only the month and year in the doc header. In these meta tags, it doesn't matter as much, but if we were to show this information in the document itself, say in a colophon at the end of the doc, day resolution should be sufficient for the reader.

@ajeanmahoney ajeanmahoney changed the title HTML output: capture date of publication and date of file generation HTML output: capture date of XML file prep and date of HTML rendering Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants