Fix -M option: dependancie fiel name. Fix xml data: set <display> <name> to output file name
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-bii_scripts/bin/CreatePanel.py new-bii_scripts/bin/CreatePanel.py
--- old-bii_scripts/bin/CreatePanel.py 2022-12-09 20:37:59.800931570 +0100
+++ new-bii_scripts/bin/CreatePanel.py 2022-12-09 20:37:59.800931570 +0100
@@ -1,5 +1,3 @@
-
-
#!/usr/bin/python3
# -*- coding: utf-8 -*-
@@ -926,9 +924,6 @@
</display>
""")
- if opts['backGroundDisplay'] != None:
- display = opts['backGroundDisplay']
-
#-------- get substitutions data
if opts['inFile'] != "-":
f= open(opts['inFile'], "r",encoding=opts['encoding'])
@@ -952,11 +947,8 @@
sys.stderr.write("-M: dependant file '{}' not found\n".format(widgetFileName))
else:
depFiles.append(wdgFile)
- reg=re.compile(r"\.d\s*$")
- target =reg.sub("",opts['outFile'])
- with open(opts['outFile'],mode="w") as w:
- w.write("{}: {}\n".format(target," ".join(depFiles) ))
-
+ with open(opts['outFile']+".d",mode="w") as w:
+ w.write("{}: {}\n".format(opts['outFile']," ".join(depFiles) ))
return
for wdg in dependencies:
w = ParsedWidget(file=wdg,options=opts)
@@ -969,6 +961,14 @@
wdg = opts['widgetStore'][wKey]
print(wKey,wdg)
+ if opts['backGroundDisplay'] != None:
+ display = opts['backGroundDisplay']
+ target = "stdout"
+ if opts['outFile'] != "-":
+ path=opts['outFile'].split('/')
+ (target,ext) = path[-1].split('.')
+ dN = display.find('name')
+ dN.text = target
#-------- create display by layout
printData = "Empty Print Data!"
yPos = 0
@@ -995,9 +995,7 @@
output_mode = "a"
else:
out= sys.stdout
- #out.write("do(\n")
out.write(printData)
- #out.write(")\n")
if opts['outFile'] is not None:
out.close()
patch 07e194c4b65f57d1bfa090dde3abd29af04f6ddf
Author: Bernhard.Kuner@bessy.de
Date: Tue Jun 29 12:12:44 CEST 2021
* Fix -M option: dependancie fiel name. Fix xml data: set <display> <name> to output file nam