Sedang Disiapkan

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

Hi,

I am re-posting this as a simpler project.

the purpose of the project to compare 3 lists, find a common 3 digit number and replace the 3rd line of a text file.

Here are the steps.

Load in python 3 lists from csv/txt files.

[url removed, login to view] has 2 columns

[url removed, login to view] has 1 column.

list 1: column A from [url removed, login to view] , this column contains a list of a 3 digit number ie "276"

list 2: column B from [url removed, login to view], this column contains a list of mp3 filenames. ie "A State Of Trance - nr. 276 (2006-11-23).mp3"

list 3: column A from [url removed, login to view], this column contains a list of .cue filenames. "01_armin_van_buuren_-_a_state_of_trance_276_([url removed, login to view])[url removed, login to view]"

(the 3rd line in the .cue file contains the mp3 filename.)

As you can see the 3 digit number 276 exists in all columns.

If the 3 digit number matches all 3 lists then replace the 3rd line of the .cue file that has matching filename in list3.

ie replace the 3rd line in the file "01_armin_van_buuren_-_a_state_of_trance_276_([url removed, login to view])[url removed, login to view]" with the string:

FILE "A State Of Trance - nr. 276 (2006-11-23).mp3" WAVE from list 2: column B.

There might be multiple .cue filenames containing 276, so the string should be replaced in all.

must be careful NOT to check and match against the date, ie 2006-11-23, that means the 3 digit number is not followed or preceded by other numbers, ie 2006 in the date

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

Kemahiran: Python

Lihat lebih lanjut: tt fm, text to string, string matching in c, python find, on line posting, matching string, list get python, find python, find on-line, common string, string matching, replace, python: get data, python mp3, python data, python 3, mp3 to text, csv post, column text, python load, csv text file, python multiple line text, python csv text, find replace, find replace string csv

Tentang Majikan:
( 91 ulasan ) Nicosia, Cyprus

ID Projek: #4076383

Dianugerahkan kepada:

eghlima

hi dear, I am expert in python and scripting. I can do this in 3 hour.

$30 USD dalam sehari
(20 Ulasan)
4.7

8 pekerja bebas membida secara purata $34 untuk pekerjaan ini

scinova

We can do this today. Thanks

$30 USD dalam 0 hari
(3 Ulasan)
4.2
hddh

I can do it.

$30 USD dalam sehari
(3 Ulasan)
2.1
rkkrocks

I am a python expert. I can do this task easily. Ready to start asap.

$40 USD dalam sehari
(1 Ulasan)
1.4
prabhatg

HI there, Please check PMB for best offer.

$30 USD dalam sehari
(2 Ulasan)
1.0
alextgvw

In my opinion a robust implementation of this transform of the .cue files requires the use of regular expressions and definitely the script should make a backup of the .cue file at least until the search and replace is Lagi

$30 USD dalam 3 hari
(1 Ulasan)
0.2
dcbindaas

I have experience working over Python scripts. This objective of you can be achieved within time.

$33 USD dalam 3 hari
(0 Ulasan)
0.0
lokeshk9936

Hi, Please see PM.

$50 USD dalam 2 hari
(0 Ulasan)
0.0