'), lambda h1: ''),
+ (re.compile(r''), lambda h2: '')
+ ]
# Select the feeds that you are interested.
feeds = [
@@ -96,19 +104,20 @@ class MWJournal(BasicNewsRecipe):
# The function is adapted from the Economist recipe
def get_cover_url(self):
cover_url = None
- cover_page_location = 'http://www.mwjournal.com/Journal/' # Cover image is located on this page
+ cover_page_location = 'http://www.mwjournal.com/Journal/' # Cover image is located on this page
soup = self.index_to_soup(cover_page_location)
- cover_item = soup.find('img',attrs={'src':lambda x: x and '/IssueImg/3_MWJ_CurrIss_CoverImg' in x}) # There are three files named cover, we want the highest resolution which is the 3rd image. So we look for the pattern. Remember that the name of the cover image changes every month so we cannot search for the complete name. Instead we are searching for the pattern
+ cover_item = soup.find('img',attrs={'src':lambda x: x and '/IssueImg/3_MWJ_CurrIss_CoverImg' in x}) # There are three files named cover, we want the highest resolution which is the 3rd image. So we look for the pattern. Remember that the name of the cover image changes every month so we cannot search for the complete name. Instead we are searching for the pattern
if cover_item:
- cover_url = 'http://www.mwjournal.com' + cover_item['src'].strip() # yeah! we found it. Let's fetch the image file and pass it as cover to calibre
+ cover_url = 'http://www.mwjournal.com' + cover_item['src'].strip() # yeah! we found it. Let's fetch the image file and pass it as cover to calibre
return cover_url
def print_version(self, url):
- '''
- this function uses the print version of the article. Replaces the URL with its print version and fetch that page instead.
- '''
- return url.replace('http://mwjournal.com/Journal/article.asp?HH_ID=', 'http://mwjournal.com/Journal/Print.asp?Id=')
-
+ if url.find('/Journal/article.asp?HH_ID=') >= 0:
+ return self.browser.open_novisit(url).geturl().replace('/Journal/article.asp?HH_ID=', '/Journal/Print.asp?Id=')
+ elif url.find('/News/article.asp?HH_ID=') >= 0:
+ return self.browser.open_novisit(url).geturl().replace('/News/article.asp?HH_ID=', '/Journal/Print.asp?Id=')
+ elif url.find('/Resources/TechLib.asp?HH_ID=') >= 0:
+ return self.browser.open_novisit(url).geturl().replace('/Resources/TechLib.asp?HH_ID=', '/Resources/PrintRessource.asp?Id=')
def get_browser(self):
'''
@@ -118,9 +127,9 @@ class MWJournal(BasicNewsRecipe):
if self.username is not None and self.password is not None:
url = ('http://www.omeda.com/cgi-win/mwjreg.cgi?m=login') # main login page.
br.open(url) # fetch the 1st login page
- br.select_form('login') # finds the login form
- br['EMAIL_ADDRESS'] = self.username # fills the username
- br['PASSWORD'] = self.password # fills the password
+ br.select_form('login') # finds the login form
+ br['EMAIL_ADDRESS'] = self.username # fills the username
+ br['PASSWORD'] = self.password # fills the password
raw = br.submit().read() # submit the form and read the 2nd login form
# save it to an htm temp file (from ESPN recipe written by Kovid Goyal kovid@kovidgoyal.net
with TemporaryFile(suffix='.htm') as fname:
@@ -128,7 +137,7 @@ class MWJournal(BasicNewsRecipe):
f.write(raw)
br.open_local_file(fname)
br.select_form(nr=0) # finds submit on the 2nd form
- didwelogin = br.submit().read() # submit it and read the return html
+ didwelogin = br.submit().read() # submit it and read the return html
if 'Welcome ' not in didwelogin: # did it login successfully? Is Username/password correct?
raise Exception('Failed to login, are you sure your username and password are correct?')
#login is done
diff --git a/recipes/pambianco.recipe b/recipes/pambianco.recipe
new file mode 100644
index 0000000000..688fff6c5d
--- /dev/null
+++ b/recipes/pambianco.recipe
@@ -0,0 +1,14 @@
+from calibre.web.feeds.news import BasicNewsRecipe
+
+class AdvancedUserRecipe1326135591(BasicNewsRecipe):
+ title = u'Pambianco'
+ description = 'fashion magazine for professional people'
+ language = 'it'
+ oldest_article = 7
+ max_articles_per_feed = 100
+ auto_cleanup = True
+
+ feeds = [(u'Pambianco', u'http://feeds.feedburner.com/pambianconews/YGXu')]
+ __author__ = 'faber1971'
+__version__ = 'v1.0'
+__date__ = '9, January 2011'
diff --git a/recipes/sivil_dusunce.recipe b/recipes/sivil_dusunce.recipe
new file mode 100644
index 0000000000..66bb895f0f
--- /dev/null
+++ b/recipes/sivil_dusunce.recipe
@@ -0,0 +1,12 @@
+from calibre.web.feeds.news import BasicNewsRecipe
+
+class BasicUserRecipe1324913680(BasicNewsRecipe):
+ title = u'Sivil Dusunce'
+ language = 'tr'
+ __author__ = 'asalet_r'
+
+ oldest_article = 7
+ max_articles_per_feed = 20
+ auto_cleanup = True
+
+ feeds = [(u'Sivil Dusunce', u'http://www.sivildusunce.com/feed/')]
diff --git a/recipes/tasfiye_dergisi.recipe b/recipes/tasfiye_dergisi.recipe
new file mode 100644
index 0000000000..369913f57e
--- /dev/null
+++ b/recipes/tasfiye_dergisi.recipe
@@ -0,0 +1,12 @@
+from calibre.web.feeds.news import BasicNewsRecipe
+
+class BasicUserRecipe1324739957(BasicNewsRecipe):
+ title = u'Tasfiye Dergisi'
+ language = 'tr'
+ __author__ = 'asalet_r'
+
+ oldest_article = 7
+ max_articles_per_feed = 20
+ auto_cleanup = True
+
+ feeds = [(u'Tasfiye Dergisi', u'http://www.tasfiyedergisi.com/direnen-edebiyat/?feed=rss2')]
diff --git a/src/calibre/devices/android/driver.py b/src/calibre/devices/android/driver.py
index d12bf0fd12..d9a7578f6a 100644
--- a/src/calibre/devices/android/driver.py
+++ b/src/calibre/devices/android/driver.py
@@ -74,7 +74,7 @@ class ANDROID(USBMS):
0x0001 : [0x0223, 0x9999],
0x4e11 : [0x0100, 0x226, 0x227],
0x4e12 : [0x0100, 0x226, 0x227],
- 0x4e21 : [0x0100, 0x226, 0x227],
+ 0x4e21 : [0x0100, 0x226, 0x227, 0x231],
0xb058 : [0x0222, 0x226, 0x227],
0x0ff9 : [0x0226],
},
@@ -175,7 +175,7 @@ class ANDROID(USBMS):
'GT-S5830_CARD', 'GT-S5570_CARD', 'MB870', 'MID7015A',
'ALPANDIGITAL', 'ANDROID_MID', 'VTAB1008', 'EMX51_BBG_ANDROI',
'UMS', '.K080', 'P990', 'LTE', 'MB853', 'GT-S5660_CARD', 'A107',
- 'GT-I9003_CARD', 'XT912']
+ 'GT-I9003_CARD', 'XT912', 'FILE-CD_GADGET']
WINDOWS_CARD_A_MEM = ['ANDROID_PHONE', 'GT-I9000_CARD', 'SGH-I897',
'FILE-STOR_GADGET', 'SGH-T959', 'SAMSUNG_ANDROID', 'GT-P1000_CARD',
'A70S', 'A101IT', '7', 'INCREDIBLE', 'A7EB', 'SGH-T849_CARD',
diff --git a/src/calibre/ebooks/conversion/cli.py b/src/calibre/ebooks/conversion/cli.py
index 1c7a29d7ff..559402ca1c 100644
--- a/src/calibre/ebooks/conversion/cli.py
+++ b/src/calibre/ebooks/conversion/cli.py
@@ -68,8 +68,8 @@ def check_command_line_options(parser, args, log):
raise SystemExit(1)
output = args[2]
- if output.startswith('.') and (output != '.' and not
- output.startswith('..')):
+ if (output.startswith('.') and output[:2] not in {'..', '.'} and '/' not in
+ output and '\\' not in output):
output = os.path.splitext(os.path.basename(input))[0]+output
output = os.path.abspath(output)
diff --git a/src/calibre/ebooks/oeb/display/cfi.coffee b/src/calibre/ebooks/oeb/display/cfi.coffee
index 0ccb209cc4..75509be9b8 100644
--- a/src/calibre/ebooks/oeb/display/cfi.coffee
+++ b/src/calibre/ebooks/oeb/display/cfi.coffee
@@ -191,9 +191,9 @@ class CanonicalFragmentIdentifier
if target.currentTime == undefined
return
if target.readyState == 4 or target.readyState == "complete"
- target.currentTime = val
+ target.currentTime = val + 0
else
- fn = -> target.currentTime = val
+ fn = ()-> target.currentTime = val
target.addEventListener("canplay", fn, false)
#}}}
diff --git a/src/calibre/ebooks/oeb/display/test-cfi/birds.mp4 b/src/calibre/ebooks/oeb/display/test-cfi/birds.mp4
new file mode 100644
index 0000000000..54869c714a
Binary files /dev/null and b/src/calibre/ebooks/oeb/display/test-cfi/birds.mp4 differ
diff --git a/src/calibre/ebooks/oeb/display/test-cfi/index.html b/src/calibre/ebooks/oeb/display/test-cfi/index.html
index e46cf3aa97..962b14e628 100644
--- a/src/calibre/ebooks/oeb/display/test-cfi/index.html
+++ b/src/calibre/ebooks/oeb/display/test-cfi/index.html
@@ -114,6 +114,15 @@
Try clicking at different points along the image. Also try changing the magnification and then hitting reload.
+ Video
+ Try clicking on this video while it is playing. The page should
+ reload with the video paused at the point it was at when you
+ clicked. To play the video you should right click on it and select
+ play (otherwise the click will cause a reload). This is currently
+ broken because of issues in the python server use to serve test
+ content. I lack the patience to track down the bug.
+
+