← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~m2j/openlp/bug-953240 into lp:openlp

 

Does this fix the issue surrounding verse tags such as "v1.5" and
"v2_alternative"
On Apr 2, 2012 9:57 PM, "Meinert Jordan" <meinertjordan@xxxxxxxxxx> wrote:

> Meinert Jordan has proposed merging lp:~m2j/openlp/bug-953240 into
> lp:openlp.
>
> Requested reviews:
>  OpenLP Core (openlp-core)
>
> For more details, see:
> https://code.launchpad.net/~m2j/openlp/bug-953240/+merge/100517
>
> Bug #953240: Merging subverse entries (e.g. v1a) at OpenSong import
> --
> https://code.launchpad.net/~m2j/openlp/bug-953240/+merge/100517
> You are subscribed to branch lp:openlp.
>
> === modified file 'openlp/plugins/songs/lib/opensongimport.py'
> --- openlp/plugins/songs/lib/opensongimport.py  2012-03-27 20:07:52 +0000
> +++ openlp/plugins/songs/lib/opensongimport.py  2012-04-02 20:56:20 +0000
> @@ -227,9 +227,17 @@
>             verses[verse_tag][verse_num][inst].append(this_line)
>         # done parsing
>         # add verses in original order
> +        verse_joints = {}
>         for (verse_tag, verse_num, inst) in our_verse_order:
> -            verse_def = u'%s%s' % (verse_tag, verse_num)
>             lines = u'\n'.join(verses[verse_tag][verse_num][inst])
> +            length = 0
> +            while(length < len(verse_num) and
> verse_num[length].isnumeric()):
> +                length += 1
> +            verse_def = u'%s%s' % (verse_tag, verse_num[:length])
> +            verse_joints[verse_def] = \
> +                u'%s\n[---]\n%s' % (verse_joints[verse_def], lines) \
> +                if verse_def in verse_joints else lines
> +        for verse_def, lines in verse_joints.iteritems():
>             self.addVerse(lines, verse_def)
>         if not self.verses:
>             self.addVerse('')
>
>
>

-- 
https://code.launchpad.net/~m2j/openlp/bug-953240/+merge/100517
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/bug-953240 into lp:openlp.


References