comparison scripts/docs-headings.py @ 8215:928bc1d8b279 default-i18n

Merge from default
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 06 Feb 2020 01:19:23 +0100
parents 01aca0a4f876
children 4b68fbe195b6
comparison
equal deleted inserted replaced
8214:460e7d2d1b38 8215:928bc1d8b279
1 #!/usr/bin/env python2 1 #!/usr/bin/env python3
2 2
3 """ 3 """
4 Consistent formatting of rst section titles 4 Consistent formatting of rst section titles
5 """ 5 """
6 6
33 33
34 34
35 def main(): 35 def main():
36 filenames = subprocess.check_output(['hg', 'loc', 'set:**.rst+kallithea/i18n/how_to']).splitlines() 36 filenames = subprocess.check_output(['hg', 'loc', 'set:**.rst+kallithea/i18n/how_to']).splitlines()
37 for fn in filenames: 37 for fn in filenames:
38 fn = fn.decode()
38 print('processing %s' % fn) 39 print('processing %s' % fn)
39 s = open(fn).read() 40 s = open(fn).read()
40 41
41 # find levels and their styles 42 # find levels and their styles
42 lastpos = 0 43 lastpos = 0