roman-gardens / gre

Gardens of the Roman Empire
http://roman-gardens.github.io/
8 stars 20 forks source link

Review and normalize keywords #221

Open kgjenkins opened 3 years ago

kgjenkins commented 3 years ago

Extract all the existing keywords (does a script already exist for this?) and have the editorial team review the list, merging any redundant terms, removing unwanted terms, etc.

jemillar commented 3 years ago

I've done some manually but also wonder if there is a script, e.g. to change all "portico" keyword/tags to Getty's "porticoes," "puteal" to "puteals," etc.

Screen Shot 2021-06-20 at 12 49 08 PM
kgjenkins commented 3 years ago

We can use Atom's "find/replace in project" to make these changes.

The trick is to search for instances of those words only in the list of keywords (not within paragraphs where changing to plural would break the grammar), so search for something like: - [portico](http://vocab.getty.edu/page/aat/300004145) and replace with: - [porticoes](http://vocab.getty.edu/page/aat/300004145)

@jemillar Are you doing a comprehensive review of the keywords, or just a partial review for now?

kgjenkins commented 3 years ago

In the article frontmatter, tags with punctuation may cause errors. For example:

tags:
- "pines (Pinus sp.)"

was causing Hugo to produce a file \tags\pines-pinus-sp.\page\1\index.html which is invalid on Windows due to the trailing period of the pines-pinus-sp. directory. Apparently Hugo automatically removes the parentheses (but not the period) and replaces spaces with hyphens when creating the directory name.

For now, I've changed such tags to pines (Pinus) and elms (Ulmus) (#249)

This problem only occurs with tags in the front matter. Keywords in the article itself can be formatted however we like, including:

### Keywords
-[elms (*Ulmus* sp.)]
jemillar commented 3 years ago

@jemillar Are you doing a comprehensive review of the keywords, or just a partial review for now?

I'm happy to do a comprehensive review if that would be helpful, seems like something we need. So far I've just been going piecemeal as they come up in the entries i'm editing.