diff options
author | rafael <rafael@rafael.dirakx> | 2010-01-13 06:42:54 (GMT) |
---|---|---|
committer | rafael <rafael@rafael.dirakx> | 2010-01-13 06:42:54 (GMT) |
commit | 191fd6962a86bd256575c543b5d4c700cbdbc781 (patch) | |
tree | 369371ee2d62d11d381976e1b8f6361c5035c51a | |
parent | 725752264138826f5d1cbe7aa006e0ac95d59d19 (diff) |
adding l10n support for all arduino's blocks
-rwxr-xr-x | svg/analogread.py | 98 | ||||
-rwxr-xr-x | svg/analogwrite.py | 98 | ||||
-rwxr-xr-x | svg/delay.py | 98 | ||||
-rwxr-xr-x | svg/digitalread.py | 98 | ||||
-rwxr-xr-x | svg/digitalwrite.py | 98 | ||||
-rwxr-xr-x | svg/high.py | 98 | ||||
-rwxr-xr-x | svg/input.py | 98 | ||||
-rwxr-xr-x | svg/low.py | 98 | ||||
-rwxr-xr-x | svg/output.py | 98 | ||||
-rwxr-xr-x | svg/pwm.py | 98 | ||||
-rwxr-xr-x | svg/servo.py | 98 | ||||
-rwxr-xr-x | svg/setpinmode.py | 98 |
12 files changed, 1176 insertions, 0 deletions
diff --git a/svg/analogread.py b/svg/analogread.py new file mode 100755 index 0000000..b49d57b --- /dev/null +++ b/svg/analogread.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "analogread" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('analogread') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/analogwrite.py b/svg/analogwrite.py new file mode 100755 index 0000000..d54b469 --- /dev/null +++ b/svg/analogwrite.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "analogwrite" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('analowrite') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/delay.py b/svg/delay.py new file mode 100755 index 0000000..9c14565 --- /dev/null +++ b/svg/delay.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "delay" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('delay') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/digitalread.py b/svg/digitalread.py new file mode 100755 index 0000000..d71c94f --- /dev/null +++ b/svg/digitalread.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "digitalread" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('digitalread') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/digitalwrite.py b/svg/digitalwrite.py new file mode 100755 index 0000000..488bbf2 --- /dev/null +++ b/svg/digitalwrite.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "digitalwrite" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('digitalwrite') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/high.py b/svg/high.py new file mode 100755 index 0000000..03760c1 --- /dev/null +++ b/svg/high.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "high" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('high') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/input.py b/svg/input.py new file mode 100755 index 0000000..f51a950 --- /dev/null +++ b/svg/input.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "input" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('input') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/low.py b/svg/low.py new file mode 100755 index 0000000..7014235 --- /dev/null +++ b/svg/low.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "low" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('low') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/output.py b/svg/output.py new file mode 100755 index 0000000..67a86b0 --- /dev/null +++ b/svg/output.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "output" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('output') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/pwm.py b/svg/pwm.py new file mode 100755 index 0000000..26a51d8 --- /dev/null +++ b/svg/pwm.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "pwm" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('pwm') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/servo.py b/svg/servo.py new file mode 100755 index 0000000..99fe7a6 --- /dev/null +++ b/svg/servo.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "servo" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('servo') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) diff --git a/svg/setpinmode.py b/svg/setpinmode.py new file mode 100755 index 0000000..2911d35 --- /dev/null +++ b/svg/setpinmode.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#Copyright (c) 2009, Sugar Labs + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files (the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions: + +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +#THE SOFTWARE. + +import sys +import os +import os.path +import gettext +from gettext import gettext as _ + +def main(): + + myname = "setpinmode" + if len(sys.argv) != 2: + print "Error: Usage is " + myname + ".py lang" + return + + t = gettext.translation("org.laptop.TurtleArtActivity", "../locale", languages=[sys.argv[1]]) + _ = t.ugettext + t.install() + + mystring = _('setpinmode') + mygroup = "arduino" + + print mystring + + data0 = \ +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \n \ +<svg \n \ + xmlns=\"http://www.w3.org/2000/svg\" \n \ + xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n \ + width=\"92\" \n \ + height=\"46\" \n \ + version=\"1.0\"> \n \ + <defs> \n \ + <linearGradient \n \ + id=\"linearGradient3166\"> \n \ + <stop \n \ + style=\"stop-color:#ffffff;stop-opacity:1;\" \n \ + offset=\"0\" \n \ + id=\"stop3168\" /> \n \ + <stop \n \ + style=\"stop-color:#ff00ff;stop-opacity:1;\" \n \ + offset=\"1\" \n \ + id=\"stop3170\" /> \n \ + </linearGradient> \n \ + <linearGradient \n \ + xlink:href=\"#linearGradient3166\" \n \ + id=\"linearGradient3172\" \n \ + x1=\"0\" \n \ + y1=\"22\" \n \ + x2=\"74\" \n \ + y2=\"22\" \n \ + gradientUnits=\"userSpaceOnUse\" \n \ + gradientTransform=\"matrix(1.0000896,0,0,0.9890701,0.2458786,0.2513884)\" /> \n \ + </defs> \n \ + <path \n \ + style=\"fill:url(#linearGradient3172);fill-opacity:1;stroke:#a000a0;stroke-width:1.49184680000000003px;stroke-opacity:1;opacity:1\" \n \ + d=\"M 0.74592343,0.74592343 L 91.754077,0.74592343 L 91.754077,4.2076687 C 91.754077,4.2076687 79.069042,5.9236467 74,9 C 71.203841,10.696962 66.759508,15.097466 65.251702,18 C 64.484155,19.477532 64.087075,21.336249 64.151604,23 C 64.189862,23.986414 64.551215,26.149113 65.051684,27 C 67.351348,30.909843 70.1144,33.659607 74,36 C 78.30402,38.592418 91.754077,41.792331 91.754077,41.792331 L 91.754077,45.254077 L 0.74592343,45.254077 L 0.74592343,41.792331 C 0.74592343,41.792331 14.227222,39.463583 19.247581,36 C 22.495791,33.759036 26.081665,30.711113 27.348298,27 C 27.684138,26.016021 27.779735,23.994457 27.748342,23 C 27.71695,22.005542 27.616888,18.878752 27.248298,18 C 25.790481,14.524428 22.470929,10.998997 19.247581,9 C 14.258161,5.9057523 0.74592343,4.2076687 0.74592343,4.2076687 L 0.74592343,0.74592343 z\" /> \n \ + <text \n \ + style=\"font-size:12px;text-anchor:middle;text-align:center;font-family:Bitstream Vera Sans\"> \n \ + <tspan \n \ + x=\"46\" \n \ + y=\"29\" \n \ + style=\"font-size:18px\">" + + data1 = \ +"</tspan></text> \n \ +</svg> \n" + + FILE = open(os.path.join("../images", sys.argv[1], mygroup, myname + ".svg"), "w") + FILE.write(data0) + FILE.write(mystring.encode("utf-8")) + FILE.write(data1) + FILE.close() + return + +if __name__ == "__main__": + arduino) |