← Back to team overview

openlp-core team mailing list archive

Re: [Question #139911]: How do I get a text file of the songs DB, please

 

Question #139911 on OpenLP changed:
https://answers.launchpad.net/openlp/+question/139911

Garrett posted a new comment:
And if you want to do it from the terminal, you could do something like
this (in python3 and after replacing the location of songs.sqlite).

#!/usr/bin/env python
import sqlite3
import xml.etree.ElementTree as etree

c=sqlite3.connect("/home/garrett/.local/share/openlp/songs/songs.sqlite")

for i in c.execute("select * from songs"):
    print(i[2])
    for q in etree.fromstring(i[4])[0]:
        print(q.text,end="\n\n")
    print()

-- 
You received this question notification because you are a member of
OpenLP Core, which is an answer contact for OpenLP.