OSDN Git Service

have the number of year at the comment to be updated automatically
authormshio <mshio@54a90f34-5e62-402c-8eae-46c47f0b2e07>
Sun, 11 Jul 2010 10:37:38 +0000 (10:37 +0000)
committermshio <mshio@54a90f34-5e62-402c-8eae-46c47f0b2e07>
Sun, 11 Jul 2010 10:37:38 +0000 (10:37 +0000)
git-svn-id: svn+ssh://svn.osdn.net/svnroot/sawarabi-fonts/trunk@12 54a90f34-5e62-402c-8eae-46c47f0b2e07

script/export_as_svg.py

index 488a38e..6b984a1 100644 (file)
@@ -20,9 +20,10 @@ import fontforge
 import optparse
 import os
 import sys
+import time
 import xml.parsers.expat
 
-COPYRIGHT = 'Copyright: (c) 2008-2010 mshio <mshio@users.sourceforge.jp>'
+COPYRIGHT = 'Copyright: (c) 2008-%d mshio <mshio@users.sourceforge.jp>'
 
 class SvgCustomizer:
   '''
@@ -145,7 +146,8 @@ class SvgCustomizer:
     self.out.write('>')
     # output copyright string
     if is_svg and self.with_comment:
-      self.out.write('<metadata><![CDATA[ %s ]]></metadata>' % COPYRIGHT)
+      c = COPYRIGHT % time.localtime()[0]
+      self.out.write('<metadata><![CDATA[ %s ]]></metadata>' % c)
 
   def end_element(self, name):
     '''各要素の終了部分を読み込み、その部分の書き出しを行います。'''