-
Notifications
You must be signed in to change notification settings - Fork 0
/
pylyric.py
35 lines (22 loc) · 841 Bytes
/
pylyric.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path
import database
import lyricwiki
PATH = os.path.join(os.getenv("HOME"),".pylyric")
def init():
if not os.path.isdir(PATH):
os.mkdir(PATH)
def main():
init()
#artist = raw_input("Artist: ")
#a = lyricwiki.get_albums(artist)
# the following code loads the lyrics of the disco of an artist and save it to ~./pylyric
#print lyricwiki.find_album("Alexisonfire", "You Burn First")
#for album in a.albums:
#for song in a.albums[album].songs:
#print "lyric:", a.albums[album].songs[song].lyric
#database.write_lyric(artist=a.name, song=a.albums[album].songs[song].title, lyric=a.albums[album].songs[song].lyric, album=album)
if __name__ == '__main__':
main()