<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Creator: CorelDRAW 2021.5 -->
<?xml-stylesheet href="cal012022text.css" type="text/css"?>
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="297mm" height="210mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 297 210"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
<g>
</g>
<text x="36.3548" y="79.0431" class="fil6 fnt4">bmb3</text>
<text x="36.3548" y="81.8229" class="fil6 fnt4">bme3</text>
<text x="36.3548" y="84.6027" class="fil5 fnt4">rkb3</text>
<text x="36.3548" y="87.3825" class="fil5 fnt4">rke3</text>
<text x="36.3548" y="90.1623" class="fil4 fnt4">ymb3</text>
<text x="36.3548" y="92.9421" class="fil4 fnt4">yme3</text>
<text x="36.3548" y="95.7219" class="fil1 fnt4">abb3</text>
<text x="36.3548" y="98.5017" class="fil1 fnt4">abe3</text>
<text x="36.3548" y="101.2815" class="fil0 fnt4">gkb3</text>
<text x="36.3548" y="104.0613" class="fil0 fnt4">gke3</text>
<text x="50.8042" y="91.0814" class="fil1 fnt5">3</text>
</g>
</g>
<text x="71.1504" y="79.0431" class="fil6 fnt4">bmb4</text>
<text x="71.1504" y="81.8229" class="fil6 fnt4">bme4</text>
<text x="71.1504" y="84.6027" class="fil4 fnt4">ymb4</text>
<text x="71.1504" y="87.3825" class="fil4 fnt4">yme4</text>
<text x="71.1504" y="90.1623" class="fil1 fnt4">abb4</text>
<text x="71.1504" y="92.9421" class="fil1 fnt4">abe4</text>
<text x="71.1504" y="95.7219" class="fil0 fnt4">gkb4</text>
<text x="71.1504" y="98.5017" class="fil0 fnt4">gke4</text>
<text x="71.1504" y="101.2815" class="fil5 fnt4">rkb4</text>
<text x="71.1504" y="104.0613" class="fil5 fnt4">rke4</text>
<text x="85.5998" y="91.0814" class="fil1 fnt5">4</text>
</g>
</g>
<text x="106.6818" y="78.9431" class="fil6 fnt4">bmb5</text>
<text x="106.6818" y="81.7229" class="fil6 fnt4">bme5</text>
<text x="106.6818" y="84.5027" class="fil4 fnt4">ymb5</text>
<text x="106.6818" y="87.2825" class="fil4 fnt4">yme5</text>
<text x="106.6818" y="90.0623" class="fil1 fnt4">abb5</text>
<text x="106.6818" y="92.8421" class="fil1 fnt4">abe5</text>
<text x="106.6818" y="95.6219" class="fil0 fnt4">gkb5</text>
<text x="106.6818" y="98.4017" class="fil0 fnt4">gke5</text>
<text x="106.6818" y="101.1815" class="fil5 fnt4">rkb5</text>
<text x="106.6818" y="103.9613" class="fil5 fnt4">rke5</text>
<text x="121.1312" y="90.9814" class="fil1 fnt5">5</text>
</g>
for d in range(1, 31 + 1): # d - номер дня
cur.execute("""SELECT bm1, bm2, ab1, ab2, rk1, rk2, gk1, gk2, ym1, ym2
FROM days2
WHERE year=? AND month=? AND day=?;""", (yr, m, d)
)
result = cur.fetchone()
# Замена
bmb = "bmb" + str(d)
bme = "bme" + str(d)
abb = "abb" + str(d)
abe = "abe" + str(d)
rkb = "rkb" + str(d)
rke = "rke" + str(d)
gkb = "gkb" + str(d)
gke = "gke" + str(d)
ymb = "ymb" + str(d)
yme = "yme" + str(d)
with open((path1 + svg1[m] + ".svg"), 'r') as f1, open((path1 + svg1[m] + "out.svg"), 'w') as f2:
#print(f1.read())
f1read= f1.read()
#print(type(f1read))
f1read = f1read.replace(bmb, result[0])
f1read = f1read.replace(bme, result[1])
f1read = f1read.replace(abb, result[2])
f1read = f1read.replace(abe, result[3])
f1read = f1read.replace(rkb, result[4])
f1read = f1read.replace(rke, result[5])
f1read = f1read.replace(gkb, result[6])
f1read = f1read.replace(gke, result[7])
f1read = f1read.replace(ymb, result[8])
f1read = f1read.replace(yme, result[9])
f2.write(f1read)