Skip to content

Commit

Permalink
Initial commit, only partly tested
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbarring committed Mar 22, 2024
1 parent 8a69229 commit 0a21257
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/adoc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ jobs:
- name: Set "final" tag and date-time formatting
if: github.event_name == 'release'
run: |
echo "FINAL_TAG=-a final" >> "$GITHUB_ENV"; echo "DATE_FMT=+%d %B, %Y" >> "$GITHUB_ENV"
echo "DATE_FMT=+%d %B, %Y" >> "$GITHUB_ENV"
echo "DOI=$(tail -n 1: doi-catalog.txt |cut -d : -f 2)" >> $GITHUB_ENV
echo "FINAL_TAG=-a final" >> "$GITHUB_ENV";
# Build cf-conventions.html using the Analog-inc asciidoctor-action
- name: Build cf-conventions.html
uses: Analog-inc/[email protected]
with:
shellcommand: 'asciidoctor --verbose ${FINAL_TAG} -a docprodtime=$(date -u ${DATE_FMT}) cf-conventions.adoc -D conventions_build; cp -r images conventions_build'
# Patch the cfconventions.org link
- run: sed -E -i 's+(See&#160;)(https://cfconventions.org)(&#160;for&#160;further&#160;information.)+\1<a href="\2" target="_blank">\2</a>\3+' ./conventions_build/cf-conventions.html
shellcommand: 'asciidoctor --verbose ${FINAL_TAG} -a doi=${DOI} -a docprodtime=$(date -u ${DATE_FMT}) cf-conventions.adoc -D conventions_build; cp -r images conventions_build'
# Remove the empty "Colophon" title and toc entry from the html version
- run: sed -i '/>&#160;</{N;N;d;}' ./conventions_build/cf-conventions.html
# Build cf-conventions.pdf using the Analog-inc asciidoctor-action
- name: Build cf-conventions.pdf
uses: Analog-inc/[email protected]
Expand Down
27 changes: 26 additions & 1 deletion cf-conventions.adoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
include::version.adoc[]
= NetCDF Climate and Forecast (CF) Metadata Conventions
Brian{nbsp}Eaton; Jonathan{nbsp}Gregory; Bob{nbsp}Drach; Karl{nbsp}Taylor; Steve{nbsp}Hankin; Jon{nbsp}Blower; John{nbsp}Caron; Rich{nbsp}Signell; Phil{nbsp}Bentley; Greg{nbsp}Rappa; Heinke{nbsp}Höck; Alison{nbsp}Pamment; Martin{nbsp}Juckes; Martin{nbsp}Raspaud; Randy{nbsp}Horne; Timothy{nbsp}Whiteaker; David{nbsp}Blodgett; Charlie{nbsp}Zender; Daniel{nbsp}Lee; David{nbsp}Hassell; Alan{nbsp}D.{nbsp}Snow; Tobias{nbsp}Kölling; Dave{nbsp}Allured; Aleksandar{nbsp}Jelenak; Anders{nbsp}Meier{nbsp}Soerensen; Lucile{nbsp}Gaultier; Sylvain{nbsp}Herlédan; Fernando{nbsp}Manzano; Lars{nbsp}Bärring; Christopher{nbsp}Barker; Sadie{nbsp}Bartholomew
Version{nbsp}{current-version},{nbsp}{nbsp}{docprodtime}: See{nbsp}https://cfconventions.org{nbsp}for{nbsp}further{nbsp}information.
Version{nbsp}{current-version},{nbsp}{nbsp}{docprodtime}
:doctype: book
:pdf-folio-placement: physical
:sectanchors:
:toc: macro
:toclevels: 3

[colophon:notitle]
== {nbsp}
Climate and Forecast Conventions version {current-version} {doi-text}

image::images/cc-zero.svg[, 10%]
This document is dedicated to the public domain following the link:https://creativecommons.org/publicdomain/zero/1.0/[Creative Commons CC0] Deed.

The Climate and Forecasting Conventions website https://cfconventions.org/ contains additional resources and provides further information.
ifdef::final[]
+
+
_Use the following reference to cite this version of the document:_ +
Eaton B., Gregory J., Drach B., Taylor K., Hankin S., Blower J., Caron J., Signell R., Bentley P.,
Rappa G., Höck H., Pamment A., Juckes M., Raspaud M., Horne R., Whiteaker T., Blodgett D., Zender C.,
Lee D., Hassell D., Snow A. D., Kölling T., Allured D., Jelenak A., Soerensen A. M., Gaultier L.,
Herlédan S., Manzano F., Bärring L., Barker C., Bartholomew S., 2023:
NetCDF Climate and Forecast (CF) Metadata Conventions version {current-version}.
XXXX XXXX XXXX XXXX XXXX XXXX +
+
(The author list may be shortened and replaced by "_et al._" as appropriate.)
endif::[]

'''


toc::[]

:numbered!:
Expand Down
2 changes: 2 additions & 0 deletions default-theme-CF-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ page:
margin_inner: 0.75in
margin_outer: 0.59in
size: A4
numbering:
start-at: after-toc
base:
text_align: justify
font_color: 333333
Expand Down
7 changes: 7 additions & 0 deletions doi-catalog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# No DOIs before version 1.12
# Format: last line MUST be the version to be released
# and MUST provide the correct doi-string starting with 10
# MUST NOT be any space before or after the colon
# version:full doi-string
1.11:
1.12:TEST-DOI
98 changes: 98 additions & 0 deletions images/cc-zero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions version.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ or with the commandline switch `-a final`.
ifdef::final[]
:current-version: {version}
:current-version-as-attribute: {version}
:doi-text: {nbsp}{nbsp}{nbsp}DOI: link:https://doi.org/{doi}[{doi}]
endif::[]
ifndef::final[]
:current-version: {version} draft
:current-version-as-attribute: {version}-draft
:doi-text: has not yet a DOI assigned.
endif::[]

0 comments on commit 0a21257

Please sign in to comment.