Ejemplo n.º 1
0
def option_parser():
    parser = _option_parser(_('''\
%prog [opts] [path_to_ebook]

Launch the main calibre Graphical User Interface and optionally add the ebook at
path_to_ebook to the database.
'''))
    parser.add_option('--with-library', default=None, action='store',
                      help=_('Use the library located at the specified path.'))
    parser.add_option('--start-in-tray', default=False, action='store_true',
                      help=_('Start minimized to system tray.'))
    parser.add_option('-v', '--verbose', default=0, action='count',
                      help=_('Ignored, do not use. Present only for legacy reasons'))
    parser.add_option('--no-update-check', default=False, action='store_true',
            help=_('Do not check for updates'))
    parser.add_option('--ignore-plugins', default=False, action='store_true',
            help=_('Ignore custom plugins, useful if you installed a plugin'
                ' that is preventing calibre from starting'))
    parser.add_option('-s', '--shutdown-running-calibre', default=False,
            action='store_true',
            help=_('Cause a running calibre instance, if any, to be'
                ' shutdown. Note that if there are running jobs, they '
                'will be silently aborted, so use with care.'))
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 2
0
def option_parser():
    parser = _option_parser(_('''\
%prog [options] [path_to_ebook]

Launch the main calibre Graphical User Interface and optionally add the e-book at
path_to_ebook to the database.
'''))
    parser.add_option('--with-library', default=None, action='store',
                      help=_('Use the library located at the specified path.'))
    parser.add_option('--start-in-tray', default=False, action='store_true',
                      help=_('Start minimized to system tray.'))
    parser.add_option('-v', '--verbose', default=0, action='count',
                      help=_('Ignored, do not use. Present only for legacy reasons'))
    parser.add_option('--no-update-check', default=False, action='store_true',
            help=_('Do not check for updates'))
    parser.add_option('--ignore-plugins', default=False, action='store_true',
            help=_('Ignore custom plugins, useful if you installed a plugin'
                ' that is preventing calibre from starting'))
    parser.add_option('-s', '--shutdown-running-calibre', default=False,
            action='store_true',
            help=_('Cause a running calibre instance, if any, to be'
                ' shutdown. Note that if there are running jobs, they '
                'will be silently aborted, so use with care.'))
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 3
0
def option_parser():
    parser = _option_parser(_('''\
%prog [options] [path_to_ebook or calibre url ...]

Launch the main calibre Graphical User Interface and optionally add the e-book at
path_to_ebook to the database. You can also specify calibre URLs to perform various
different actions, than just adding books. For example:

calibre://view-book/test_library/1842/epub

Will open the book with id 1842 in the EPUB format from the library
"test_library" in the calibre E-book viewer. Library names are the folder names of the
libraries with spaces replaced by underscores. A full description of the
various URL based actions is in the User Manual.
'''))
    parser.add_option('--with-library', default=None, action='store',
                      help=_('Use the library located at the specified path.'))
    parser.add_option('--start-in-tray', default=False, action='store_true',
                      help=_('Start minimized to system tray.'))
    parser.add_option('-v', '--verbose', default=0, action='count',
                      help=_('Ignored, do not use. Present only for legacy reasons'))
    parser.add_option('--no-update-check', default=False, action='store_true',
            help=_('Do not check for updates'))
    parser.add_option('--ignore-plugins', default=False, action='store_true',
            help=_('Ignore custom plugins, useful if you installed a plugin'
                ' that is preventing calibre from starting'))
    parser.add_option('-s', '--shutdown-running-calibre', default=False,
            action='store_true',
            help=_('Cause a running calibre instance, if any, to be'
                ' shutdown. Note that if there are running jobs, they '
                'will be silently aborted, so use with care.'))
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 4
0
def option_parser():
    from calibre.gui2.main_window import option_parser
    parser = option_parser(_('''\
%prog [options] file

View an e-book.
'''))
    a = parser.add_option
    a('--raise-window', default=False, action='store_true',
        help=_('If specified, the E-book viewer window will try to come to the '
               'front when started.'))
    a('--full-screen', '--fullscreen', '-f', default=False, action='store_true',
        help=_('If specified, the E-book viewer window will try to open '
               'full screen when started.'))
    a('--force-reload', default=False, action='store_true',
        help=_('Force reload of all opened books'))
    a('--open-at', default=None, help=_(
        'The position at which to open the specified book. The position is '
        'a location or position you can get by using the Go to->Location action in the viewer controls. '
        'Alternately, you can use the form toc:something and it will open '
        'at the location of the first Table of Contents entry that contains '
        'the string "something". The form toc-href:something will match the '
        'href (internal link destination) of toc nodes. The matching is exact, '
        'If you want to match a substring, use the form toc-href-contains:something. '
        'The form ref:something will use Reference mode references.'))
    a('--continue', default=False, action='store_true', dest='continue_reading',
        help=_('Continue reading the last opened book'))

    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 5
