forked from openlp/openlp
Working on non-ascii characters in zipfiles
This commit is contained in:
parent
38ccc21f89
commit
ab1f040aaa
@ -9,10 +9,10 @@ import codecs
|
|||||||
def opensong_import_lots():
|
def opensong_import_lots():
|
||||||
ziploc=u'/home/mjt/openlp/OpenSong_Data/'
|
ziploc=u'/home/mjt/openlp/OpenSong_Data/'
|
||||||
files=[]
|
files=[]
|
||||||
files=['test.opensong.zip']
|
files=[u'test.opensong.zip', ziploc+u'ADond.zip']
|
||||||
files.extend(glob(ziploc+u'Songs.zip'))
|
#files.extend(glob(ziploc+u'Songs.zip'))
|
||||||
files.extend(glob(ziploc+u'SOF.zip'))
|
#files.extend(glob(ziploc+u'SOF.zip'))
|
||||||
# files.extend(glob(ziploc+u'spanish_songs_for_opensong.zip'))
|
files.extend(glob(ziploc+u'spanish_songs_for_opensong.zip'))
|
||||||
# files.extend(glob(ziploc+u'opensong_*.zip'))
|
# files.extend(glob(ziploc+u'opensong_*.zip'))
|
||||||
errfile=codecs.open(u'import_lots_errors.txt', u'w', u'utf8')
|
errfile=codecs.open(u'import_lots_errors.txt', u'w', u'utf8')
|
||||||
manager=SongManager()
|
manager=SongManager()
|
||||||
@ -47,7 +47,7 @@ def opensong_import_lots():
|
|||||||
print_exc(3)
|
print_exc(3)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# continue
|
# continue
|
||||||
o.finish()
|
#o.finish()
|
||||||
print "OK"
|
print "OK"
|
||||||
#os.unlink(filename)
|
#os.unlink(filename)
|
||||||
# o.song.print_song()
|
# o.song.print_song()
|
||||||
|
@ -28,6 +28,9 @@ from openlp.plugins.songs.lib.manager import SongManager
|
|||||||
def test():
|
def test():
|
||||||
manager = SongManager()
|
manager = SongManager()
|
||||||
o = OpenSongImport(manager)
|
o = OpenSongImport(manager)
|
||||||
|
o.do_import(u'/home/mjt/openlp/OpenSong_Data/ADond', commit=False)
|
||||||
|
o.song.print_song()
|
||||||
|
sys.exit(1)
|
||||||
o.do_import(u'test.opensong', commit=False)
|
o.do_import(u'test.opensong', commit=False)
|
||||||
# o.finish()
|
# o.finish()
|
||||||
o.song.print_song()
|
o.song.print_song()
|
||||||
|
Loading…
Reference in New Issue
Block a user