Browse Source

Song._parse doesn't use the config argument

pull/165/head
Oliverpool 9 years ago
parent
commit
821c5a1d3a
  1. 6
      patacrep/songs/__init__.py
  2. 2
      patacrep/songs/chordpro/__init__.py
  3. 2
      patacrep/songs/latex/__init__.py

6
patacrep/songs/__init__.py

@ -132,7 +132,7 @@ class Song:
self.data = {}
self.cached = None
self.lang = None
self._parse(config)
self._parse()
# Post processing of data
self.subpath = subpath
@ -176,14 +176,14 @@ class Song:
"""
raise NotImplementedError()
def _parse(self, config): # pylint: disable=no-self-use
def _parse(self): # pylint: disable=no-self-use
"""Parse song.
It set the following attributes:
- titles: the list of (raw) titles. This list will be processed to
remove prefixes.
- lang: the main language of the song, as language code..
- lang: the main language of the song, as language code.
- authors: the list of (raw) authors. This list will be processed to
'clean' it (see function :func:`patacrep.authors.processauthors`).
- data: song metadata. Used (among others) to sort the songs.

2
patacrep/songs/chordpro/__init__.py

@ -25,7 +25,7 @@ class ChordproSong(Song):
output_language = None
def _parse(self, config):
def _parse(self):
"""Parse content, and return the dictionary of song data."""
with encoding.open_read(self.fullpath, encoding=self.encoding) as song:
song = parse_song(song.read(), self.fullpath)

2
patacrep/songs/latex/__init__.py

@ -15,7 +15,7 @@ class Latex2LatexSong(Song):
"""Song written in LaTeX, rendered in LaTeX"""
# pylint: disable=abstract-method
def _parse(self, __config):
def _parse(self):
"""Parse content, and return the dictionary of song data."""
with encoding.open_read(self.fullpath, encoding=self.encoding) as song:
self.data = parse_song(song.read(), self.fullpath)

Loading…
Cancel
Save