From aa3e6fc602f7a9006bb31d0ba67ebe5a8dcf105f Mon Sep 17 00:00:00 2001 From: David Shafer Date: Fri, 12 May 2023 09:34:01 -0500 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ Makefile | 33 ++++++++++++++++++++++ all-entities.xsl | 36 +++++++++++++++++++++++ incommon-emails.xsl | 41 +++++++++++++++++++++++++++ incommon-entities.xsl | 38 +++++++++++++++++++++++++ incommon-tls-hosts-ports.xsl | 49 ++++++++++++++++++++++++++++++++ incommon-urls.xsl | 55 ++++++++++++++++++++++++++++++++++++ 7 files changed, 254 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 all-entities.xsl create mode 100644 incommon-emails.xsl create mode 100644 incommon-entities.xsl create mode 100644 incommon-tls-hosts-ports.xsl create mode 100644 incommon-urls.xsl diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43cf4ce --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.txt +*.xml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f1cac8f --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +MD_FILE := InCommon-metadata.xml +MD_URL := https://mdq.incommon.org/entities/all + +OUTPUT_FILES := all-entities.txt incommon-emails.txt incommon-entities.txt incommon-tls-hosts-ports.txt incommon-urls.txt + +all: $(OUTPUT_FILES) + @wc -l all-entities.txt + @wc -l incommon-emails.txt + @wc -l incommon-entities.txt + @wc -l incommon-tls-hosts-ports.txt + @wc -l incommon-urls.txt + +clean: + rm -f $(OUTPUT_FILES) + rm -f $(MD_FILE) + +$(MD_FILE): + curl -o $(MD_FILE) $(MD_URL) + +all-entities.txt: $(MD_FILE) $(@:.txt=.xsl) + xsltproc $(@:.txt=.xsl) $(MD_FILE) > $@ + +incommon-emails.txt: $(MD_FILE) $(@:.txt=.xsl) + xsltproc $(@:.txt=.xsl) $(MD_FILE) | sed -e 's/^mailto://' | sort -u > $@ + +incommon-entities.txt: $(MD_FILE) $(@:.txt=.xsl) + xsltproc $(@:.txt=.xsl) $(MD_FILE) > $@ + +incommon-tls-hosts-ports.txt: $(MD_FILE) $(@:.txt=.xsl) + xsltproc $(@:.txt=.xsl) $(MD_FILE) | grep '^https://' | awk -F'/' '{print $$3}' | sort -u > $@ + +incommon-urls.txt: $(MD_FILE) $(@:.txt=.xsl) + xsltproc $(@:.txt=.xsl) $(MD_FILE) | sort -u > $@ diff --git a/all-entities.xsl b/all-entities.xsl new file mode 100644 index 0000000..b34b545 --- /dev/null +++ b/all-entities.xsl @@ -0,0 +1,36 @@ + + + + + + + + + WARNING: Unmatched element: + + + + + + + + + + + + + + + + + + + + + + + diff --git a/incommon-emails.xsl b/incommon-emails.xsl new file mode 100644 index 0000000..f384100 --- /dev/null +++ b/incommon-emails.xsl @@ -0,0 +1,41 @@ + + + + + + + + + WARNING: Unmatched element: + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/incommon-entities.xsl b/incommon-entities.xsl new file mode 100644 index 0000000..758996d --- /dev/null +++ b/incommon-entities.xsl @@ -0,0 +1,38 @@ + + + + + + + + + WARNING: Unmatched element: + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/incommon-tls-hosts-ports.xsl b/incommon-tls-hosts-ports.xsl new file mode 100644 index 0000000..fe5da76 --- /dev/null +++ b/incommon-tls-hosts-ports.xsl @@ -0,0 +1,49 @@ + + + + + + + + + WARNING: Unmatched element: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/incommon-urls.xsl b/incommon-urls.xsl new file mode 100644 index 0000000..3f7d112 --- /dev/null +++ b/incommon-urls.xsl @@ -0,0 +1,55 @@ + + + + + + + + + WARNING: Unmatched element: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +