File: update_config_dox

package info (click to toggle)
scolasync 5.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,316 kB
  • sloc: javascript: 4,094; python: 3,849; xml: 3,814; makefile: 116; sh: 31
file content (20 lines) | stat: -rwxr-xr-x 442 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3

import re,sys
sys.path=["src"]+sys.path

from version import version

infile=open("config.dox","r", encoding='utf-8', errors='ignore')
indat=infile.readlines()
infile.close()

outdat=""
for l in indat:
    outdat+=re.sub(r"^PROJECT_NUMBER[ ]+=.*", "PROJECT_NUMBER         = %s" %version(), l)

if outdat:
    outfile=open("config.dox","w", encoding='utf-8', errors='ignore')
    outfile.write(outdat)
    outfile.close()