4 out=`python3 -c 'import sys, html; print(html.escape(sys.argv[1]))' "$1"`
8 read_and_escape_file() {
14 out=`python3 -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1]))' "$1"`
20 redo-ifchange "$url_file"
21 base_url=`cat "$url_file" | head -1`
22 url_protocol=`echo $base_url | cut -d ':' -f 1`
23 url_basepath=`echo $base_url | cut -d '/' -f 3-`
24 url_basepath_escaped=`escape_url "$url_basepath"`
25 basepath="$url_protocol""://""$url_basepath_escaped"
30 md_file="../${1%.*}.md"
31 rst_file="../${1%.*}.rst"
32 if [ -f "$rst_file" ]; then
34 elif [ -f "$md_file" ]; then
39 redo-ifchange "$src_file"