0
def option_parser():
    parser =  OptionParser('''\
%prog [opts] [path_to_ebook]

Launch the calibre tweak book tool.
''')
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 6
0
def option_parser():
    parser = OptionParser('''\
%prog [opts] [path_to_ebook]

Launch the calibre tweak book tool.
''')
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 7
0
def option_parser():
    parser =  OptionParser(_('''\
%prog [opts] [path_to_ebook] [name_of_file_inside_book ...]

Launch the calibre edit book tool. You can optionally also specify the names of
files inside the book which will be opened for editing automatically.
'''))
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 8
0
def option_parser():
    c = config()
    parser = c.option_parser(usage=_('''\
%prog [options] file

View an ebook.
'''))
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 9
0
def option_parser():
    parser =  OptionParser(_('''\
%prog [opts] [path_to_ebook] [name_of_file_inside_book ...]

Launch the calibre edit book tool. You can optionally also specify the names of
files inside the book which will be opened for editing automatically.
'''))
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 10
0
def option_parser():
    parser =  OptionParser(_('''\
%prog [opts] [path_to_ebook]

Launch the calibre edit book tool.
'''))
    setup_gui_option_parser(parser)
    parser.add_option('--edit-file', help=_(
        'Edit the named file inside the book'))
    return parser
Ejemplo n.º 11
0
def option_parser():
    parser = OptionParser(
        _('''\
%prog [opts] [path_to_ebook] [name_of_file_inside_book ...]

Launch the calibre Edit book tool. You can optionally also specify the names of
files inside the book which will be opened for editing automatically.
'''))
    setup_gui_option_parser(parser)
    parser.add_option(
        '--select-text',
        default=None,
        help=_('The text to select in the book when it is opened for editing'))
    return parser
Ejemplo n.º 12
0
def option_parser():
    parser = _option_parser(
        _(
            """\
%prog [opts] [path_to_ebook]

Launch the main calibre Graphical User Interface and optionally add the ebook at
path_to_ebook to the database.
"""
        )
    )
    parser.add_option(
        "--with-library", default=None, action="store", help=_("Use the library located at the specified path.")
    )
    parser.add_option("--start-in-tray", default=False, action="store_true", help=_("Start minimized to system tray."))
    parser.add_option(
        "-v", "--verbose", default=0, action="count", help=_("Ignored, do not use. Present only for legacy reasons")
    )
    parser.add_option("--no-update-check", default=False, action="store_true", help=_("Do not check for updates"))
    parser.add_option(
        "--ignore-plugins",
        default=False,
        action="store_true",
        help=_("Ignore custom plugins, useful if you installed a plugin" " that is preventing calibre from starting"),
    )
    parser.add_option(
        "-s",
        "--shutdown-running-calibre",
        default=False,
        action="store_true",
        help=_(
            "Cause a running calibre instance, if any, to be"
            " shutdown. Note that if there are running jobs, they "
            "will be silently aborted, so use with care."
        ),
    )
    setup_gui_option_parser(parser)
    return parser
Ejemplo n.º 13
0
def option_parser():
    from calibre.gui2.main_window import option_parser
    parser = option_parser(_('''\
%prog [options] file

View an e-book.
'''))
    a = parser.add_option
    a('--raise-window',
      default=False,
      action='store_true',
      help=_('If specified, viewer window will try to come to the '
             'front when started.'))
    a('--full-screen',
      '--fullscreen',
      '-f',
      default=False,
      action='store_true',
      help=_('If specified, viewer window will try to open '
             'full screen when started.'))
    a('--open-at',
      default=None,
      help=_(
          'The position at which to open the specified book. The position is '
          'a location you can get by using the Goto action in the viewer controls. '
          'Alternately, you can use the form toc:something and it will open '
          'at the location of the first Table of Contents entry that contains '
          'the string "something".'))
    a('--continue',
      default=False,
      action='store_true',
      dest='continue_reading',
      help=_('Continue reading at the previously opened book'))

    setup_gui_option_parser(parser)
    return parser