Return to Snippet

Revision: 21974
at December 27, 2009 11:21 by anonymous


Initial Code
#!/bin/sh
    TEMPLATE='<?xml version="1.0" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg width="800" height="640" version="1.1"
         xmlns="http://www.w3.org/2000/svg"
         xmlns:xlink="http://www.w3.org/1999/xlink">
      <rect width="800" height="640"
            style="fill:rgb(0,0,0);"/>
      <rect x="75" y="50" width="650" height="440"
            style="stroke:rgb(255,255,255);stroke-width:1;"/>
      <image x="77" y="52" width="646px" height="436px"
             xlink:href="%s"/>
      <text text-anchor="middle" x="50%%" y="545"
            font-family="Times New Roman" font-size="55"
            style="fill:rgb(255,255,255);">
        %s
      </text>
      <text text-anchor="middle" x="50%%" y="580"
            font-family="Verdana" font-size="20"
            style="fill:rgb(255,255,255);">
        %s
      </text>
    </svg>';
    printf "$TEMPLATE" "$1" "$2" "$3" | convert -quality 85 - "$4"

Initial URL

                                

Initial Description
| convert -quality 85 - "$4" - Если не установлен конверт можно закоментить

Initial Title
Генератор демотиваторов на sh

Initial Tags
xml

Initial Language
XML