Skip to content

Commit 31b85ed

Browse files
committed
Add some specs in markdown
1 parent d91d207 commit 31b85ed

10 files changed

Lines changed: 27629 additions & 0 deletions

specifications/openid-4-verifiable-credential-issuance-1_0.md

Lines changed: 4071 additions & 0 deletions
Large diffs are not rendered by default.

specifications/openid-connect-backchannel-1_0.md

Lines changed: 668 additions & 0 deletions
Large diffs are not rendered by default.

specifications/openid-connect-core-1_0.md

Lines changed: 5042 additions & 0 deletions
Large diffs are not rendered by default.

specifications/openid-connect-discovery-1_0.md

Lines changed: 1137 additions & 0 deletions
Large diffs are not rendered by default.

specifications/openid-connect-frontchannel-1_0.md

Lines changed: 451 additions & 0 deletions
Large diffs are not rendered by default.

specifications/openid-connect-rpinitiated-1_0.md

Lines changed: 453 additions & 0 deletions
Large diffs are not rendered by default.

specifications/openid-federation-1_0.md

Lines changed: 6409 additions & 0 deletions
Large diffs are not rendered by default.

specifications/update-specs.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env bash
2+
3+
# Update the specifications
4+
5+
# Check if pandoc is installed
6+
if ! command -v pandoc &> /dev/null
7+
then
8+
echo "pandoc could not be found. Please install it to run this script."
9+
exit 1
10+
fi
11+
12+
URLS=(
13+
"https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html"
14+
"https://openid.net/specs/openid-federation-1_0.html"
15+
"https://www.w3.org/TR/vc-data-model-2.0/"
16+
"https://www.w3.org/TR/vc-jose-cose/"
17+
"https://openid.net/specs/openid-connect-core-1_0.html"
18+
"https://openid.net/specs/openid-connect-discovery-1_0.html"
19+
"https://openid.net/specs/openid-connect-rpinitiated-1_0.html"
20+
"https://openid.net/specs/openid-connect-frontchannel-1_0.html"
21+
"https://openid.net/specs/openid-connect-backchannel-1_0.html"
22+
)
23+
24+
# For each of the specifications, fetch the content from the URL and save it
25+
# to a local markdown file. Use `pandoc` to convert the HTML to markdown.
26+
# The output file should be named after the last part of the URL, without the
27+
# extension. For example, for the URL "https://example.com/specs/spec1.html",
28+
# the output file should be "spec1.md".
29+
# The output file should be saved in the "specifications" directory.
30+
31+
SPEC_DIR="$(dirname "$0")"
32+
33+
for URL in "${URLS[@]}"
34+
do
35+
# Extract the filename without extension
36+
FILENAME=$(basename "$URL" .html)
37+
OUTPUT_FILE="$SPEC_DIR/$FILENAME.md"
38+
39+
echo "Updating $FILENAME..."
40+
41+
# Fetch and convert
42+
# -f html: from HTML
43+
# -t markdown: to Markdown, with additional extensions to clean up the output
44+
# -s: standalone
45+
# --wrap=none: optional, to avoid unnecessary line breaks if preferred
46+
47+
PANDOC_FORMAT="markdown-fenced_divs-bracketed_spans-header_attributes-link_attributes-inline_code_attributes-raw_html-native_divs-native_spans"
48+
49+
if curl -s "$URL" | pandoc -f html -t "$PANDOC_FORMAT" -s --wrap=none -o "$OUTPUT_FILE"; then
50+
echo "Successfully updated $OUTPUT_FILE"
51+
else
52+
echo "Failed to update $FILENAME"
53+
fi
54+
done
55+
56+

specifications/vc-data-model-2.0.md

Lines changed: 6567 additions & 0 deletions
Large diffs are not rendered by default.

specifications/vc-jose-cose.md

Lines changed: 2775 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)