Sync to trunk.

This commit is contained in:
John Schember 2009-12-04 06:03:49 -05:00
commit 49bb4a2119
5 changed files with 1871 additions and 26 deletions

View File

@ -1,22 +1,22 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008 - 2009, Darko Miletic <darko.miletic at gmail.com>'
'''
engadget.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Engadget(BasicNewsRecipe):
title = u'Engadget'
__author__ = 'Darko Miletic'
description = 'Tech news'
language = 'en'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = True
feeds = [ (u'Posts', u'http://www.engadget.com/rss.xml')]
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008 - 2009, Darko Miletic <darko.miletic at gmail.com>'
'''
engadget.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Engadget(BasicNewsRecipe):
title = u'Engadget'
__author__ = 'Darko Miletic'
description = 'Tech news'
language = 'en'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = True
feeds = [ (u'Posts', u'http://www.engadget.com/rss.xml')]

View File

@ -12,7 +12,6 @@ from calibre.gui2 import ORG_NAME, APP_UID, initialize_file_icon_provider, \
Application
from calibre.gui2.main_window import option_parser as _option_parser
from calibre.utils.config import prefs, dynamic
from calibre.gui2.ui import Main
def option_parser():
parser = _option_parser('''\
@ -32,6 +31,7 @@ path_to_ebook to the database.
return parser
def init_qt(args):
from calibre.gui2.ui import Main
parser = option_parser()
opts, args = parser.parse_args(args)
if opts.with_library is not None and os.path.isdir(opts.with_library):
@ -45,6 +45,7 @@ def init_qt(args):
return app, opts, args, actions
def run_gui(opts, args, actions, listener, app):
from calibre.gui2.ui import Main
initialize_file_icon_provider()
if not dynamic.get('welcome_wizard_was_run', False):
from calibre.gui2.wizard import wizard

1845
src/calibre/gui2/ui.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@ Command line interface to the calibre database.
import sys, os, cStringIO
from textwrap import TextWrapper
from urllib import quote
from calibre import terminal_controller, preferred_encoding, prints
from calibre.utils.config import OptionParser, prefs
@ -187,8 +188,6 @@ def do_list(db, fields, sort_by, ascending, search_text, line_width, separator,
template = MarkupTemplate(XML_TEMPLATE)
return template.generate(data=data, os=os).render('xml')
elif output_format == 'stanza':
def quote(raw):
return raw.replace('"', r'\"')
data = [i for i in data if i.has_key('fmt_epub')]
for x in data:
if isinstance(x['fmt_epub'], unicode):

View File

@ -196,7 +196,7 @@ When you first run |app|, it will ask you for a folder in which to store your bo
Why doesn't |app| let me store books in my own directory structure?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The whole point of |app|'s library management features is that they provide an interface for locating books that is *much* more efficient than any possible directory scheme you could come up with for your collection. Indeed, once you become comfortable using |app|'s interface to find, sort and browse your collection, you wont ever feel the need to hunt through the files on your disk to find a book again. By managing books in its own directory struture of Author -> Title -> Book files, |app| is able to achieve a high level of reliability and standardization.
The whole point of |app|'s library management features is that they provide a search and sort based interface for locating books that is *much* more efficient than any possible directory scheme you could come up with for your collection. Indeed, once you become comfortable using |app|'s interface to find, sort and browse your collection, you wont ever feel the need to hunt through the files on your disk to find a book again. By managing books in its own directory struture of Author -> Title -> Book files, |app| is able to achieve a high level of reliability and standardization.
Why doesn't |app| have a column for foo?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~