Skip to content

Commit

Permalink
RELEASE: draft-kowalik-regext-domainconnect-00
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Kowalik committed Jul 22, 2024
1 parent f4ccec7 commit 1963e71
Show file tree
Hide file tree
Showing 9 changed files with 4,056 additions and 3,578 deletions.
17 changes: 13 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
FROM docker.io/paulej/rfctools
RUN sudo dnf -y update && sudo dnf -y install git ruby ruby-devel
RUN bash -c "curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/centos.sh | bash" && \
curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/install-gems.sh | bash
FROM ghcr.io/ietf-tools/xml2rfc-base:latest

RUN apt-get -y update && apt-get -y install curl && apt-get -y clean

RUN bash -c curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/ubuntu.sh | bash && curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/install-gems.sh | bash

# Put the md2rfc script in place
COPY bin/md2rfc /usr/bin/

RUN apt-get -y update && apt-get -y install git nano default-jre && apt-get -y clean

# Specify the working directory when a container is started
WORKDIR /rfc
34 changes: 34 additions & 0 deletions .devcontainer/bin/md2rfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
#
# This script will invoke mmark to convert markdown to xml2rfc format,
# then it will invoke xml2rfc to produce an outout text file
#
# One may specify one or more markdown files (with the .md extension).
#

# Ensure that at least one file was specified
if [ $# -eq 0 ] ; then
echo "usage: md2rfc <draft_name.md> [<draft_name.md> ...]"
exit 1;
fi

# Loop through all of the specified .md files to produce .txt and .pdf files
# as output
while [ $# -gt 0 ] ; do
MDFILE=$1
shift
XMLFILE=$(echo $MDFILE | sed 's/\.md$/.xml/')
TXTFILE=$(echo $MDFILE | sed 's/\.md$/.txt/')
PDFFILE=$(echo $MDFILE | sed 's/\.md$/.pdf/')
HTMLFILE=$(echo $MDFILE | sed 's/\.md$/.html/')

if [ x"$MDFILE" == x"$XMLFILE" ] ; then
echo "Error: $MDFILE is not a .md file"
exit 1
else
mmark "$MDFILE" > "$XMLFILE" && \
xml2rfc --v3 --text "$XMLFILE" -o "$TXTFILE" && \
xml2rfc --v3 --pdf "$XMLFILE" -o "$PDFFILE" && \
xml2rfc --v3 --html "$XMLFILE" -o "$HTMLFILE"
fi
done
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"eamodio.gitlens",
"donjayamanne.githistory",
"asciidoctor.asciidoctor-vscode",
"Gruntfuggly.todo-tree"
"Gruntfuggly.todo-tree",
"ms-azuretools.vscode-docker"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"asciidoc.antora.enableAntoraSupport": true,
"editor.wordWrap": "wordWrapColumn"
}
Loading

0 comments on commit 1963e71

Please sign in to comment.