aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-07-14 19:35:12 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-07-14 19:35:12 +0300
commit856df0ec5823ae12682fe4c4bcd4c15a062be1dc (patch)
tree43cec5bf2f5083f23121a9155f82855cf119f5d9
parentc1aea08b1c64a79f724a04edc55d8d9d8e28e263 (diff)
downloadtg2md-856df0ec5823ae12682fe4c4bcd4c15a062be1dc.tar.gz
tg2md-856df0ec5823ae12682fe4c4bcd4c15a062be1dc.zip
add support for other file types (to be improved)
currently images that were sent as files are supported, but their files land in `files` directory. text file and additional image used for test are stored as symlinks now, because i don't want them to consume too much space.
l---------tests/files/LICENSE.md1
-rw-r--r--tests/files/dice.svg603
-rw-r--r--tests/files/dice.svg_thumb.jpgbin0 -> 8124 bytes
l---------tests/photos/photo_3@14-07-2021_18-52-46.jpg1
-rw-r--r--tests/result.json57
-rw-r--r--tg2md.py67
6 files changed, 718 insertions, 11 deletions
diff --git a/tests/files/LICENSE.md b/tests/files/LICENSE.md
new file mode 120000
index 0000000..f0608a6
--- /dev/null
+++ b/tests/files/LICENSE.md
@@ -0,0 +1 @@
+../../LICENSE.md \ No newline at end of file
diff --git a/tests/files/dice.svg b/tests/files/dice.svg
new file mode 100644
index 0000000..07a9b09
--- /dev/null
+++ b/tests/files/dice.svg
@@ -0,0 +1,603 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="175.6006mm"
+ height="114.77757mm"
+ viewBox="0 0 175.6006 114.77757"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="dice.svg"
+ inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1048"
+ id="namedview97"
+ showgrid="false"
+ inkscape:zoom="0.90363182"
+ inkscape:cx="296.65409"
+ inkscape:cy="280.75364"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0" />
+ <defs
+ id="defs2">
+ <linearGradient
+ id="linearGradient1478"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop1476" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient1137"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#b4b4b4;stop-opacity:1;"
+ offset="0"
+ id="stop1135" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient1131"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#b4b4b4;stop-opacity:1;"
+ offset="0"
+ id="stop1129" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient1125"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#8a8a8a;stop-opacity:1;"
+ offset="0"
+ id="stop1123" />
+ </linearGradient>
+ <marker
+ style="overflow:visible"
+ id="Arrow1Lstart"
+ refX="0"
+ refY="0"
+ orient="auto">
+ <path
+ transform="matrix(0.8,0,0,0.8,10,0)"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
+ id="path851" />
+ </marker>
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1127"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ xlink:href="#linearGradient1131"
+ id="linearGradient1133"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1139"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.809155,0,0,1.809155,-40.247586,-33.431464)" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1133-3"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(60.422503,-0.16477867)" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1139-3"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5239803,0,0,1.5239803,23.774307,-11.23048)" />
+ <linearGradient
+ xlink:href="#linearGradient1137"
+ id="linearGradient1181"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(60.422503,-0.16477867)"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1139-3-2"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,44.530398,-32.741422)" />
+ <linearGradient
+ xlink:href="#linearGradient1137"
+ id="linearGradient1266"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(62.326829,-0.95006945)"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1268"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(62.326829,-0.95006945)"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1272"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,35.851243,-22.941207)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1272-0"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,48.286926,-35.376729)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1272-6"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,23.415469,-10.505698)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1133-7"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1.5303915,-0.96395305)" />
+ <linearGradient
+ xlink:href="#linearGradient1137"
+ id="linearGradient1454"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(62.326829,-0.95006945)"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1458"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,35.809979,-12.357868)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1137"
+ id="linearGradient1472"
+ gradientUnits="userSpaceOnUse"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517"
+ gradientTransform="translate(-1.5303915,-0.96395305)" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1468-9"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4455615,0.48256398,-0.48256398,1.4455615,-15.147208,-54.777328)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1468-94"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4455615,0.48256398,-0.48256398,1.4455615,-15.156346,-31.983543)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1468-94-4"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4455615,0.48256398,-0.48256398,1.4455615,7.6374626,-31.97439)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1468-9-0"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4455615,0.48256398,-0.48256398,1.4455615,7.6465948,-54.768178)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1548"
+ gradientUnits="userSpaceOnUse"
+ x1="84.18763"
+ y1="40.366451"
+ x2="139.94656"
+ y2="40.366451" />
+ <linearGradient
+ xlink:href="#linearGradient1137"
+ id="linearGradient1624"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1.5303915,-0.96395305)"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1626"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1.5303915,-0.96395305)"
+ x1="21.860796"
+ y1="41.316517"
+ x2="77.619743"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1628"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5239803,0,0,1.5239803,-40.155649,-34.839727)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1630"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5239803,0,0,1.5239803,-40.183126,-10.019221)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1632"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5239803,0,0,1.5239803,-15.335141,-34.812251)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1634"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5239803,0,0,1.5239803,-15.362612,-9.9917502)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1632-5"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5239803,0,0,1.5239803,-27.759129,-22.415741)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1460-7"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(5.7914181,0,0,5.7914181,-154.70189,-215.91893)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1458-5"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,35.809979,-33.165538)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1462-6"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(5.7914181,0,0,5.7914181,-264.70425,-215.91894)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1705"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,35.809975,-12.357868)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1707"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,35.809979,-12.357868)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1752"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,35.809979,-33.165538)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ <linearGradient
+ xlink:href="#linearGradient1125"
+ id="linearGradient1754"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.5323127,0,0,1.5323127,35.809983,-33.165538)"
+ x1="45.706322"
+ y1="41.316517"
+ x2="53.774223"
+ y2="41.316517" />
+ </defs>
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ transform="translate(-22.946958,-13.001113)">
+ <g
+ id="g1212"
+ transform="translate(1.0861612,-0.43592997)">
+ <g
+ id="g1346"
+ style="opacity:1">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1133);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.665;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 24.693296,16.269543 H 74.787245 V 66.363491 H 24.693296 Z"
+ id="path1348" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1127);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.665;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 24.693359 13.4375 A 2.8327832 2.8327832 0 0 0 21.861328 16.269531 L 21.861328 66.363281 A 2.8327832 2.8327832 0 0 0 24.693359 69.195312 L 74.787109 69.195312 A 2.8327832 2.8327832 0 0 0 77.619141 66.363281 L 77.619141 16.269531 A 2.8327832 2.8327832 0 0 0 74.787109 13.4375 L 24.693359 13.4375 z M 27.525391 19.101562 L 71.955078 19.101562 L 71.955078 63.53125 L 27.525391 63.53125 L 27.525391 19.101562 z "
+ id="path1350" />
+ </g>
+ <path
+ id="path1121"
+ style="fill:url(#linearGradient1139);fill-opacity:1;stroke:none;stroke-width:10.2488;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 57.038318,41.316517 a 7.2980452,7.2980452 0 0 1 -7.298045,7.298045 7.2980452,7.2980452 0 0 1 -7.298046,-7.298045 7.2980452,7.2980452 0 0 1 7.298046,-7.298045 7.2980452,7.2980452 0 0 1 7.298045,7.298045 z" />
+ </g>
+ <g
+ id="g1208"
+ transform="translate(0.71028254,-0.27115412)">
+ <g
+ id="g1340"
+ style="opacity:1">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1181);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.66499;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 85.115799,16.104765 H 135.20975 V 66.198717 H 85.115799 Z"
+ id="path1342" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1133-3);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.66499;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 85.115234 13.271484 A 2.8327782 2.8327782 0 0 0 82.283203 16.105469 L 82.283203 66.199219 A 2.8327782 2.8327782 0 0 0 85.115234 69.03125 L 135.20898 69.03125 A 2.8327782 2.8327782 0 0 0 138.04297 66.199219 L 138.04297 16.105469 A 2.8327782 2.8327782 0 0 0 135.20898 13.271484 L 85.115234 13.271484 z M 87.949219 18.9375 L 132.37695 18.9375 L 132.37695 63.367188 L 87.949219 63.367188 L 87.949219 18.9375 z "
+ id="path1344" />
+ </g>
+ <path
+ id="path1121-6"
+ style="fill:url(#linearGradient1139-3);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 105.72516,51.735081 a 6.1476641,6.1476641 0 0 1 -6.147661,6.147664 6.1476641,6.1476641 0 0 1 -6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147661,6.147664 z" />
+ <path
+ id="path1121-6-1"
+ style="fill:url(#linearGradient1139-3-2);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 126.92929,30.568401 a 6.1812763,6.1812763 0 0 1 -6.18127,6.181276 6.1812763,6.1812763 0 0 1 -6.18128,-6.181276 6.1812763,6.1812763 0 0 1 6.18128,-6.181276 6.1812763,6.1812763 0 0 1 6.18127,6.181276 z" />
+ </g>
+ <g
+ id="g1208-0"
+ transform="translate(58.60099,0.5141366)">
+ <g
+ id="g1310">
+ <g
+ id="g1334"
+ style="opacity:1">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1266);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.66499;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 87.020126,15.319474 H 137.11408 V 65.413426 H 87.020126 Z"
+ id="path1336" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1268);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.66499;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 87.019531 12.486328 A 2.8327782 2.8327782 0 0 0 84.1875 15.320312 L 84.1875 65.414062 A 2.8327782 2.8327782 0 0 0 87.019531 68.246094 L 137.11328 68.246094 A 2.8327782 2.8327782 0 0 0 139.94727 65.414062 L 139.94727 15.320312 A 2.8327782 2.8327782 0 0 0 137.11328 12.486328 L 87.019531 12.486328 z M 89.853516 18.152344 L 134.28125 18.152344 L 134.28125 62.580078 L 89.853516 62.580078 L 89.853516 18.152344 z "
+ id="path1338" />
+ </g>
+ <path
+ id="path1121-6-1-6"
+ style="fill:url(#linearGradient1272);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 118.25011,40.36861 a 6.1812763,6.1812763 0 0 1 -6.18128,6.181277 6.1812763,6.1812763 0 0 1 -6.18127,-6.181277 6.1812763,6.1812763 0 0 1 6.18127,-6.181276 6.1812763,6.1812763 0 0 1 6.18128,6.181276 z" />
+ <path
+ id="path1121-6-1-6-2"
+ style="fill:url(#linearGradient1272-0);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 130.68582,27.933092 a 6.1812763,6.1812763 0 0 1 -6.18127,6.181276 6.1812763,6.1812763 0 0 1 -6.18128,-6.181276 6.1812763,6.1812763 0 0 1 6.18128,-6.181276 6.1812763,6.1812763 0 0 1 6.18127,6.181276 z" />
+ <path
+ id="path1121-6-1-6-8"
+ style="fill:url(#linearGradient1272-6);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 105.81436,52.804127 a 6.1812763,6.1812763 0 0 1 -6.18128,6.181276 6.1812763,6.1812763 0 0 1 -6.181277,-6.181276 6.1812763,6.1812763 0 0 1 6.181277,-6.181277 6.1812763,6.1812763 0 0 1 6.18128,6.181277 z" />
+ </g>
+ </g>
+ <g
+ id="g1212-3"
+ transform="translate(2.616553,59.546646)">
+ <g
+ id="g1328"
+ style="opacity:1">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1472);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.665;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 23.162905,15.30559 H 73.256853 V 65.399538 H 23.162905 Z"
+ id="path1330" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1133-7);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.665;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 23.162109 12.472656 A 2.8327832 2.8327832 0 0 0 20.330078 15.304688 L 20.330078 65.400391 A 2.8327832 2.8327832 0 0 0 23.162109 68.232422 L 73.257812 68.232422 A 2.8327832 2.8327832 0 0 0 76.089844 65.400391 L 76.089844 15.304688 A 2.8327832 2.8327832 0 0 0 73.257812 12.472656 L 23.162109 12.472656 z M 25.996094 18.138672 L 70.423828 18.138672 L 70.423828 62.566406 L 25.996094 62.566406 L 25.996094 18.138672 z "
+ id="path1332" />
+ </g>
+ <path
+ id="path1121-6-2-1"
+ style="fill:url(#linearGradient1468-9);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 42.648875,30.897745 a 6.1476641,6.1476641 0 0 1 -7.777967,3.884686 6.1476641,6.1476641 0 0 1 -3.884686,-7.777966 6.1476641,6.1476641 0 0 1 7.777967,-3.884686 6.1476641,6.1476641 0 0 1 3.884686,7.777966 z" />
+ <path
+ id="path1121-6-2-8"
+ style="fill:url(#linearGradient1468-94);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 42.639741,53.691525 a 6.1476641,6.1476641 0 0 1 -7.777966,3.884687 6.1476641,6.1476641 0 0 1 -3.884686,-7.777967 6.1476641,6.1476641 0 0 1 7.777966,-3.884686 6.1476641,6.1476641 0 0 1 3.884686,7.777966 z" />
+ <path
+ id="path1121-6-2-1-3"
+ style="fill:url(#linearGradient1468-9-0);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 65.442671,30.906894 a 6.1476641,6.1476641 0 0 1 -7.777967,3.884686 6.1476641,6.1476641 0 0 1 -3.884686,-7.777967 6.1476641,6.1476641 0 0 1 7.777967,-3.884686 6.1476641,6.1476641 0 0 1 3.884686,7.777967 z" />
+ <path
+ id="path1121-6-2-8-6"
+ style="fill:url(#linearGradient1468-94-4);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 65.43354,53.700678 a 6.1476641,6.1476641 0 0 1 -7.777966,3.884686 6.1476641,6.1476641 0 0 1 -3.884686,-7.777966 6.1476641,6.1476641 0 0 1 7.777966,-3.884686 6.1476641,6.1476641 0 0 1 3.884686,7.777966 z" />
+ </g>
+ <g
+ id="g1208-0-9"
+ transform="translate(58.60099,59.532759)">
+ <g
+ id="g1322"
+ style="opacity:1">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1454);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.66499;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 87.020126,15.319474 H 137.11408 V 65.413426 H 87.020126 Z"
+ id="path1324" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1548);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.66499;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 87.019531 12.486328 A 2.8327782 2.8327782 0 0 0 84.1875 15.320312 L 84.1875 65.414062 A 2.8327782 2.8327782 0 0 0 87.019531 68.246094 L 137.11328 68.246094 A 2.8327782 2.8327782 0 0 0 139.94727 65.414062 L 139.94727 15.320312 A 2.8327782 2.8327782 0 0 0 137.11328 12.486328 L 87.019531 12.486328 z M 89.853516 18.152344 L 134.28125 18.152344 L 134.28125 62.580078 L 89.853516 62.580078 L 89.853516 18.152344 z "
+ id="path1326" />
+ </g>
+ <path
+ id="path1121-6-1-6-6"
+ style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:url(#linearGradient1707);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
+ d="m 118.20885,50.951954 a 6.1812763,6.1812763 0 0 1 -6.18128,6.181276 6.1812763,6.1812763 0 0 1 -6.18127,-6.181276 6.1812763,6.1812763 0 0 1 6.18127,-6.181276 6.1812763,6.1812763 0 0 1 6.18128,6.181276 z" />
+ <path
+ id="path1121-6-1-6-2-1"
+ style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:url(#linearGradient1705);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
+ d="m 132.76122,50.951954 a 6.1812763,6.1812763 0 0 1 -6.18127,6.181276 6.1812763,6.1812763 0 0 1 -6.18128,-6.181276 6.1812763,6.1812763 0 0 1 6.18128,-6.181276 6.1812763,6.1812763 0 0 1 6.18127,6.181276 z" />
+ <path
+ id="path1121-6-1-6-8-2"
+ style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:url(#linearGradient1458);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
+ d="m 103.65644,50.951954 a 6.1812763,6.1812763 0 0 1 -6.181281,6.181276 6.1812763,6.1812763 0 0 1 -6.181277,-6.181276 6.1812763,6.1812763 0 0 1 6.181277,-6.181276 6.1812763,6.1812763 0 0 1 6.181281,6.181276 z" />
+ <path
+ id="path1121-6-1-6-6-7"
+ style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:url(#linearGradient1458-5);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
+ d="m 118.20885,30.144283 a 6.1812763,6.1812763 0 0 1 -6.18128,6.181277 6.1812763,6.1812763 0 0 1 -6.18127,-6.181277 6.1812763,6.1812763 0 0 1 6.18127,-6.181276 6.1812763,6.1812763 0 0 1 6.18128,6.181276 z" />
+ <path
+ id="path1121-6-1-6-2-1-4"
+ style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:url(#linearGradient1754);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
+ d="m 132.76122,30.144283 a 6.1812763,6.1812763 0 0 1 -6.18127,6.181277 6.1812763,6.1812763 0 0 1 -6.18128,-6.181277 6.1812763,6.1812763 0 0 1 6.18128,-6.181276 6.1812763,6.1812763 0 0 1 6.18127,6.181276 z" />
+ <path
+ id="path1121-6-1-6-8-2-4"
+ style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:url(#linearGradient1752);fill-opacity:1;stroke:none;stroke-width:8.6805;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
+ d="m 103.65644,30.144283 a 6.1812763,6.1812763 0 0 1 -6.181281,6.181277 6.1812763,6.1812763 0 0 1 -6.181277,-6.181277 6.1812763,6.1812763 0 0 1 6.181277,-6.181276 6.1812763,6.1812763 0 0 1 6.181281,6.181276 z" />
+ </g>
+ <g
+ id="g1212-3-6"
+ transform="translate(62.663179,59.546646)">
+ <g
+ id="g1316"
+ style="opacity:1">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1624);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.665;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 23.162905,15.30559 H 73.256853 V 65.399538 H 23.162905 Z"
+ id="path1318" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient1626);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.665;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1.0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1;"
+ d="M 23.162109 12.472656 A 2.8327832 2.8327832 0 0 0 20.330078 15.304688 L 20.330078 65.400391 A 2.8327832 2.8327832 0 0 0 23.162109 68.232422 L 73.257812 68.232422 A 2.8327832 2.8327832 0 0 0 76.089844 65.400391 L 76.089844 15.304688 A 2.8327832 2.8327832 0 0 0 73.257812 12.472656 L 23.162109 12.472656 z M 25.996094 18.138672 L 70.423828 18.138672 L 70.423828 62.566406 L 25.996094 62.566406 L 25.996094 18.138672 z "
+ id="path1320" />
+ </g>
+ <path
+ id="path1121-6-2-1-2"
+ style="fill:url(#linearGradient1628);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ transform="rotate(-0.23484942)"
+ d="m 41.795209,28.125832 a 6.1476641,6.1476641 0 0 1 -6.147664,6.147664 6.1476641,6.1476641 0 0 1 -6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,6.147664 z" />
+ <path
+ id="path1121-6-2-8-0"
+ style="fill:url(#linearGradient1630);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ transform="rotate(-0.23484942)"
+ d="m 41.767743,52.946335 a 6.1476641,6.1476641 0 0 1 -6.147664,6.147664 6.1476641,6.1476641 0 0 1 -6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,6.147664 z" />
+ <path
+ id="path1121-6-2-1-3-6"
+ style="fill:url(#linearGradient1632);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ transform="rotate(-0.23484942)"
+ d="m 66.615705,28.153309 a 6.1476641,6.1476641 0 0 1 -6.147665,6.147664 6.1476641,6.1476641 0 0 1 -6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147665,6.147664 z" />
+ <path
+ id="path1121-6-2-8-6-1"
+ style="fill:url(#linearGradient1634);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ transform="rotate(-0.23484942)"
+ d="m 66.588239,52.973804 a 6.1476641,6.1476641 0 0 1 -6.147664,6.147665 6.1476641,6.1476641 0 0 1 -6.147664,-6.147665 6.1476641,6.1476641 0 0 1 6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,6.147664 z" />
+ <path
+ id="path1121-6-2-1-3-6-4"
+ style="fill:url(#linearGradient1632-5);fill-opacity:1;stroke:none;stroke-width:8.6333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ transform="rotate(-0.23485042)"
+ d="m 54.19172,40.549824 a 6.1476641,6.1476641 0 0 1 -6.147664,6.147664 6.1476641,6.1476641 0 0 1 -6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,-6.147664 6.1476641,6.1476641 0 0 1 6.147664,6.147664 z" />
+ </g>
+ </g>
+</svg>
diff --git a/tests/files/dice.svg_thumb.jpg b/tests/files/dice.svg_thumb.jpg
new file mode 100644
index 0000000..bf2a611
--- /dev/null
+++ b/tests/files/dice.svg_thumb.jpg
Binary files differ
diff --git a/tests/photos/photo_3@14-07-2021_18-52-46.jpg b/tests/photos/photo_3@14-07-2021_18-52-46.jpg
new file mode 120000
index 0000000..d8a69f8
--- /dev/null
+++ b/tests/photos/photo_3@14-07-2021_18-52-46.jpg
@@ -0,0 +1 @@
+photo_1@12-11-2020_12-57-31.jpg \ No newline at end of file
diff --git a/tests/result.json b/tests/result.json
index 30e65f8..8853cda 100644
--- a/tests/result.json
+++ b/tests/result.json
@@ -217,6 +217,63 @@
"from": "test",
"from_id": "channel1292077344",
"text": "тестирование utf-8."
+ },
+ {
+ "id": 22,
+ "type": "message",
+ "date": "2021-07-14T18:40:10",
+ "edited": "2021-07-14T18:40:24",
+ "from": "test",
+ "from_id": "channel1292077344",
+ "file": "files/dice.svg",
+ "thumbnail": "files/dice.svg_thumb.jpg",
+ "mime_type": "image/svg+xml",
+ "width": 622,
+ "height": 406,
+ "text": "test file other than sound"
+ },
+ {
+ "id": 23,
+ "type": "message",
+ "date": "2021-07-14T18:52:46",
+ "from": "test",
+ "from_id": "channel1292077344",
+ "photo": "photos/photo_3@14-07-2021_18-52-46.jpg",
+ "width": 801,
+ "height": 526,
+ "text": "multiple photos"
+ },
+ {
+ "id": 24,
+ "type": "message",
+ "date": "2021-07-14T18:52:46",
+ "from": "test",
+ "from_id": "channel1292077344",
+ "photo": "photos/photo_3@14-07-2021_18-52-46.jpg",
+ "width": 801,
+ "height": 526,
+ "text": ""
+ },
+ {
+ "id": 25,
+ "type": "message",
+ "date": "2021-07-14T18:52:46",
+ "from": "test",
+ "from_id": "channel1292077344",
+ "photo": "photos/photo_3@14-07-2021_18-52-46.jpg",
+ "width": 801,
+ "height": 526,
+ "text": ""
+ },
+ {
+ "id": 26,
+ "type": "message",
+ "date": "2021-07-14T19:20:23",
+ "from": "test",
+ "from_id": "channel1292077344",
+ "file": "files/LICENSE.md",
+ "mime_type": "text/markdown",
+ "text": "test text file"
}
]
} \ No newline at end of file
diff --git a/tg2md.py b/tg2md.py
index 706ee85..85c7c1a 100644
--- a/tg2md.py
+++ b/tg2md.py
@@ -8,14 +8,15 @@
# - single/muliple tags
# - forwarded posts
# - custom post header
+# - multiple photos in one post
import os
import argparse
import json
from datetime import datetime
-def print_default_post_header(post_title, post_date, post_tag):
+def print_default_post_header(post_title, post_date, post_tag):
'''
returns default post header
@@ -59,6 +60,28 @@ def parse_post_photo(post, photo_dir):
return post_photo
+def parse_post_photo_as_file(post, media_dir):
+
+ '''
+ converts file tag with thumbnail to image and a link
+ '''
+
+ # links to files are currently broken, because these files are
+ # going to `files` directory, not `photos`.
+ # need to track down any files with thumbnails and then to move them
+ # to a photos directory.
+ post_photo_file_src = os.path.basename(post['file'])
+ post_photo_file_src = os.path.join(media_dir, post_photo_file_src)
+ post_photo_thumbnail_src = os.path.basename(post['thumbnail'])
+ post_photo_thumbnail_src = os.path.join(media_dir,
+ post_photo_thumbnail_src)
+
+ post_photo_as_file = '![image]({thumb})\n[full size]({file})\n\n'\
+ .format(thumb=post_photo_thumbnail_src, file=post_photo_file_src)
+
+ return post_photo_as_file
+
+
def text_format(string, fmt):
'''
@@ -159,21 +182,37 @@ def parse_post_text(post):
def parse_post_media(post, media_dir):
'''
- wraps file links into html tags
+ wraps media files into html tags
'''
- # get filename without parent directory
- post_media_src = os.path.basename(post['file'])
+ post_media_file = os.path.basename(post['file'])
+ post_media_ext = post_media_file.split(".")[-1]
+ post_media_src = os.path.join(media_dir, post_media_file)
- # add parent directory
- post_media_src = os.path.join(media_dir, post_media_src)
- post_media = '\n<audio controls>\n \
- <source src="{src}" type="{mime_type}">\n \
- </audio>'.format(src=post_media_src, mime_type=post['mime_type'])
+ # audiofiles can be presented as audioplayers and other media types
+ # could be left as just links to them
+ # ???
+ post_media = '\n<audio controls>\n\
+ <source src="{src}" type="{mime_type}">\n\
+ </audio>'.format(src=post_media_src, mime_type=post['mime_type'])
return post_media
+def parse_post_file(post, media_dir):
+
+ '''
+ wrap files into link tags
+ '''
+
+ post_file_src = os.path.basename(post['file'])
+ post_file_ext = post_file_src.split('.')[-1]
+ post_file_name = post_file_src.removesuffix('.' + post_file_ext)
+
+ post_file = f'\n\n[{post_file_name}]({post_file_src})\n\n'
+
+ return post_file
+
def parse_post(post, photo_dir, media_dir):
'''
@@ -183,15 +222,21 @@ def parse_post(post, photo_dir, media_dir):
post_output = ''
# optional image
+ # TODO: handle multiple photos in one post (maybe by comparing timestamps)
if 'photo' in post:
post_output += str(parse_post_photo(post, photo_dir))
+ if all(['file' in post, 'thumbnail' in post]):
+ post_output += str(parse_post_photo_as_file(post, media_dir))
+
# post text
post_output += str(parse_post_text(post))
# optional media
if 'media_type' in post:
post_output += str(parse_post_media(post, media_dir))
+ elif 'file' in post and not 'thumbnail' in post:
+ post_output += str(parse_post_file(post, media_dir))
return post_output
@@ -256,8 +301,8 @@ def main():
post_path = os.path.join(args.out_dir, post_filename)
with open(post_path, 'w', encoding='utf-8') as f:
- print(print_default_post_header(
- post_id, post_date, None), file=f)
+ print(print_default_post_header(post_id, post_date, None),
+ file=f)
print(parse_post(post, args.photo_dir, args.media_dir), file=f)