Skip to content

Commit

Permalink
Python3 version of urlencode()
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Oct 18, 2023
1 parent 935f9c6 commit d1c456e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/admin/acl/create-authorization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ print_usage()
hash turtle 2>/dev/null || { echo >&2 "turtle not on \$PATH. Need to set \$JENA_HOME. Aborting."; exit 1; }

urlencode() {
python -c 'import urllib, sys; print(urllib.quote(sys.argv[1], sys.argv[2]))' \
python -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1], sys.argv[2]))' \
"$1" "$urlencode_safe"
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/admin/acl/create-group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ print_usage()
hash turtle 2>/dev/null || { echo >&2 "turtle not on \$PATH. Need to set \$JENA_HOME. Aborting."; exit 1; }

urlencode() {
python -c 'import urllib, sys; print(urllib.quote(sys.argv[1], sys.argv[2]))' \
python -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1], sys.argv[2]))' \
"$1" "$urlencode_safe"
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/create-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ print_usage()
hash turtle 2>/dev/null || { echo >&2 "turtle not on \$PATH. Need to set \$JENA_HOME. Aborting."; exit 1; }

urlencode() {
python -c 'import urllib, sys; print(urllib.quote(sys.argv[1], sys.argv[2]))' \
python -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1], sys.argv[2]))' \
"$1" "$urlencode_safe"
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/create-item.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ print_usage()
hash turtle 2>/dev/null || { echo >&2 "turtle not on \$PATH. Need to set \$JENA_HOME. Aborting."; exit 1; }

urlencode() {
python -c 'import urllib, sys; print(urllib.quote(sys.argv[1], sys.argv[2]))' \
python -c 'import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1], sys.argv[2]))' \
"$1" "$urlencode_safe"
}

Expand Down

0 comments on commit d1c456e

Please sign in to comment.