Browse Source

fix utils scripts

remotes/origin/next
Romain Goffe 11 years ago
parent
commit
ab43d82ec2
  1. 5
      utils/resize-cover.py
  2. 8
      utils/rules.py

5
utils/resize-cover.py

@ -4,12 +4,13 @@
#Author: Romain Goffe
#Date: 28/12/2011
#Description: Resize all covers to 128,128 thumbnails
import os
import Image
from utils.utils import recursiveFind
from utils import recursiveFind
# Process song files
library = "./"
covers = recursiveFind(os.path.join(library, 'songs'), '*.jpg')
for filename in covers:

8
utils/rules.py

@ -3,12 +3,12 @@
import glob
import getopt, sys
import re
import re, os
import logging
import locale
re.LOCALE
from utils.utils import recursiveFind
from utils import recursiveFind
# the dictionary has target_word:replacement_word pairs
word_dic = {
@ -238,7 +238,7 @@ def main():
usage()
sys.exit(2)
songfiles = recursiveFind(os.path.join(library, 'songs'), '*.sg')
library = './'
loglevel = "warning"
for option, arg in opts:
@ -256,6 +256,8 @@ def main():
else:
assert False, "unhandled option"
songfiles = recursiveFind(os.path.join(library, 'songs'), '*.sg')
for filename in songfiles:
with open(filename, 'r+') as songfile:
logging.info("checking file: "+filename)

Loading…
Cancel
Save