OSDN Git Service

update on the implementation of SERIKO/2.0(2)
authorShyouzou Sugitani <shy@users.sourceforge.jp>
Sat, 9 Feb 2013 07:35:37 +0000 (16:35 +0900)
committerShyouzou Sugitani <shy@users.sourceforge.jp>
Sat, 9 Feb 2013 07:35:37 +0000 (16:35 +0900)
ChangeLog
lib/ninix/seriko.py

index bb81459..5b629c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat February 9 2013   Shyouzou Sugitani <shy@users.sourceforge.jp>
+       * SERIKO/2.0のパターン処理用の正規表現に間違いがあったのを修正した.
+       * SERIKO/2.0のメソッドの一部でパラメータの取得に問題があったのを
+         修正した.
+
 Fri February 8 2013   Shyouzou Sugitani <shy@users.sourceforge.jp>
        * SERIKO/2.0のalternativestartのID区切り文字として
          ピリオドとカンマの両方を受け付けるようにした.
index 05741ed..34dfe1d 100644 (file)
@@ -462,7 +462,7 @@ re_seriko_pattern = re.compile(r'^([0-9]+|-[12])\s*,\s*([+-]?[0-9]+)\s*,\s*(over
 
 re_seriko2_interval = re.compile('^animation([0-9]+)\.interval$')
 re_seriko2_interval_value = re.compile('^(sometimes|rarely|random,[0-9]+|periodic,[0-9]+|always|runonce|yesn-e|talk,[0-9]+|never)$')
-re_seriko2_pattern = re.compile(r'^(overlay|overlayfast|interpolate|reduce|replace|base|move|start|alternativestart)\s*,\s*([0-9]+|-[12])?\s*,?\s*([+-]?[0-9]+)?\s*,?\s*([+-]?[0-9]+)?\s*,?\s*([+-]?[0-9]+)?\s*,?\s*(\([0-9]+([\.\,][0-9]+)*\)?)$')
+re_seriko2_pattern = re.compile(r'^(overlay|overlayfast|interpolate|reduce|replace|base|move|start|alternativestart)\s*,\s*([0-9]+|-[12])?\s*,?\s*([+-]?[0-9]+)?\s*,?\s*([+-]?[0-9]+)?\s*,?\s*([+-]?[0-9]+)?\s*,?\s*(\([0-9]+([\.\,][0-9]+)*\))?$')
 
 def get_actors(config):
     version = None
@@ -542,8 +542,8 @@ def get_actors(config):
                     method = match.group(3)
                 else:
                     method = match.group(1)
-                    surface = str(int(match.group(2)))
-                    interval = abs(int(match.group(3)))
+                    surface = str(int(match.group(2) or 0))
+                    interval = abs(int(match.group(3) or 0))
                 if method == '':
                     method = 'base'
                 if method == 'start':