Merge from trunk

This commit is contained in:
Charles Haley 2010-06-01 13:18:50 +01:00
commit a4eb5f5cfe
7 changed files with 823 additions and 272 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

View File

@ -0,0 +1,66 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
sarajevo-x.com
'''
import re
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag, NavigableString
class SarajevoX(BasicNewsRecipe):
title = 'Sarajevo-x.com'
__author__ = 'Darko Miletic'
description = 'Sarajevo-x.com - najposjeceniji bosanskohercegovacki internet portal'
publisher = 'InterSoft d.o.o.'
category = 'news, politics, Bosnia and Herzegovina,Sarajevo-x.com, internet, portal, vijesti, bosna i hercegovina, sarajevo'
oldest_article = 2
delay = 1
max_articles_per_feed = 100
no_stylesheets = True
encoding = 'cp1250'
use_embedded_content = False
language = 'bs'
extra_css = ' @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: Arial,Verdana,Helvetica,sans1,sans-serif} .article_description{font-family: sans1, sans-serif} div#fotka{display: block} img{margin-bottom: 0.5em} '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
}
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
keep_only_tags = [dict(name='div', attrs={'class':'content-bg'})]
remove_tags_after = dict(name='div',attrs={'class':'izvor'})
remove_tags = [dict(name=['object','link','base','table'])]
remove_attributes = ['height','width','alt','border']
feeds = [
(u'BIH' , u'http://www.sarajevo-x.com/rss/bih' )
,(u'Svijet' , u'http://www.sarajevo-x.com/rss/svijet' )
,(u'Biznis' , u'http://www.sarajevo-x.com/rss/biznis' )
,(u'Sport' , u'http://www.sarajevo-x.com/rss/sport' )
,(u'Showtime' , u'http://www.sarajevo-x.com/rss/showtime' )
,(u'Scitech' , u'http://www.sarajevo-x.com/rss/scitech' )
,(u'Lifestyle' , u'http://www.sarajevo-x.com/rss/lifestyle' )
,(u'Kultura' , u'http://www.sarajevo-x.com/rss/kultura' )
,(u'Zanimljivosti', u'http://www.sarajevo-x.com/rss/zanimljivosti')
]
def preprocess_html(self, soup):
dtag = soup.find('div',attrs={'id':'fotka'})
if dtag:
sp = soup.find('div',attrs={'id':'opisslike'})
img = soup.find('img')
if sp:
sp
else:
mtag = Tag(soup,'div',[("id","opisslike"),("class","opscitech")])
mopis = NavigableString("Opis")
mtag.insert(0,mopis)
img.append(mtag)
return soup

View File

@ -2,7 +2,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
__appname__ = 'calibre' __appname__ = 'calibre'
__version__ = '0.6.95' __version__ = '0.6.55'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
import re import re

View File

@ -237,6 +237,9 @@ class OutputProfile(Plugin):
# If True the MOBI renderer on the device supports MOBI indexing # If True the MOBI renderer on the device supports MOBI indexing
supports_mobi_indexing = False supports_mobi_indexing = False
# Device supports displaying a nested TOC
supports_nested_toc = True
@classmethod @classmethod
def tags_to_string(cls, tags): def tags_to_string(cls, tags):
return escape(', '.join(tags)) return escape(', '.join(tags))
@ -250,6 +253,7 @@ class iPadOutput(OutputProfile):
screen_size = (768, 1024) screen_size = (768, 1024)
comic_screen_size = (768, 1024) comic_screen_size = (768, 1024)
dpi = 132.0 dpi = 132.0
supports_nested_toc = False
class SonyReaderOutput(OutputProfile): class SonyReaderOutput(OutputProfile):

File diff suppressed because it is too large Load Diff

View File

@ -312,7 +312,7 @@ class JobsDialog(QDialog, Ui_JobsDialog):
def show_details(self): def show_details(self):
for index in self.jobs_view.selectedIndexes(): for index in self.jobs_view.selectedIndexes():
self.jobs_view.show_details(index) self.show_job_details(index)
return return
def kill_all_jobs(self): def kill_all_jobs(self):

View File

@ -4,9 +4,9 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: calibre 0.6.95\n" "Project-Id-Version: calibre 0.6.55\n"
"POT-Creation-Date: 2010-05-30 22:56+MDT\n" "POT-Creation-Date: 2010-05-31 10:04+MDT\n"
"PO-Revision-Date: 2010-05-30 22:56+MDT\n" "PO-Revision-Date: 2010-05-31 10:04+MDT\n"
"Last-Translator: Automatically generated\n" "Last-Translator: Automatically generated\n"
"Language-Team: LANGUAGE\n" "Language-Team: LANGUAGE\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -247,7 +247,7 @@ msgid "This profile tries to provide sane defaults and is useful if you know not
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:57 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:57
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:258 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:262
msgid "This profile is intended for the SONY PRS line. The 500/505/600/700 etc." msgid "This profile is intended for the SONY PRS line. The 500/505/600/700 etc."
msgstr "" msgstr ""
@ -256,62 +256,62 @@ msgid "This profile is intended for the SONY PRS 300."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:78 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:78
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:292 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:296
msgid "This profile is intended for the SONY PRS-900." msgid "This profile is intended for the SONY PRS-900."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:86 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:86
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:322 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:326
msgid "This profile is intended for the Microsoft Reader." msgid "This profile is intended for the Microsoft Reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:97 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:97
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:333 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:337
msgid "This profile is intended for the Mobipocket books." msgid "This profile is intended for the Mobipocket books."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:110 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:110
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:346 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:350
msgid "This profile is intended for the Hanlin V3 and its clones." msgid "This profile is intended for the Hanlin V3 and its clones."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:122 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:122
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:358 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:362
msgid "This profile is intended for the Hanlin V5 and its clones." msgid "This profile is intended for the Hanlin V5 and its clones."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:132 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:132
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:366 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:370
msgid "This profile is intended for the Cybook G3." msgid "This profile is intended for the Cybook G3."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:145 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:145
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:379 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:383
msgid "This profile is intended for the Cybook Opus." msgid "This profile is intended for the Cybook Opus."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:157 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:157
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:390 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:394
msgid "This profile is intended for the Amazon Kindle." msgid "This profile is intended for the Amazon Kindle."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:169 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:169
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:425 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:429
msgid "This profile is intended for the Irex Illiad." msgid "This profile is intended for the Irex Illiad."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:181 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:181
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:438 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:442
msgid "This profile is intended for the IRex Digital Reader 1000." msgid "This profile is intended for the IRex Digital Reader 1000."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:194 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:194
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:452 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:456
msgid "This profile is intended for the IRex Digital Reader 800." msgid "This profile is intended for the IRex Digital Reader 800."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:206 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:206
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:466 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:470
msgid "This profile is intended for the B&N Nook." msgid "This profile is intended for the B&N Nook."
msgstr "" msgstr ""
@ -323,27 +323,27 @@ msgstr ""
msgid "This profile tries to provide sane defaults and is useful if you want to produce a document intended to be read at a computer or on a range of devices." msgid "This profile tries to provide sane defaults and is useful if you want to produce a document intended to be read at a computer or on a range of devices."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:248 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:251
msgid "Intended for the iPad and similar devices with a resolution of 768x1024" msgid "Intended for the iPad and similar devices with a resolution of 768x1024"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:271 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:275
msgid "This profile is intended for the Kobo Reader." msgid "This profile is intended for the Kobo Reader."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:283 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:287
msgid "This profile is intended for the SONY PRS-300." msgid "This profile is intended for the SONY PRS-300."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:301 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:305
msgid "This profile is intended for the 5-inch JetBook." msgid "This profile is intended for the 5-inch JetBook."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:310 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:314
msgid "This profile is intended for the SONY PRS line. The 500/505/700 etc, in landscape mode. Mainly useful for comics." msgid "This profile is intended for the SONY PRS line. The 500/505/700 etc, in landscape mode. Mainly useful for comics."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/customize/profiles.py:408 #: /home/kovid/work/calibre/src/calibre/customize/profiles.py:412
msgid "This profile is intended for the Amazon Kindle DX." msgid "This profile is intended for the Amazon Kindle DX."
msgstr "" msgstr ""
@ -415,46 +415,50 @@ msgstr ""
msgid "Communicate with S60 phones." msgid "Communicate with S60 phones."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:35 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:51
msgid "Communicate with iBooks through iTunes." msgid "Communicate with iBooks through iTunes."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:40 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:56
msgid "Apple device detected, launching iTunes, please wait..." msgid "Apple device detected, launching iTunes, please wait ..."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:100 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:114
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:103 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:132
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:135
msgid "Updating device metadata listing..." msgid "Updating device metadata listing..."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:164 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:195
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:658 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:226
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:793
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:930
msgid "%d of %d" msgid "%d of %d"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:167 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:232
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:661 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:935
msgid "finished" msgid "finished"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:258 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:349
msgid "" msgid ""
"Certain books may only be deleted from within the iBooks app.\n" "Some books not found in iTunes database.\n"
"Delete using the iBooks app.\n"
"Click 'Show Details' for a list." "Click 'Show Details' for a list."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:468 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:588
#: /home/kovid/work/calibre/src/calibre/devices/usbms/deviceconfig.py:28 #: /home/kovid/work/calibre/src/calibre/devices/usbms/deviceconfig.py:28
msgid "settings for device drivers" msgid "settings for device drivers"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:470 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:590
#: /home/kovid/work/calibre/src/calibre/devices/usbms/deviceconfig.py:30 #: /home/kovid/work/calibre/src/calibre/devices/usbms/deviceconfig.py:30
msgid "Ordered list of formats the device will accept" msgid "Ordered list of formats the device will accept"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:564 #: /home/kovid/work/calibre/src/calibre/devices/apple/driver.py:704
msgid "" msgid ""
"Some cover art could not be converted.\n" "Some cover art could not be converted.\n"
"Click 'Show Details' for a list." "Click 'Show Details' for a list."