Hi everyone,
I tried to look into the forum but can't figure out how to do it.
>>>>>>>>>>
I have a text file with URL's like below:
https://spideroak.com/share/Party/Black ... 8DJ%29.mp3
https://spideroak.com/share/Party/Bomba ... 8DJ%29.mp3
https://spideroak.com/share/Party/Fatbo ... 8DJ%29.mp3
https://spideroak.com/share/Party/Flo%2 ... 8DJ%29.mp3
https://spideroak.com/share/Party/Imeld ... 8DJ%29.mp3
https://spideroak.com/share/Party/T-Pai ... 8DJ%29.mp3
I want to pick this lines one by one and create new text file with following pattern:
<track>
<location>URL</location>
<creator></creator>
<title>WRITE SONG TITLE HERE</title>
<annotation></annotation>
</track>
For Example:
<track>
<location>https://spideroak.com/share/Party/Flo%2 ... 8DJ%29.mp3</location>
<creator></creator>
<title>Flo Rida - Low(DJ).mp3</title>
<annotation></annotation>
</track>
<track>
<location>https://spideroak.com/share/Party/T-Pai ... 8DJ%29.mp3</location>
<creator></creator>
<title>T-Pain - Church(DJ).mp3</title>
<annotation></annotation>
</track>
I am familiar with Extract Line Matching, Perl Pattern, Merge to file, Restrict to attribute and couple of others simple filters.
I can't figure out how to deal with this thing.
Just help me out with the filters to be used and their sequence and I will try to solve this thing.
Their are around 420 URLs in the file. If I can automate this thing It would save me lot of time & energy.
Please help me out.
Thanks in advance.....
Should I use capture text filter ?
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Should I use capture text filter ?
Easy, use a perl regex search/replace, search for:
Replace with:
If need be, you can also post-process the filename to remove the escaped characters - let me know if you want this too.
Code: Select all
^https://spideroak.com/share/Party/([^/]*)\.mp3$
Code: Select all
<track>
<location>$0</location>
<creator></creator>
<title>$1</title>
<annotation></annotation>
</track>
-
- Posts: 3
- Joined: Fri Nov 09, 2012 3:40 pm
Re: Should I use capture text filter ?
Thanks a lot man. It worked like charm. Thank you.
I thought i gotta use 4-5 filters. Ha Ha. You did it in one filter.
Yes I do want to get rid of the escape characters.
Please help me with that.
I thought i gotta use 4-5 filters. Ha Ha. You did it in one filter.
Yes I do want to get rid of the escape characters.
Please help me with that.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Should I use capture text filter ?
Ok, to remove escaped characters, add a new EasyPattern search replace:
Instead of entering a replace text, set the Action field to 'Send variable 1 to subfilter'.
Then, add a Filters\Convert\HTTP\HTTP Decode as a SUBFILTER, so it acts on the restricted text.
Code: Select all
<title>[ capture(1+ not '<' )]</title>
Then, add a Filters\Convert\HTTP\HTTP Decode as a SUBFILTER, so it acts on the restricted text.
-
- Posts: 3
- Joined: Fri Nov 09, 2012 3:40 pm
Re: Should I use capture text filter ?
Thanks a lot it worked.