Reduced the number of htmlization URLs visited further.

- Legacy-Id: 17999
This commit is contained in:
Henrik Levkowetz 2020-06-16 20:07:11 +00:00
parent a5ccd3a806
commit 5d03afa6aa
2 changed files with 27 additions and 8 deletions

View file

@ -1,15 +1,31 @@
#!/bin/bash #!/bin/bash
# -*- indent-with-tabs: 1 -*-
date
cur=$(svn info | awk '/^Revision:/ { print $2 }') cur=$(svn info | awk '/^Revision:/ { print $2 }')
svn log $PWD -r ${2:-HEAD}:${1:-$((cur-100))} \ # List recent commits, extract revision numbers, stop at release, and grab the last revision
# - get svn log, looking backwards from HEAD
# - stop on 'Set version info ...'
# - filter out revision lines
# - grab the first field
# - grab the last line
# - remove the leading 'r'
rev=$(svn log $PWD -r ${2:-HEAD}:${1:-$((cur-100))} \
| sed -r -n -e '1,/^Set version info( and settings)?( back)? to (development|release)/p' \
| egrep '^r[0-9]+ \|' \
| cut -d ' ' -f 1 \
| tail -n 1 \
| sed 's/^r//')
# Grab commit log lines from just after the start rev, going forwards, and reformat
# - Get svn log entries, starting with the earliest
# - Filter out dividing lines and revision/committer/date lines, keeping the messages
# - Insert leading asterisks: ' * ' at the front of the first line in each text block
# - Unwrap lines that start with unindented text
# - Do line folding at column 76
# - Indent any unindented lines 4 spaces
# - Add blank lines in front of log entries
svn log $PWD -r $((rev+2)):${2:-HEAD} \
| sed -r 's/^(----------|r[0-9]+).*$/\n/' \ | sed -r 's/^(----------|r[0-9]+).*$/\n/' \
| sed '/./,/^$/!d' \
| sed '1,/./s/^/ * /;/^$/,/./s/^/ * /;/^ \* $/d' \ | sed '1,/./s/^/ * /;/^$/,/./s/^/ * /;/^ \* $/d' \
| sed -e :a -e '$!N;s/\n([A-Za-z0-9])/ \\1/;ta' -e 'P;D' \ | sed -e :a -e '$!N;s/\n([A-Za-z0-9])/ \\1/;ta' -e 'P;D' \
| head -n -1 \
| fold -sw1000 \
| tac \
| fold -sw76 \ | fold -sw76 \
| sed -r 's/^([^ ].*)$/ &/' \ | sed -r 's/^([^ ].*)$/ &/' \
| sed -r 's/^ \* /\n * /' | sed -r 's/^ \* /\n * /'

View file

@ -1,6 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- indent-with-tabs: 0 -*-
# Copyright The IETF Trust 2013-2019, All Rights Reserved # Copyright The IETF Trust 2013-2019, All Rights Reserved
import os, sys, re, datetime, argparse, traceback, json, subprocess import os, sys, re, datetime, argparse, traceback, json, subprocess
import html5lib import html5lib
import random import random
@ -225,7 +227,8 @@ def skip_url(url):
r"draft-touch-msword-template-v2\.0", r"draft-touch-msword-template-v2\.0",
# Skip most html conversions, not worth the time # Skip most html conversions, not worth the time
"^/doc/html/draft-[0-9ac-z][0-9b-z].*", "^/doc/html/draft-[0-9ac-z]",
"^/doc/html/draft-b[0-9b-z]",
"^/doc/html/charter-.*", "^/doc/html/charter-.*",
"^/doc/html/status-.*", "^/doc/html/status-.*",
"^/doc/html/rfc.*", "^/doc/html/rfc.*",