-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #388 from w3c/first-public-draft-release
First public draft release
- Loading branch information
Showing
10 changed files
with
9,582 additions
and
9 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,466 changes: 1,466 additions & 0 deletions
1,466
UX-Guide-Metadata/2.0/principles/principles-draft-note-20240830.html
Large diffs are not rendered by default.
Oops, something went wrong.
1,656 changes: 1,656 additions & 0 deletions
1,656
UX-Guide-Metadata/2.0/techniques/epub-metadata/epub-metadata-draft-note-20240830.html
Large diffs are not rendered by default.
Oops, something went wrong.
1,659 changes: 1,656 additions & 3 deletions
1,659
UX-Guide-Metadata/2.0/techniques/epub-metadata/index.html
100644 → 100755
Large diffs are not rendered by default.
Oops, something went wrong.
1,630 changes: 1,627 additions & 3 deletions
1,630
UX-Guide-Metadata/2.0/techniques/onix-metadata/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
1,627 changes: 1,627 additions & 0 deletions
1,627
UX-Guide-Metadata/2.0/techniques/onix-metadata/onix-metadata-draft-note-20240830.html
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/bin/bash | ||
|
||
# Script for creating static version for the UX-Guide-Metadata documents | ||
# It starts from the published draft (in the main branch): https://w3c.github.io/publ-a11y/UX-Guide-Metadata/draft/principles/ | ||
# It generates the static version | ||
# It runs nuchecker and link checker | ||
# The output is a zip folder that can be sent to W3C staff for publishing on the website | ||
|
||
# pre-run: cleans and temporary directory... | ||
basedir=$(readlink -f "$0") | ||
basedir=$(dirname "$basedir") | ||
documents=( "principles" "techniques/epub-metadata" "techniques/onix-metadata" ) | ||
bold=$(tput bold) | ||
normal=$(tput sgr0) | ||
|
||
# input | ||
read -p 'Publishing date (format YYYY-MM-DD): ' publishDate | ||
publishDateWithoutDashes=${publishDate//-/} | ||
|
||
for document in "${documents[@]}" | ||
do | ||
printf "\n\nDocument ${bold}$document${normal}...\n" | ||
|
||
# variables for document | ||
tmpdir=$(mktemp -d) | ||
filename=${document##*/} | ||
versionFilename="$filename-draft-note-$publishDateWithoutDashes.html" | ||
versionURL="https://w3c.github.io/publ-a11y/UX-Guide-Metadata/2.0/$document/$versionFilename" | ||
|
||
# copies the content to the temporary directory | ||
printf "\nCopying the content to the temporary directory..." | ||
cp -a "$basedir/../draft/$document/." $tmpdir | ||
rm $tmpdir/*.md | ||
|
||
# generates the static version | ||
printf "\nGenerating static version...\n" | ||
curl \ | ||
-G \ | ||
--data-urlencode "type=respec" \ | ||
--data-urlencode "url=https://w3c.github.io/publ-a11y/UX-Guide-Metadata/draft/$document/?specStatus=CG-DRAFT&publishDate=$publishDate&thisVersion=$versionURL" \ | ||
https://labs.w3.org/spec-generator/ \ | ||
-o "$tmpdir/index.html" | ||
|
||
# runs nuchecker | ||
nuVersion=$(java -jar "$basedir/libs/vnu/vnu.jar" --version) | ||
printf "\nRunning Nu Html Checker version $nuVersion...\n" | ||
java -jar "$basedir/libs/vnu/vnu.jar" \ | ||
"$tmpdir/index.html" | ||
|
||
|
||
# commenting while waiting for this issue to be fixed: https://github.com/validator/validator/issues/1745 | ||
# if [ $? -gt 0 ] | ||
# then | ||
# exit 1 | ||
# fi | ||
|
||
# runs link checker | ||
# installed via commands: | ||
# cpan install App::cpanminus | ||
# cpanm W3C::[email protected] | ||
# cpan install Mozilla::CA | ||
# tried to install version 5.0.0 on mac, but I got errors | ||
checklinkVersion=$(checklink --version) | ||
printf "\nRunning $checklinkVersion...\n" | ||
checklink \ | ||
--summary \ | ||
--broken \ | ||
"https://w3c.github.io/publ-a11y/UX-Guide-Metadata/draft/$document/?specStatus=CG-DRAFT&publishDate=$publishDate" | ||
|
||
# commenting while waiting for this issue to be fixed: https://github.com/w3c/publ-a11y/issues/386 | ||
# if [ $? -gt 0 ] | ||
# then | ||
# exit 1 | ||
# fi | ||
|
||
printf "\nMoving temporary files to directory..." | ||
mv $tmpdir/* "$basedir/../2.0/$document/" | ||
|
||
printf "\nCopying for versioning..." | ||
cp "$basedir/../2.0/$document/index.html" "$basedir/../2.0/$document/$versionFilename" | ||
|
||
done | ||
|
||
printf "\nDone" |