version 0.5.1

This commit is contained in:
Kovid Goyal 2009-03-13 20:00:33 -07:00
parent ef053497c4
commit ac90548d0b
4 changed files with 19 additions and 9 deletions

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.5.0' __version__ = '0.5.1'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
''' '''
Various run time constants. Various run time constants.

View File

@ -244,7 +244,10 @@ def do_add(db, paths, one_book_per_directory, recurse, add_duplicates):
if os.path.isdir(path): if os.path.isdir(path):
dirs.append(path) dirs.append(path)
else: else:
files.append(path) if os.path.exists(path):
files.append(path)
else:
print path, 'not found'
formats, metadata = [], [] formats, metadata = [], []
for book in files: for book in files:
@ -262,11 +265,13 @@ def do_add(db, paths, one_book_per_directory, recurse, add_duplicates):
formats.append(format) formats.append(format)
metadata.append(mi) metadata.append(mi)
file_duplicates = db.add_books(files, formats, metadata, add_duplicates=add_duplicates) file_duplicates = []
if not file_duplicates[0]: if files:
file_duplicates = [] file_duplicates = db.add_books(files, formats, metadata,
else: add_duplicates=add_duplicates)
file_duplicates = file_duplicates[0] if file_duplicates:
file_duplicates = file_duplicates[0]
dir_dups = [] dir_dups = []
for dir in dirs: for dir in dirs:
@ -286,7 +291,9 @@ def do_add(db, paths, one_book_per_directory, recurse, add_duplicates):
db.import_book(mi, formats) db.import_book(mi, formats)
else: else:
if dir_dups or file_duplicates: if dir_dups or file_duplicates:
print >>sys.stderr, _('The following books were not added as they already exist in the database (see --duplicates option):') print >>sys.stderr, _('The following books were not added as '
'they already exist in the database '
'(see --duplicates option):')
for mi, formats in dir_dups: for mi, formats in dir_dups:
title = mi.title title = mi.title
if isinstance(title, unicode): if isinstance(title, unicode):

View File

@ -131,6 +131,8 @@ First install the Stanza reader on your iPhone from http://www.lexcycle.com . Th
with the IP address of your computer. Stanza will the use the |app| content server to access all the with the IP address of your computer. Stanza will the use the |app| content server to access all the
EPUB books in your |app| database. EPUB books in your |app| database.
A more detailed guide is available `here <http://www.mobileread.com/forums/showthread.php?p=391919#post391919>`_
Library Management Library Management
------------------ ------------------

View File

@ -14,6 +14,7 @@ class Time(BasicNewsRecipe):
description = 'Weekly magazine' description = 'Weekly magazine'
oldest_article = 7 oldest_article = 7
max_articles_per_feed = 100 max_articles_per_feed = 100
encoding = 'utf-8'
no_stylesheets = True no_stylesheets = True
language = _('English') language = _('English')
use_embedded_content = False use_embedded_content = False