Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F33050219
testSvgTreeManager.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
testSvgTreeManager.py
View Options
#!/usr/bin/env python3
from
svgTreeManager
import
*
#-----------------------------------
# Management of arguments
#-----------------------------------
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'test of svgColourManager: takes SVG maps as argument; sould return a list of ID tags and matching colours in standard output.'
)
# positional argument
parser
.
add_argument
(
"infiles"
,
nargs
=
'+'
,
help
=
"filenames of the SVG files against which to test svgColourManager."
)
args
=
parser
.
parse_args
()
# -----------------------------------
# Main
# -----------------------------------
for
infile
in
args
.
infiles
:
svg
=
open
(
infile
,
'r'
)
.
read
()
treeManager
=
SvgTreeManager
(
svg
)
#target = "gb-gbn"
#target = "de"
#target = "ddr"
target
=
"so"
for
i
in
treeManager
.
findPath
(
target
):
print
(
" ==== "
,
i
.
get
(
'id'
),
" ==== "
)
print
(
treeManager
.
getParentsTransformMatrix
(
i
))
print
(
treeManager
.
getTransformMatrix
(
i
))
print
(
treeManager
.
getTotalTransformMatrix
(
i
))
print
(
"Path points: "
,
treeManager
.
extractPoints
(
i
))
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Tue, Jun 16, 13:51 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3825334
Default Alt Text
testSvgTreeManager.py (1 KB)
Attached To
Mode
rTASACORAEXP Tasacora experimental code
Attached
Detach File
Event Timeline
Log In to Comment