# Add composer if title matches from text file?

**URL:** https://community.mp3tag.de/t/add-composer-if-title-matches-from-text-file/5660
**Category:** General Discussion
**Created:** [October 30, 2007, 3:52am UTC](https://community.mp3tag.de/t/add-composer-if-title-matches-from-text-file/5660 "2007-10-30T03:52:06Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [November 23, 2007, 2:56pm UTC](https://community.mp3tag.de/t/add-composer-if-title-matches-from-text-file/5660/11 "2007-11-23T14:56:53Z")

</div>

Here comes a more generic version of a lookup action:

mta file: [Lookup.mta](https://community.mp3tag.de/uploads/default/original/2X/3/3b8dc6278e3ff8e3ed3f311a564ec45fc8ebccdc.mta) (794 Bytes)  
sample input file: [Lookup.txt](https://community.mp3tag.de/uploads/default/original/2X/2/289a7c24442bebe1d4a7f841c39d5e91b628592f.txt) (215 Bytes)

The input file must be a normal text file of following format (first and last line empty, unique entries):

```
@CR@LF
Lazybones|Hoagy Carmichael@CR@LF
P.S. I Love You|Gordon Jenkins@CR@LF
Goody Goody|Matty Maineck@CR@LF
I'm an Old Cowhand from the Rio Grande|@CR@LF
Hooray for Hollywood|Richard A. Whiting@CR@LF
Too Marvelous for Words|Richard A. Whiting@CR@LF

```

"@CR@LF" stands for the unvisible CarriageReturn-LineFeed sequence at end of each line of text.

This is the lookup table.  
The pipe symbol "|" is used as a delimiter between the two columns "search item|result item".  
@CR = $char(13), @LF = $char(10), | = $char(124)

Changing the view a little bit our lookup table looks like:

```
@CR
@LFLazybones|Hoagy Carmichael@CR
@LFP.S. I Love You|Gordon Jenkins@CR
@LFGoody Goody|Matty Maineck@CR
@LFI'm an Old Cowhand from the Rio Grande|@CR
@LFHooray for Hollywood|Richard A. Whiting@CR
@LFToo Marvelous for Words|Richard A. Whiting@CR
@LF

```

Each row opens with the @LF symbol as the begin-of-row marker and closes with the @CR symbol as the end-of-row marker.

Finding a title is easy, just search for a string of "$char(10)%TITLE%$char(124)"  
Additional scripting returns the corresponding string from the result column.

DD.20071123.1656.CET

[Lookup.txt](https://community.mp3tag.de/uploads/default/original/2X/2/289a7c24442bebe1d4a7f841c39d5e91b628592f.txt) (215 Bytes)

[Lookup.mta](https://community.mp3tag.de/uploads/default/original/2X/3/3b8dc6278e3ff8e3ed3f311a564ec45fc8ebccdc.mta) (794 Bytes)

---

_[View the full topic](https://community.mp3tag.de/t/add-composer-if-title-matches-from-text-file/5660)._
