Editor update - editor now builds with its own copy of ace.js
[redakcja.git] / scripts / rip-themes-from-redmine.py
1 #!/usr/bin/env python
2 import urllib
3
4 from lxml import html
5
6 URL = "http://redmine.nowoczesnapolska.org.pl/projects/wl-publikacje/wiki/Spis_motyw%C3%B3w_i_temat%C3%B3w_literackich?format=html"
7 doc = html.parse(URL)
8
9
10 for element in doc.xpath('//td'):
11     print "- model: bookthemes.theme"
12     print "  pk:", element.text_content().strip().encode('utf-8')
13     print '  fields: {description: ""}'