Browse Source

Merge pull request #22 from patacrep/next-content

Remplacement de 'songs' par 'content'
pull/27/head
Louis 11 years ago
parent
commit
0f201a6725
  1. 8
      songbook_core/build.py

8
songbook_core/build.py

@ -45,7 +45,7 @@ class Songbook(object):
'authwords': {}, 'authwords': {},
'lang': 'french', 'lang': 'french',
'sort': [u"by", u"album", u"@title"], 'sort': [u"by", u"album", u"@title"],
'songs': None, 'content': None,
'datadir': os.path.abspath('.'), 'datadir': os.path.abspath('.'),
} }
self.songslist = None self.songslist = None
@ -79,8 +79,8 @@ class Songbook(object):
self.config['datadir'] = os.path.abspath(self.config['datadir']) self.config['datadir'] = os.path.abspath(self.config['datadir'])
### Some post-processing ### Some post-processing
# Compute song list # Compute song list
if self.config['songs'] is None: if self.config['content'] is None:
self.config['songs'] = [ self.config['content'] = [
os.path.relpath( os.path.relpath(
filename, filename,
os.path.join(self.config['datadir'], 'songs'), os.path.join(self.config['datadir'], 'songs'),
@ -92,7 +92,7 @@ class Songbook(object):
) )
] ]
self.songslist = SongsList(self.config['datadir']) self.songslist = SongsList(self.config['datadir'])
self.songslist.append_list(self.config['songs']) self.songslist.append_list(self.config['content'])
# Ensure self.config['authwords'] contains all entries # Ensure self.config['authwords'] contains all entries
for (key, value) in DEFAULT_AUTHWORDS.items(): for (key, value) in DEFAULT_AUTHWORDS.items():

Loading…
Cancel
Save