From 37a76f3cf249e8c36f4cc09afe5460132350eb60 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Mon, 9 Dec 2024 15:25:24 +0800 Subject: [PATCH 1/2] feat: clean up to new structure --- .bundle/config | 3 - Makefile | 177 ------------------------------ README.adoc | 82 +++++++++----- sources/sections/00-abstract.adoc | 3 +- 4 files changed, 57 insertions(+), 208 deletions(-) delete mode 100644 .bundle/config delete mode 100644 Makefile diff --git a/.bundle/config b/.bundle/config deleted file mode 100644 index b572b09..0000000 --- a/.bundle/config +++ /dev/null @@ -1,3 +0,0 @@ ---- -BUNDLE_RETRY: "3" -BUNDLE_JOBS: "4" diff --git a/Makefile b/Makefile deleted file mode 100644 index 6fec74b..0000000 --- a/Makefile +++ /dev/null @@ -1,177 +0,0 @@ -# Auto-generated by Cimas: Do not edit it manually! -# See https://github.com/metanorma/cimas -#!make -SHELL := /bin/bash -# Ensure the xml2rfc cache directory exists locally -IGNORE := $(shell mkdir -p $(HOME)/.cache/xml2rfc) - -SRC := $(shell yq r metanorma.yml metanorma.source.files | cut -c 3-) - -ifeq ($(SRC),null) -SRC := -endif -ifeq ($(SRC),ll) -SRC := -endif - -ifeq ($(SRC),) -BUILT := $(shell yq r metanorma.yml metanorma.source.built_targets | cut -d ':' -f 1 | tr -s '\n' ' ') - -ifeq ($(BUILT),null) -SRC := -endif -ifeq ($(BUILT),ll) -SRC := -endif - -ifeq ($(BUILT),) -SRC := $(filter-out README.adoc, $(wildcard sources/*.adoc)) -else -XML := $(patsubst sources/%,documents/%,$(BUILT)) -endif -endif - -FORMATS := $(shell yq r metanorma.yml metanorma.formats | tr -d '[:space:]' | tr -s '-' ' ') -ifeq ($(FORMATS),) -FORMAT_MARKER := mn-output- -FORMATS := $(shell grep "$(FORMAT_MARKER)" $(SRC) | cut -f 2 -d " " | tr "," "\\n" | sort | uniq | tr "\\n" " ") -endif - -XML ?= $(patsubst sources/%,documents/%,$(patsubst %.adoc,%.xml,$(SRC))) -HTML := $(patsubst %.xml,%.html,$(XML)) - -ifdef METANORMA_DOCKER - PREFIX_CMD := echo "Running via docker..."; docker run -v "$$(pwd)":/metanorma/ $(METANORMA_DOCKER) -else - PREFIX_CMD := echo "Running locally..."; bundle exec -endif - -_OUT_FILES := $(foreach FORMAT,$(FORMATS),$(shell echo $(FORMAT) | tr '[:lower:]' '[:upper:]')) -OUT_FILES := $(foreach F,$(_OUT_FILES),$($F)) - -define print_vars - $(info "src $(SRC)") - $(info "xml $(XML)") - $(info "formats $(FORMATS)") -endef - -all: documents.html - $(call print_vars) - -documents: - mkdir -p $@ - -documents/%.html: documents/%.xml | documents - ${PREFIX_CMD} metanorma $< - -documents/%.xml: sources/%.xml | documents - mkdir -p $(dir $@) - mv $< $@ - -# Build canonical XML output -# If XML file is provided, copy it over -# Otherwise, build the xml using adoc -sources/%.xml: | bundle - BUILT_TARGET="$(shell yq r metanorma.yml metanorma.source.built_targets[$@])"; \ - if [ "$$BUILT_TARGET" = "" ] || [ "$$BUILT_TARGET" = "null" ]; then \ - BUILT_TARGET=$@; \ - $(PREFIX_CMD) metanorma -x xml "$${BUILT_TARGET//xml/adoc}"; \ - else \ - if [ -f "$$BUILT_TARGET" ] && [ "$${BUILT_TARGET##*.}" == "xml" ]; then \ - cp "$$BUILT_TARGET" $@; \ - else \ - $(PREFIX_CMD) metanorma -x xml $$BUILT_TARGET; \ - cp "$${BUILT_TARGET//adoc/xml}" $@; \ - fi \ - fi - -documents.rxl: $(XML) $(HTML) - ${PREFIX_CMD} relaton concatenate \ - -t "$(shell yq r metanorma.yml relaton.collection.name)" \ - -g "$(shell yq r metanorma.yml relaton.collection.organization)" \ - documents $@ - -documents.html: documents.rxl - $(PREFIX_CMD) relaton xml2html documents.rxl - -%.adoc: - -define FORMAT_TASKS -OUT_FILES-$(FORMAT) := $($(shell echo $(FORMAT) | tr '[:lower:]' '[:upper:]')) - -open-$(FORMAT): - open $$(OUT_FILES-$(FORMAT)) - -clean-$(FORMAT): - rm -f $$(OUT_FILES-$(FORMAT)) - -$(FORMAT): clean-$(FORMAT) $$(OUT_FILES-$(FORMAT)) - -.PHONY: clean-$(FORMAT) - -endef - -$(foreach FORMAT,$(FORMATS),$(eval $(FORMAT_TASKS))) - -open: open-html - -clean: - rm -rf documents documents.{html,rxl} published *_images $(OUT_FILES) - -bundle: -ifndef METANORMA_DOCKER - bundle install --jobs 4 --retry 3 -endif - $(call print_vars) - -.PHONY: bundle all open clean - -# -# Watch-related jobs -# - -.PHONY: watch serve watch-serve - -NODE_BINS := onchange live-serve run-p -NODE_BIN_DIR := node_modules/.bin -NODE_PACKAGE_PATHS := $(foreach PACKAGE_NAME,$(NODE_BINS),$(NODE_BIN_DIR)/$(PACKAGE_NAME)) - -$(NODE_PACKAGE_PATHS): package.json - npm i - -watch: $(NODE_BIN_DIR)/onchange - make all - $< $(ALL_SRC) -- make all - -define WATCH_TASKS -watch-$(FORMAT): $(NODE_BIN_DIR)/onchange - make $(FORMAT) - $$< $$(SRC_$(FORMAT)) -- make $(FORMAT) - -.PHONY: watch-$(FORMAT) -endef - -$(foreach FORMAT,$(FORMATS),$(eval $(WATCH_TASKS))) - -serve: $(NODE_BIN_DIR)/live-server revealjs-css reveal.js - export PORT=$${PORT:-8123} ; \ - port=$${PORT} ; \ - for html in $(HTML); do \ - $< --entry-file=$$html --port=$${port} --ignore="*.html,*.xml,Makefile,Gemfile.*,package.*.json" --wait=1000 & \ - port=$$(( port++ )) ;\ - done - -watch-serve: $(NODE_BIN_DIR)/run-p - $< watch serve - -# -# Deploy jobs -# - -publish: published - -published: documents.html - mkdir -p $@ && \ - cp -a documents $@/ && \ - cp $< $@/index.html; - diff --git a/README.adoc b/README.adoc index 27d8a94..addc640 100644 --- a/README.adoc +++ b/README.adoc @@ -1,29 +1,51 @@ -:repo-name: csd-ical-relations - = CalConnect Standard: Calendaring and scheduling -- Support for iCalendar Relationships -This work item belongs to TC FREEBUSY. +This work item belongs to TC CALENDAR. -image:https://travis-ci.com/CalConnect/csd-ical-relations.svg?branch=master["Build Status", link="https://travis-ci.com/CalConnect/csd-ical-relations"] +image:https://github.com/CalConnect/cc-ical-relations/actions/workflows/generate.yml/badge.svg["Build Status", link="https://github.com/CalConnect/cc-ical-relations/actions/workflows/generate.yml"] This document is available in its rendered forms here: -* https://calconnect.github.io/csd-ical-relations/[CalConnect Standard: Calendaring and scheduling -- Support for iCalendar Relationships (HTML)] -* https://calconnect.github.io/csd-ical-relations/csd-ical-relations.pdf[PDF] -* https://calconnect.github.io/csd-ical-relations/csd-ical-relations.xml[Metanorma XML] -* https://calconnect.github.io/csd-ical-relations/csd-ical-relations.rxl[Relaton XML (Bibliographic item)] +* https://calconnect.github.io/cc-ical-relations/[CalConnect+IETF: Calendaring and scheduling -- Support for iCalendar Relationships] + +== General + +This document updates RELATED-TO defined in RFC 5545 and introduces new +iCalendar properties LINK, CONCEPT and REFID to allow better linking and +grouping of iCalendar components and related data. + +The document is published as the following: + +* CalConnect CC 51004 +* IETF draft-ietf-calext-ical-relations + + +== Structure + +`sources/`:: +source of documents and models + +`sources/cc-51004.adoc`:: +CalConnect CC 51004 standard. + +`sources/draft-ietf-calext-ical-relations.adoc`:: +IETF draft-ietf-calext-ical-relations, dual-published from CC 51004. + +`_site/`:: +(automatically generated using `metanorma site generate`) published document. == Fetching the document [source,sh] ---- -git clone https://github.com/CalConnect/csd-ical-relations/ +git clone https://github.com/CalConnect/cc-ical-relations/ ---- -== Installing Build Tools -See https://www.metanorma.com/overview/getting-started/ +== Installing build tools + +See https://www.metanorma.org/install/ == Running via Docker or locally @@ -31,38 +53,44 @@ See https://www.metanorma.com/overview/getting-started/ If you have installed the build tools locally, and wish to run the locally-installed compilation tools, there is nothing further to set. -If you don't want to deal with local dependencies, use the docker -version by: +If you don't want to deal with local dependencies, use the docker: [source,sh] ---- -export METANORMA_DOCKER=1 +docker run -v "$(pwd)":/metanorma -w /metanorma -it metanorma/mn metanorma site generate --agree-to-terms ---- -The `Makefile` will automatically choose the proper command to -execute. - -== Building The Document +== Building the document [source,sh] ---- -make clean all +metanorma site generate --agree-to-terms ---- -The following outputs will be built: - -* CSD XML (https://github.com/calconnect/metanorma-model-csd) (`[filename].xml`) -* HTML (`[filename].html`) -* PDF (`[filename].pdf`) -* Word DOC (`[filename].doc`) +The generated documents are accessible under `_site/`. == Iterating the document [source,sh] ---- -make html -open csd-*.html +metanorma site generate --agree-to-terms +open _site/index.html ---- + +== IETF: Checking against idnits + +https://tools.ietf.org/tools/idnits/[idnits] is the RFC checking tool prior to +submissions. + +[source,sh] +---- +idnits draft-ietf-calext-ical-relations.nits +---- + + +== License + +Copyright its respective authors and CalConnect. diff --git a/sources/sections/00-abstract.adoc b/sources/sections/00-abstract.adoc index 6647c52..54be48b 100644 --- a/sources/sections/00-abstract.adoc +++ b/sources/sections/00-abstract.adoc @@ -1,5 +1,6 @@ -[abstract] +.Abstract + This document updates RELATED-TO defined in <> and introduces new iCalendar properties LINK, CONCEPT and REFID to allow better linking and grouping of iCalendar components and related data. From e1548cb3f02c1ec824ce10d5d27fc05e24cdf184 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Mon, 9 Dec 2024 15:25:29 +0800 Subject: [PATCH 2/2] chore: fix formatting --- sources/sections/09-newproperties.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/sections/09-newproperties.adoc b/sources/sections/09-newproperties.adoc index 3ee9aa8..400fb10 100644 --- a/sources/sections/09-newproperties.adoc +++ b/sources/sections/09-newproperties.adoc @@ -40,6 +40,7 @@ Possible category resources are the various proprietary systems, something like the dmoz.org data. Format Definition:: ++ -- This property is defined by the following notation: @@ -169,6 +170,7 @@ Description:: The value of this property is a text identifier that have the same REFID value. Format Definition:: ++ -- This property is defined by the following notation: