mirror of
https://github.com/standardebooks/web.git
synced 2025-07-17 20:06:39 -04:00
Identifiers no longer prefixed with url:
This commit is contained in:
parent
9c15cd2c1f
commit
718648e514
8 changed files with 56 additions and 56 deletions
|
@ -186,7 +186,7 @@ do
|
|||
continue
|
||||
fi
|
||||
|
||||
urlSafeIdentifier=$(git show HEAD:src/epub/content.opf | grep --only-matching --extended-regexp "<dc:identifier id=\"uid\">url:https://standardebooks.org/ebooks/[^<]+<\/dc:identifier>" | sed --regexp-extended "s/<[^>]+?>//g" | sed --regexp-extended "s|url:https://standardebooks.org/ebooks/||g" | sed --regexp-extended "s|/|_|g")
|
||||
urlSafeIdentifier=$(git show HEAD:src/epub/content.opf | grep --only-matching --extended-regexp "<dc:identifier id=\"uid\">https://standardebooks.org/ebooks/[^<]+<\/dc:identifier>" | sed --regexp-extended "s/<[^>]+?>//g" | sed --regexp-extended "s|https://standardebooks.org/ebooks/||g" | sed --regexp-extended "s|/|_|g")
|
||||
|
||||
if [ "${lastPushHash}" != "" ]; then
|
||||
# We were passed the hash of the last push before this one.
|
||||
|
@ -213,7 +213,7 @@ do
|
|||
fi
|
||||
fi
|
||||
|
||||
webDir=$(git show HEAD:src/epub/content.opf | grep --only-matching --extended-regexp "<dc:identifier id=\"uid\">url:https://standardebooks.org/ebooks/[^<]+<\/dc:identifier>" | sed --regexp-extended "s/<[^>]+?>//g" | sed --regexp-extended "s/^url:https:\/\/standardebooks.org\/ebooks\/?//")
|
||||
webDir=$(git show HEAD:src/epub/content.opf | grep --only-matching --extended-regexp "<dc:identifier id=\"uid\">https://standardebooks.org/ebooks/[^<]+<\/dc:identifier>" | sed --regexp-extended "s/<[^>]+?>//g" | sed --regexp-extended "s/^https:\/\/standardebooks.org\/ebooks\/?//")
|
||||
|
||||
if [ "${webDir}" = "" ]; then
|
||||
die "Empty webdir!"
|
||||
|
@ -304,7 +304,7 @@ do
|
|||
fi
|
||||
|
||||
# Get the book URL.
|
||||
bookUrl=$(grep --only-matching --extended-regexp "<dc:identifier id=\"uid\">.+?</dc:identifier>" "${workDir}"/src/epub/content.opf | sed --regexp-extended "s/.*?url:https:\/\/standardebooks.org(.*?)<.*/\1/g")
|
||||
bookUrl=$(grep --only-matching --extended-regexp "<dc:identifier id=\"uid\">.+?</dc:identifier>" "${workDir}"/src/epub/content.opf | sed --regexp-extended "s/.*?https:\/\/standardebooks.org(.*?)<.*/\1/g")
|
||||
|
||||
# Get the last commit date so that we can update the modified timestamp in deployed `content.opf`. `generate-feeds` uses this timestamp in its output.
|
||||
modifiedDate=$(TZ=UTC git log --date=iso-strict-local -1 --pretty=tformat:"%cd" --abbrev-commit | sed "s/+00:00/Z/")
|
||||
|
|
|
@ -245,9 +245,9 @@ printf "%s\n" "${repoUrls}" | while IFS= read -r repoUrl; do
|
|||
|
||||
# get the last segment of the dc:identifier from the metadata
|
||||
properName="$(git -C "${repoName}" show HEAD:src/epub/content.opf |
|
||||
grep -oE "<dc:identifier id=\"uid\">url:https://standardebooks.org/ebooks/[^<]+</dc:identifier>" |
|
||||
grep -oE "<dc:identifier id=\"uid\">https://standardebooks.org/ebooks/[^<]+</dc:identifier>" |
|
||||
sed -E "s/<[^>]+?>//g" |
|
||||
sed -E "s|url:https://standardebooks.org/ebooks/||g" |
|
||||
sed -E "s|https://standardebooks.org/ebooks/||g" |
|
||||
sed -E "s|/|_|g").git"
|
||||
if [ "${bare}" = "" ]; then
|
||||
properName="${properName%.git}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue