Pokemon-Standards-Consortium / standards

All standards documents, both final and in progress, are in this repository. Proposals are to be submitted as Issues in here.
10 stars 2 forks source link

Proposal: Use YAML metadata #15

Closed kuizeo closed 11 months ago

kuizeo commented 2 years ago

Presently, drafts have a special header and are put in the drafts/ folder, while final documents have a normal header and are put in the final/ header. Instead of keeping two copies of each document, I propose we simply use YAML metadata at the beginning of the file to keep track of the (a) identifier of the document, (b) the title of the document, (c) the status of the document (final or draft), and (d) the version of the document (array of three integers: major, minor, patch). We may then leave the header as it would appear in the final version even in drafts.

For instance:

---
name: Identification of card expansions
identifier: 001

status: draft
version: [0, 0, 1]
---

# PSC 001: Identification of card expansions

...
kuizeo commented 2 years ago

Note for those unfamiliar with the syntax: when exported (e.x. as HTML or a PDF), this will not appear. On GitHub, it appears as a table at the beginning of the file.

immewnity commented 2 years ago

I like it! This is a great time to make the change too.

My primary concern is that there'd no longer be an easy way to tell if a standard is finalized without going into it. I suppose the README.md could be manually updated with a table/list. On the other hand, this would definitely streamline the process.

Anyone else have thoughts on this?

kuizeo commented 2 years ago

In the PR I'm working on, the README has a list of these. I suppose the list could be generated as follows:

  1. Surround the list with comments:

    Lorem ipsum...
    
    <!--LIST:START--!>
    Early Drafts:
    
    * PSC 001: ...
    <!--LIST:END--!>
  2. Write a script that replaces /<!--LIST:START--!>.+<!--LIST:END--!>/s with an autogenerated list.

The aforementioned script could be ran using GitHub actions.


Also, status should instead show a more specific status, e.x. "Early Draft" or "Working Draft".