Skip to content

Commit

Permalink
Update termlist page build script and build 2020-08-23 version
Browse files Browse the repository at this point in the history
The termlist page build script was modified to include the modification date and examples, which are now included in the new versions of borrowed Darwin Core terms. The recently released updated versions of Darwin Core terms have replaced the obsolete versions. So the DwC term definitions and recommendations are now in harmony with Darwin Core itself.
  • Loading branch information
Steve Baskauf committed Aug 24, 2020
1 parent d752161 commit e7b4fe4
Show file tree
Hide file tree
Showing 5 changed files with 6,189 additions and 92 deletions.
18 changes: 17 additions & 1 deletion code/build_page.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Script to build the Audubon Core term list page using Markdown.
# Steve Baskauf 2018-06-20
# Updated 2020-01-28
# Updated 2020-08-23 to handle examples in borrowed Darwin Core terms
# This script merges static Markdown header and footer documents with term information tables (in Markdown) generated from data in the rs.tdwg.org repo from the TDWG Github site

# Note: this script calls a function from http_library.py, which requires importing the requests, csv, and json modules
Expand Down Expand Up @@ -83,6 +84,8 @@ def createMasterMetadataTable(termLists, listMetadata):
for column in range(len(header)):
if header[column] == 'term_localName':
localNameColumn = column
if header[column] == 'term_modified':
modifiedColumn = column
if header[column] == 'label':
labelColumn = column
if header[column] == 'tdwgutility_layer':
Expand All @@ -95,6 +98,8 @@ def createMasterMetadataTable(termLists, listMetadata):
definitionColumn = column
if header[column] == 'skos_scopeNote':
scopeNoteColumn = column
if header[column] == 'examples':
examplesColumn = column
if header[column] == 'dcterms_description':
notesColumn = column
if header[column] == 'tdwgutility_organizedInClass':
Expand All @@ -115,7 +120,7 @@ def createMasterMetadataTable(termLists, listMetadata):
if not found:
version_iri = ''

masterTable.append([ namespaceDict[termList], uriDict[termList], table[row][localNameColumn], table[row][labelColumn], table[row][layerColumn], table[row][requiredColumn], table[row][repeatableColumn], table[row][definitionColumn], table[row][scopeNoteColumn], table[row][notesColumn], table[row][organizedColumn], version_iri ])
masterTable.append([ namespaceDict[termList], uriDict[termList], table[row][localNameColumn], table[row][labelColumn], table[row][layerColumn], table[row][requiredColumn], table[row][repeatableColumn], table[row][definitionColumn], table[row][scopeNoteColumn], table[row][notesColumn], table[row][organizedColumn], version_iri, table[row][modifiedColumn], table[row][examplesColumn] ])

return masterTable

Expand Down Expand Up @@ -186,6 +191,12 @@ def buildMarkdown(table, displayOrder, displayLabel, displayComments, displayId)
text += '\t\t\t<td><a href="' + uri + '">' + uri + '</a></td>\n'
text += '\t\t</tr>\n'

if table[row][12] != '':
text += '\t\t<tr>\n'
text += '\t\t\t<td>Modified</td>\n'
text += '\t\t\t<td>' + table[row][12] + '</td>\n'
text += '\t\t</tr>\n'

if table[row][11] != '':
text += '\t\t<tr>\n'
text += '\t\t\t<td>Term version URI</td>\n'
Expand Down Expand Up @@ -216,6 +227,11 @@ def buildMarkdown(table, displayOrder, displayLabel, displayComments, displayId)
text += '\t\t\t<td>' + createLinks(table[row][9]) + '</td>\n'
#text += '\t\t\t<td>' + table[row][9] + '</td>\n'
text += '\t\t</tr>\n'
if table[row][13] != '':
text += '\t\t<tr>\n'
text += '\t\t\t<td>Examples</td>\n'
text += '\t\t\t<td>' + table[row][13] + '</td>\n'
text += '\t\t</tr>\n'
text += '\t</tbody>\n'
text += '</table>\n'
text += '\n'
Expand Down
16 changes: 7 additions & 9 deletions code/termlist-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ permalink: /termlist/

**Title:** Audubon Core Term List

**Date version issued:** 2020-01-27
**Date version issued:** 2020-08-23

**Date created:** 2013-10-23

**Part of TDWG Standard:** http://www.tdwg.org/standards/638

