Here are the source, and result files I would like, plus the rules for the task that I think are complete.
If anyone finds it an interesting puzzle than I'd appreciate help to solve this.
In essence I'd like to add titles after the 17th one, to the end of the upper set of titles from 01 to 17,
and discard any above 17+17 titles ... but there are some tricky bits.
Source file:
Code: Select all
Album: Auf Wiederseh'n
01 Tanze mit mir inden Morgen: Gerhard Wendland
02 Mondhelle Nacht: Gert & Hermien
03 Lass mein Herz: Enca marina
04 Mama: Heintje
05 Nimm deine weisse gitarre: Gert Timmerman
06 Heitschi: Heintje
07 Monika: Ulli Martin
08 Blau Bluht der Enzian: Heino
09 Emmer Sontags: Cindy & Bert
10 Aufwiedersehn: Denis Roussos
11 Michaela: Bata Ellic
12 Schon ist es auf: Roy Black & Anita
13 Adios Amar: Andy Borg
14 Ich sing ein Lied: Heintje
15 Ich bau dir ein Schloss: Heintje
16 Unknown: track 16: Artist at Australia
17 Unknown: track 17: Artist at Sweden
18 Unknown: track 18: Artist at Home
19 Unknown: track 19: Artist at America
20 Unknown: track 20: Artist at Sweden
Result file.
Code: Select all
Album: Auf Wiederseh'n
01 Tanze mit mir inden Morgen: Gerhard 18 Unknown: track 18: Artist at
02 Mondhelle Nacht: Gert & Hermien 19 Unknown: track 19: Artist at
03 Lass mein Herz: Enca marina 20 Unknown: track 20: Artist at
04 Mama: Heintje
05 Nimm deine weisse gitarre: Gert Timmerman
06 Heitschi: Heintje
07 Monika: Ulli Martin
08 Blau Bluht der Enzian: Heino
09 Emmer Sontags: Cindy & Bert
10 Aufwiedersehn: Denis Roussos
11 Michaela: Bata Ellic
12 Schon ist es auf: Roy Black & Anita
13 Adios Amar: Andy Borg
14 Ich sing ein Lied: Heintje
15 Ich bau dir ein Schloss: Heintje
16 Unknown: track 16: Artist at Australia
17 Unknown: track 17: Artist at Sweden
Rules for this task:
Code: Select all
If any lines exist after title 17 (the album line is not counted or changed)
A) then - truncate the titles from 01 to 17 at 38 characters and pad with spaces to 38 characters if needed.
B) add a space to the beginning of all titles numbered 18 and onward.
C) add the 18 and over titles at the end of 01,02,03 titles, and onward until it reaches title numbered 17.
Also truncate all of the added titles at character 32, including the leading space
(title line is 38 characters, a space, and 31 characters from the added title - making 70 char in total.
Any extra title over (17 + 17) can be discarded
D) Any titles past 01,02,03 etc that do not have an added line - do not need to be truncated or padded
E) An extra complication is that some files use three digit numbers for titles,
and some have no numbers, but still need to be processed in the same way.
The aim of the exercise is to make the result file into an image (with ImageMajick)
and an android player displays this image, while it plays the mp3 of the record.
The display screen is large, and it needs a large font for the lady to read
the titles - so this would allow her to follow more of the titles on the record.
I'd love some help or pointers to techniques that will help me solve this. Ta!