# Importing lyrics from text files

**URL:** <https://discourse.beets.io/t/importing-lyrics-from-text-files/53>\
**Category:** Help\
**Created:** [April 7, 2017, 11:24am UTC](https://discourse.beets.io/t/importing-lyrics-from-text-files/53 "2017-04-07T11:24:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![juh](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@juh](https://discourse.beets.io/u/juh)\
**Post date:** [April 7, 2017, 11:24am UTC](https://discourse.beets.io/t/importing-lyrics-from-text-files/53/1 "2017-04-07T11:24:13Z")

</div>

Hi all,

I discovered beets two weeks ago and I am more than happy with this tool. Great!

Is there a way to tweak the lyrics plug-in, in an easy way, to import the lyrics from text files in a specific folder?

I have the lyrcis for many music files as Markdown files. Some of the lyrics are also available in the databases the plugin is using but not all of them.

It could be done with a simple filename matching mechanism as all files are named according to the title of the music. Maybe I can do it myself with my very limited programming skills if you point me to a starting point.

Ciao!  
juh

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [April 7, 2017, 4:18pm UTC](https://discourse.beets.io/t/importing-lyrics-from-text-files/53/2 "2017-04-07T16:18:36Z")

</div>

There’s nothing built in to do this, exactly, but you might be able to do it one at a time with some shell trickery:

```auto
beet mod lyrics=$(cat lyrics.txt)

```

As as far as getting started writing your own little plugin, that shouldn’t be too bad! You might try looking at the top-level entry point (the BeetsPlugin subclass) in the lyrics plugin to see how lyrics are added to an item.

---

<div class="post-metadata">

**Author:** ![juh](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@juh](https://discourse.beets.io/u/juh)\
**Post date:** [April 13, 2017, 9:42am UTC](https://discourse.beets.io/t/importing-lyrics-from-text-files/53/3 "2017-04-13T09:42:51Z")

</div>

This command does not work on my computer.

I am using beet with python 3 from pip in a virtualenv on Ubuntu 16.10.

Nothing happens and beet consumes 100% of a CPU kernel.

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [April 13, 2017, 11:18am UTC](https://discourse.beets.io/t/importing-lyrics-from-text-files/53/4 "2017-04-13T11:18:07Z")

</div>

Well, that’s probably because the commmand I have you doesn’t have a query, so it wants to modify all your files. You probably want to modify a specific track, and so you’ll want to add a query to that.

---

<div class="post-metadata">

**Author:** ![juh](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@juh](https://discourse.beets.io/u/juh)\
**Post date:** [April 13, 2017, 12:23pm UTC](https://discourse.beets.io/t/importing-lyrics-from-text-files/53/5 "2017-04-13T12:23:35Z")

</div>

Oh, no I provided a reasonable query. 😉
