Commits

kenko  committed a6959de

fill tracknumbers slightly more properly

  • Participants
  • Parent commits c6ecf24

Comments (0)

Files changed (1)

                 [] -> throwError $ "Bad XML: couldn't parse int in tag "++t
                 [(x::Int,_)] -> return x
       rtag t = tagtext t >>> r t
-      tr = right $ arr (take 2 . show) -- bad assumption: < 100 tracks
+      tr = right $ arr (fill '0' 2 . show) -- bad assumption: < 100 tracks
+
+fill fille until s = if length s < until then fill fille until (fille:s)
+                     else s
 
 collect repu repapo = atTag "PACKAGE" >>> (tagtext "ACTION" &&& tagtext "EXP_DATE" &&& listA (gettrack repu repapo)) >>> arr f
     where