**This version:** http://rs.tdwg.org/ac/doc/termlist/2020-01-27
**This version:** <http://rs.tdwg.org/ac/doc/termlist/2020-08-23>

**Latest version:** http://rs.tdwg.org/ac/doc/termlist/
**Latest version:** <http://rs.tdwg.org/ac/doc/termlist/>

**Previous version:** [http://rs.tdwg.org/ac/doc/termlist/2013-10-23](2013-10-23)
**Previous version:** <http://rs.tdwg.org/ac/doc/termlist/2020-01-27>

**Abstract:** The Audubon Core is a set of vocabularies designed to
represent metadata for biodiversity multimedia resources and
Expand All @@ -34,18 +34,16 @@ adopted by Biodiversity Information Standards / TDWG at the general
meeting in October 2013 and updated in 2020. This document contains normative content that
may not be changed without due process.

**Contributors:** Robert A. Morris, Vijay Barve, Mihail Carausu, Vishwas
Chavan, José Cuadra, Chris Freeland, Gregor Hagedorn, Patrick Leary,
Dimitry Mozzherin, Annette Olson, Greg Riccardi, Ivan Teage, Steve Baskauf
**Contributors:** Robert A. Morris, Gregor Hagedorn, Annette Olson, Steve Baskauf, Vijay Barve, Mihail Carausu, Vishwas Chavan, José Cuadra, Chris Freeland, Patrick Leary, Dimitry Mozzherin, Greg Riccardi, Ivan Teage

**Creator:** GBIF/TDWG Multimedia Resources Task Group and Audubon Core Maintenance Group

**Bibliographic citation:** Audubon Core Maintenance Group. 2020. Audubon Core Term List. Biodiversity Information Standards (TDWG). http://rs.tdwg.org/ac/doc/termlist/2020-01-27
**Bibliographic citation:** Audubon Core Maintenance Group. 2020. Audubon Core Term List. Biodiversity Information Standards (TDWG). http://rs.tdwg.org/ac/doc/termlist/2020-08-23


## 1 Introduction

There are four documents included in the Aububon Core Standard. This document provides details about the terms included in Audubon Core vocabulary. The [Audubon Core Introduction](introduction.md) document provides a brief introduction to the Audubon Core Standard. For information about the structure of Audubon Core, see the [Audubon Core Structure](structure.md) document. For a more detailed guide to the use of Audubon Core, see the [Audubon Core Guide](guide.md) document.
There are four documents included in the Aububon Core Standard. This document provides details about the terms included in the 2020-08-23 version of the Audubon Core vocabulary. The [Audubon Core Introduction](introduction.md) document provides a brief introduction to the Audubon Core Standard. For information about the structure of Audubon Core, see the [Audubon Core Structure](structure.md) document. For a more detailed guide to the use of Audubon Core, see the [Audubon Core Guide](guide.md) document.


### 1.1 Status of the content of this document
Expand Down
8 changes: 4 additions & 4 deletions docs/termlist-2013-10-23.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ permalink: /termlist/2013-10-23

**Part of TDWG Standard:** http://www.tdwg.org/standards/638

**This version:** http://rs.tdwg.org/ac/doc/termlist/2013-10-23
**This version:** <http://rs.tdwg.org/ac/doc/termlist/2013-10-23>

**Latest version:** [http://rs.tdwg.org/ac/doc/termlist/](./)
**Latest version:** <http://rs.tdwg.org/ac/doc/termlist/>

**Replaced by:** [http://rs.tdwg.org/ac/doc/termlist/2020-01-27](./)
**Replaced by:** <http://rs.tdwg.org/ac/doc/termlist/2020-01-27>

**Abstract:** The Audubon Core is a set of vocabularies designed to
represent metadata for biodiversity multimedia resources and
Expand All @@ -40,7 +40,7 @@ Dimitry Mozzherin, Annette Olson, Greg Riccardi, Ivan Teage

**Creator:** GBIF/TDWG Multimedia Resources Task Group

**Bibliographic citation:** Multimedia Resources Task Group. 2013. Audubon Core Term List. Biodiversity Information Standards (TDWG). http://rs.tdwg.org/ac/doc/termlist/
**Bibliographic citation:** Multimedia Resources Task Group. 2013. Audubon Core Term List. Biodiversity Information Standards (TDWG). http://rs.tdwg.org/ac/doc/termlist/2013-10-23


## 1 Introduction
Expand Down
Loading

0 comments on commit e7b4fe4

Please sign in to comment.