diff --git a/recipes/divahair.recipe b/recipes/divahair.recipe
new file mode 100644
index 0000000000..978ac19808
--- /dev/null
+++ b/recipes/divahair.recipe
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+
+__license__ = 'GPL v3'
+__copyright__ = u'2011, Silviu Cotoar\u0103'
+'''
+divahair.ro
+'''
+
+from calibre.web.feeds.news import BasicNewsRecipe
+
+class DivaHair(BasicNewsRecipe):
+ title = u'Diva Hair'
+ language = 'ro'
+ __author__ = u'Silviu Cotoar\u0103'
+ description = u'Coafuri, frizuri, tunsori ..'
+ publisher = u'Diva Hair'
+ category = u'Ziare,Stiri,Coafuri,Femei'
+ oldest_article = 5
+ max_articles_per_feed = 100
+ no_stylesheets = True
+ use_embedded_content = False
+ encoding = 'utf-8'
+ remove_javascript = True
+ cover_url = 'http://www.divahair.ro/imgs/logo.jpg'
+
+ conversion_options = {
+ 'comments' : description
+ ,'tags' : category
+ ,'language' : language
+ ,'publisher' : publisher
+ }
+
+ keep_only_tags = [
+ dict(name='td', attrs={'class':'spatiuart'})
+ , dict(name='div', attrs={'class':'spatiuart'})
+ ]
+
+
+ remove_tags = [
+ dict(name='div', attrs={'class':'categorie'})
+ , dict(name='div', attrs={'class':'gri gri2 detaliiart'})
+ , dict(name='div', attrs={'class':'articol_box_bottom'})
+ ]
+
+ remove_tags_after = [
+ dict(name='div', attrs={'class':'articol_box_bottom'})
+ ]
+
+ feeds = [ (u'\u0218tiri', u'http://www.divahair.ro/feed') ]
+
+ def preprocess_html(self, soup):
+ return self.adeify_images(soup)
diff --git a/recipes/icons/divahair.png b/recipes/icons/divahair.png
new file mode 100644
index 0000000000..4cb2964687
Binary files /dev/null and b/recipes/icons/divahair.png differ
diff --git a/recipes/icons/mayra.png b/recipes/icons/mayra.png
new file mode 100644
index 0000000000..bbc0c8d259
Binary files /dev/null and b/recipes/icons/mayra.png differ
diff --git a/recipes/icons/moldovaazi.png b/recipes/icons/moldovaazi.png
new file mode 100644
index 0000000000..1fc3532295
Binary files /dev/null and b/recipes/icons/moldovaazi.png differ
diff --git a/recipes/icons/newsmoldova.png b/recipes/icons/newsmoldova.png
new file mode 100644
index 0000000000..a4faaa4635
Binary files /dev/null and b/recipes/icons/newsmoldova.png differ
diff --git a/recipes/mayra.recipe b/recipes/mayra.recipe
new file mode 100644
index 0000000000..ae449d819d
--- /dev/null
+++ b/recipes/mayra.recipe
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+
+__license__ = 'GPL v3'
+__copyright__ = u'2011, Silviu Cotoar\u0103'
+'''
+mayra.ro
+'''
+
+from calibre.web.feeds.news import BasicNewsRecipe
+
+class Mayra(BasicNewsRecipe):
+ title = u'Mayra'
+ language = 'ro'
+ __author__ = u'Silviu Cotoar\u0103'
+ description = u'Traieste urban, cool, sexy'
+ publisher = 'Mayra'
+ category = 'Ziare,Stiri,Reviste'
+ oldest_article = 5
+ max_articles_per_feed = 100
+ no_stylesheets = True
+ use_embedded_content = False
+ encoding = 'utf-8'
+ remove_javascript = True
+ cover_url = 'http://img.konkurs.ro/img/concursuri-cu-premii/147/14672_front.jpg'
+
+ conversion_options = {
+ 'comments' : description
+ ,'tags' : category
+ ,'language' : language
+ ,'publisher' : publisher
+ }
+
+ keep_only_tags = [
+ dict(name='div', attrs={'id':'article_details'})
+ ]
+
+ remove_tags = [
+ dict(name='div', attrs={'id':'LikePluginPagelet'})
+ , dict(name='p', attrs={'id':'tags'})
+ , dict(name='span', attrs={'id':'tweet-button'})
+ ]
+
+ remove_tags_after = [
+ dict(name='div', attrs={'id':'LikePluginPagelet'})
+ ]
+
+ feeds = [ (u'\u0218tiri', u'http://www.mayra.ro/rss') ]
+
+ def preprocess_html(self, soup):
+ return self.adeify_images(soup)
diff --git a/recipes/moldovaazi.recipe b/recipes/moldovaazi.recipe
new file mode 100644
index 0000000000..0c92297dc0
--- /dev/null
+++ b/recipes/moldovaazi.recipe
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+
+__license__ = 'GPL v3'
+__copyright__ = u'2011, Silviu Cotoar\u0103'
+'''
+azi.md
+'''
+
+from calibre.web.feeds.news import BasicNewsRecipe
+
+class MoldovaAzi(BasicNewsRecipe):
+ title = u'Moldova Azi'
+ language = 'ro'
+ __author__ = u'Silviu Cotoar\u0103'
+ description = u'Moldova pe internet'
+ publisher = 'Moldova Azi'
+ category = 'Ziare,Stiri,Moldova'
+ oldest_article = 5
+ max_articles_per_feed = 100
+ no_stylesheets = True
+ use_embedded_content = False
+ encoding = 'utf-8'
+ remove_javascript = True
+ cover_url = 'http://www.azi.md/images/logo.gif'
+
+ conversion_options = {
+ 'comments' : description
+ ,'tags' : category
+ ,'language' : language
+ ,'publisher' : publisher
+ }
+
+ keep_only_tags = [ dict(name='div', attrs={'id':'in'})
+ ]
+
+
+ remove_tags = [
+ dict(name='div', attrs={'class':'in-more-stories'})
+ ]
+
+ remove_tags_after = [
+ dict(name='div', attrs={'id':'comment_wrapper'})
+ , dict(name='div', attrs={'class':'box-title4'})
+ ]
+
+ feeds = [ (u'\u0218tiri', u'http://www.azi.md/ro/feeds/0/rss201') ]
+
+ def preprocess_html(self, soup):
+ return self.adeify_images(soup)
diff --git a/recipes/newsmoldova.recipe b/recipes/newsmoldova.recipe
new file mode 100644
index 0000000000..e5e4bc5ac4
--- /dev/null
+++ b/recipes/newsmoldova.recipe
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+
+__license__ = 'GPL v3'
+__copyright__ = u'2011, Silviu Cotoar\u0103'
+'''
+newsmoldova.md
+'''
+
+from calibre.web.feeds.news import BasicNewsRecipe
+
+class NewsMoldova(BasicNewsRecipe):
+ title = u'Agen\u0163ia de \u015ftiri Moldova'
+ language = 'ro'
+ __author__ = u'Silviu Cotoar\u0103'
+ description = u'Agen\u0163ia de \u015ftiri Moldova'
+ publisher = 'Moldova'
+ category = 'Ziare,Stiri,Moldova'
+ oldest_article = 5
+ max_articles_per_feed = 100
+ no_stylesheets = True
+ use_embedded_content = False
+ encoding = 'utf-8'
+ remove_javascript = True
+ cover_url = 'http://www.newsmoldova.md/i/logo_top_md.gif'
+
+ conversion_options = {
+ 'comments' : description
+ ,'tags' : category
+ ,'language' : language
+ ,'publisher' : publisher
+ }
+
+ keep_only_tags = [ dict(name='div', attrs={'class':'main-article-index article'})
+ ]
+
+
+ remove_tags = [
+ dict(name='div', attrs={'id':'actions'})
+ , dict(name='li', attrs={'class':'invisible'})
+ ]
+
+ remove_tags_after = [
+ dict(name='div', attrs={'id':'actions'})
+ ]
+
+ feeds = [ (u'\u0218tiri', u'http://newsmoldova.md/export/rss2/archive/index.xml') ]
+
+ def preprocess_html(self, soup):
+ return self.adeify_images(soup)
diff --git a/setup/commands.py b/setup/commands.py
index 7e22ff14f3..febc684c08 100644
--- a/setup/commands.py
+++ b/setup/commands.py
@@ -11,7 +11,7 @@ __all__ = [
'build', 'build_pdf2xml', 'server',
'gui',
'develop', 'install',
- 'resources',
+ 'kakasi', 'resources',
'check',
'sdist',
'manual', 'tag_release',
@@ -49,8 +49,9 @@ gui = GUI()
from setup.check import Check
check = Check()
-from setup.resources import Resources
+from setup.resources import Resources, Kakasi
resources = Resources()
+kakasi = Kakasi()
from setup.publish import Manual, TagRelease, Stage1, Stage2, \
Stage3, Stage4, Publish
diff --git a/setup/installer/windows/__init__.py b/setup/installer/windows/__init__.py
index b51eccc832..59042ac56c 100644
--- a/setup/installer/windows/__init__.py
+++ b/setup/installer/windows/__init__.py
@@ -32,6 +32,7 @@ class Win32(VMInstaller):
FREEZE_TEMPLATE = 'python -OO setup.py {freeze_command} --no-ice'
INSTALLER_EXT = 'msi'
SHUTDOWN_CMD = ['shutdown.exe', '-s', '-f', '-t', '0']
+ BUILD_BUILD = ['python setup.py kakasi',] + VMInstaller.BUILD_BUILD
def download_installer(self):
installer = self.installer()
diff --git a/setup/installer/windows/freeze.py b/setup/installer/windows/freeze.py
index f666427598..7fb60968e7 100644
--- a/setup/installer/windows/freeze.py
+++ b/setup/installer/windows/freeze.py
@@ -14,7 +14,7 @@ from setup.build_environment import msvc, MT, RC
from setup.installer.windows.wix import WixMixIn
OPENSSL_DIR = r'Q:\openssl'
-QT_DIR = 'Q:\\Qt\\4.7.2'
+QT_DIR = 'Q:\\Qt\\4.7.3'
QT_DLLS = ['Core', 'Gui', 'Network', 'Svg', 'WebKit', 'Xml', 'XmlPatterns']
LIBUSB_DIR = 'C:\\libusb'
LIBUNRAR = 'C:\\Program Files\\UnrarDLL\\unrar.dll'
diff --git a/setup/installer/windows/wix-template.xml b/setup/installer/windows/wix-template.xml
index b5d2f4b292..5de08e155f 100644
--- a/setup/installer/windows/wix-template.xml
+++ b/setup/installer/windows/wix-template.xml
@@ -11,9 +11,6 @@
SummaryCodepage='1252' />
-
-
ci
'b' : ('ci', 'bold______', self.bool_st_func),
'blue' : ('ci', 'blue______', self.color_func),
- 'caps' : ('ci', 'caps______', self.bool_st_func),
- 'cf' : ('ci', 'font-color', self.default_func),
+ 'caps' : ('ci', 'caps______', self.bool_st_func),
+ 'cf' : ('ci', 'font-color', self.colorz_func),
'chftn' : ('ci', 'footnot-mk', self.bool_st_func),
'dn' : ('ci', 'font-down_', self.divide_by_2),
'embo' : ('ci', 'emboss____', self.bool_st_func),
@@ -624,6 +624,11 @@ class ProcessTokens:
num = 'true'
return 'cw<%s<%s tags.
+ # Apparently LibreOffice does this.
+ special = 'span'
if c:
c = c.replace(".","_")
special = special_styles.get("S-"+c)
- if special is None and self.generate_css:
- htmlattrs['class'] = "S-%s" % c
- self.opentag('span', htmlattrs)
+ if special is None:
+ special = 'span'
+ if self.generate_css:
+ htmlattrs['class'] = "S-%s" % c
+
+ self.opentag(special, htmlattrs)
self.purgedata()
def e_text_span(self, tag, attrs):
""" End the """
self.writedata()
- self.closetag('span', False)
+ c = attrs.get( (TEXTNS,'style-name'), None)
+ # Changed by Kovid to handle inline special styles defined on tags.
+ # Apparently LibreOffice does this.
+ special = 'span'
+ if c:
+ c = c.replace(".","_")
+ special = special_styles.get("S-"+c)
+ if special is None:
+ special = 'span'
+
+ self.closetag(special, False)
self.purgedata()
def s_text_tab(self, tag, attrs):