Closed

Replace a line in multiple text files by comparing with csv - Python

This project received 24 bids from talented freelancers with an average bid price of $114 USD.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
N/A
Total Bids
24
Project Description

Hi,
the purpose of the project is to match playlist text files with the appropriate mp3 filename.
The mp3 filenames are in a one column csv file.
When a matched then replace the 3rd line of the playlist text file with the matched field from the csv.
(the 3rd line of the playlist file contains the mp3 filename).

the criterion to match is a 3 digit number which is the episode number of a radioshow.
in some cases the radioshow is split to two parts so there might be
A State Of Trance - nr. 082 (2003-01-30) Part [url removed, login to view]
A State Of Trance - nr. 082 (2003-01-30) Part [url removed, login to view]

example 1. a csv field looks like this:
A State Of Trance - nr. 249 (2006-11-12).mp3
the matching filename is:
[url removed, login to view]

so the common field is 249

example 2. a csv field has parts:
A State Of Trance - nr. 082 (2003-01-30) Part [url removed, login to view]
A State Of Trance - nr. 082 (2003-01-30) Part [url removed, login to view]
the matching filenames are:
01 Armin van Buuren - A State of Trance, episode 082 [The Newest Tunes Selected] (2003-01-30).cue
02 Armin van Buuren - A State of Trance, episode 082 [The Newest Tunes Selected] (2003-01-30).cue

so the matching number is 082 and part 1 with 01 and part 2 with 02.

Please post a brief summary on how you plan to solve this project.
I am attaching the filenames and the playlist files to get the idea of the data.

Thanks,
Michael

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online