Dinner picker

Hey all.

I have a challenge at hand. I’m looking for a way to choose a random line at a local document.
The random line will be a dish for dinner. I want to show the result in a sensor. or something alike.
On top on that, I want to create a function to see the line, and the number in the line, that number represents amount of days the food will be served, so it do not choose one different food for all the days.
If i can create 14 of these sensors. Then i can create a food calendar for 14 days in a row, and extend it one day at a time, when the first day have ended.

Now the challenge begins. I have no clue how to create this. I want to learn, but have no idea where to start looking.

btw english is not my native language.

Thanks in advance.