~daker/ubuntu-html5-theme/i18n-pojson

« back to all changes in this revision

Viewing changes to examples/html5-theme/widgets/makemessage.py

  • Committer: daker
  • Date: 2014-03-19 00:32:25 UTC
  • Revision ID: adnane002@gmail.com-20140319003225-9lxo0zlt3lc4ns7r
Added bs4 deps
Fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        s = t % (tag.text)
41
41
    file.write(s + '\n\n')
42
42
 
 
43
import re
 
44
scriptTags = soup.find_all('script')
 
45
for script in scriptTags:
 
46
    #print script
 
47
    tagContent = script.get_text()
 
48
    #print tagContent
 
49
    regex = re.compile("_(.*)?);|,", re.MULTILINE)
 
50
    r = regex.findall(tagContent)
 
51
    if r:
 
52
        for i in r:
 
53
            print i
 
54
 
43
55
file.close()