-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparserCifra.py
40 lines (31 loc) · 857 Bytes
/
parserCifra.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
36
37
38
39
40
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 23 22:00:16 2011
@author: antoanne
"""
from BeautifulSoup import BeautifulStoneSoup
PATH = "/home/antoanne/Dropbox/Work-2011/Mestrado/Modelagem/musica/data/"
FILE = "www.cifraclub.com.br"
def cleanCifra(cifra):
return cifra
def splitCifraLetra(cifra):
cifra = []
letra = []
return letra, cifra
def cleanDictCifra(d):
pass
#print d['cifra']
#d['letra'], d['cifra'] = splitCifraLetra(d['cifra'])
#print '==================================================='
#print d['cifra']
#return d
def readFromDictFile(fileName):
c = open(PATH+fileName+'.cleaned.dictFile','r')
c.readAll
for line in c:
print eval(line)
cleanDictCifra(eval(line))
break
#c.write(str(cleanDictCifra(eval(line))))
c.close()
readFromDictFile(FILE)