mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-04 03:27:00 -05:00 
			
		
		
		
	version 0.4.39
This commit is contained in:
		
							parent
							
								
									14c8f810dc
								
							
						
					
					
						commit
						ee60d12fc8
					
				@ -13,7 +13,7 @@
 | 
				
			|||||||
##    with this program; if not, write to the Free Software Foundation, Inc.,
 | 
					##    with this program; if not, write to the Free Software Foundation, Inc.,
 | 
				
			||||||
##    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
					##    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
				
			||||||
''' E-book management software'''
 | 
					''' E-book management software'''
 | 
				
			||||||
__version__   = "0.4.38"
 | 
					__version__   = "0.4.39"
 | 
				
			||||||
__docformat__ = "epytext"
 | 
					__docformat__ = "epytext"
 | 
				
			||||||
__author__    = "Kovid Goyal <kovid@kovidgoyal.net>"
 | 
					__author__    = "Kovid Goyal <kovid@kovidgoyal.net>"
 | 
				
			||||||
__appname__   = 'libprs500'
 | 
					__appname__   = 'libprs500'
 | 
				
			||||||
 | 
				
			|||||||
@ -105,7 +105,7 @@
 | 
				
			|||||||
         <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
 | 
					         <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
 | 
				
			||||||
p, li { white-space: pre-wrap; }
 | 
					p, li { white-space: pre-wrap; }
 | 
				
			||||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
 | 
					</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
 | 
				
			||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For help visit <a href="https://libprs500.kovidgoyal.net/wiki/WikiStart#Usage"><span style=" text-decoration: underline; color:#0000ff;">libprs500.kovidgoyal.net</span></a><br /><br /><span style=" font-weight:600;">libprs500</span>: %1 by <span style=" font-weight:600;">Kovid Goyal</span> %2<br />%3</p></body></html></string>
 | 
					<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For help visit <a href="http://libprs500.kovidgoyal.net/user_manual"><span style=" text-decoration: underline; color:#0000ff;">libprs500.kovidgoyal.net</span></a><br /><br /><span style=" font-weight:600;">libprs500</span>: %1 by <span style=" font-weight:600;">Kovid Goyal</span> %2<br />%3</p></body></html></string>
 | 
				
			||||||
        </property>
 | 
					        </property>
 | 
				
			||||||
        <property name="textFormat" >
 | 
					        <property name="textFormat" >
 | 
				
			||||||
         <enum>Qt::RichText</enum>
 | 
					         <enum>Qt::RichText</enum>
 | 
				
			||||||
 | 
				
			|||||||
@ -10,13 +10,14 @@
 | 
				
			|||||||
        <filterAttribute>libprs500</filterAttribute>
 | 
					        <filterAttribute>libprs500</filterAttribute>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <toc>
 | 
					        <toc>
 | 
				
			||||||
 | 
					            <section ref="start.html" title="Start" />
 | 
				
			||||||
            <section ref="gui.html" title="Graphical User Interface">
 | 
					            <section ref="gui.html" title="Graphical User Interface">
 | 
				
			||||||
                <section ref="#actions" title="Actions" />
 | 
					                <section ref="gui.html#actions" title="Actions" />
 | 
				
			||||||
                <section ref="#catalogs" title="Catalogs" />
 | 
					                <section ref="gui.html#catalogs" title="Catalogs" />
 | 
				
			||||||
                <section ref="#search_sort" title="Search & Sort" />
 | 
					                <section ref="gui.html#search_sort" title="Search & Sort" />
 | 
				
			||||||
                <section ref="#configuration" title="Configuration" />
 | 
					                <section ref="gui.html#configuration" title="Configuration" />
 | 
				
			||||||
                <section ref="#book_details" title="Book Details" />
 | 
					                <section ref="gui.html#book_details" title="Book Details" />
 | 
				
			||||||
                <section ref="#jobs" title="Jobs" />
 | 
					                <section ref="gui.html#jobs" title="Jobs" />
 | 
				
			||||||
            </section>
 | 
					            </section>
 | 
				
			||||||
            <section ref="cli-index.html" title="Command Line Interface">
 | 
					            <section ref="cli-index.html" title="Command Line Interface">
 | 
				
			||||||
                <section ref="cli-isbndb.html" title="isbndb" />
 | 
					                <section ref="cli-isbndb.html" title="isbndb" />
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,4 @@
 | 
				
			|||||||
#!/usr/bin/env  python
 | 
					#!/usr/bin/env  python
 | 
				
			||||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
 | 
					 | 
				
			||||||
##    Copyright (C) 2008 Kovid Goyal kovid@kovidgoyal.net
 | 
					##    Copyright (C) 2008 Kovid Goyal kovid@kovidgoyal.net
 | 
				
			||||||
##    This program is free software; you can redistribute it and/or modify
 | 
					##    This program is free software; you can redistribute it and/or modify
 | 
				
			||||||
##    it under the terms of the GNU General Public License as published by
 | 
					##    it under the terms of the GNU General Public License as published by
 | 
				
			||||||
@ -92,6 +91,9 @@ def compile_help():
 | 
				
			|||||||
    QCG = os.path.join(QTBIN, 'qcollectiongenerator')
 | 
					    QCG = os.path.join(QTBIN, 'qcollectiongenerator')
 | 
				
			||||||
    QTA = os.path.join(QTBIN, 'assistant')
 | 
					    QTA = os.path.join(QTBIN, 'assistant')
 | 
				
			||||||
    os.environ['LD_LIBRARY_PATH'] = QTLIB
 | 
					    os.environ['LD_LIBRARY_PATH'] = QTLIB
 | 
				
			||||||
 | 
					    for f in ('libprs500.qch', 'libprs500.qhc'):
 | 
				
			||||||
 | 
					        if os.path.exists(f):
 | 
				
			||||||
 | 
					            os.unlink(f)
 | 
				
			||||||
    subprocess.check_call((QCG, 'libprs500.qhcp'))
 | 
					    subprocess.check_call((QCG, 'libprs500.qhcp'))
 | 
				
			||||||
    subprocess.call((QTA, '-collectionFile', 'libprs500.qhc'))
 | 
					    subprocess.call((QTA, '-collectionFile', 'libprs500.qhc'))
 | 
				
			||||||
     
 | 
					     
 | 
				
			||||||
@ -148,7 +150,7 @@ def populate_cli(src):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def populate_toc(src):
 | 
					def populate_toc(src):
 | 
				
			||||||
    soup = BeautifulSoup(open('start.html', 'rb').read().decode('UTF-8'))
 | 
					    soup = BeautifulSoup(open('start.html', 'rb').read().decode('UTF-8'))
 | 
				
			||||||
    sections = []
 | 
					    sections = [('start.html', 'Start')]
 | 
				
			||||||
    for a in soup.find(id='toc').findAll('a'):
 | 
					    for a in soup.find(id='toc').findAll('a'):
 | 
				
			||||||
        sections.append((a['href'], a.string))
 | 
					        sections.append((a['href'], a.string))
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
@ -158,7 +160,7 @@ def populate_gui(src):
 | 
				
			|||||||
    soup = BeautifulSoup(open('gui.html', 'rb').read().decode('UTF-8'))
 | 
					    soup = BeautifulSoup(open('gui.html', 'rb').read().decode('UTF-8'))
 | 
				
			||||||
    sections = []
 | 
					    sections = []
 | 
				
			||||||
    for a in soup.find(id='toc').findAll('a'):
 | 
					    for a in soup.find(id='toc').findAll('a'):
 | 
				
			||||||
        sections.append((a['href'], a.string))
 | 
					        sections.append(('gui.html'+a['href'], a.string))
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
    return populate_section('gui.html', sections, src)
 | 
					    return populate_section('gui.html', sections, src)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -175,6 +177,7 @@ def qhp():
 | 
				
			|||||||
    root.find('filterSection').find('toc').tail = '\n\n%8s'%' '
 | 
					    root.find('filterSection').find('toc').tail = '\n\n%8s'%' '
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    open('libprs500.qhp', 'wb').write(tostring(root, encoding='UTF-8'))
 | 
					    open('libprs500.qhp', 'wb').write(tostring(root, encoding='UTF-8'))
 | 
				
			||||||
 | 
					    compile_help()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def generate_cli_docs():
 | 
					def generate_cli_docs():
 | 
				
			||||||
    documented_cmds = []
 | 
					    documented_cmds = []
 | 
				
			||||||
@ -250,14 +253,8 @@ def generate_cli_docs():
 | 
				
			|||||||
    open('cli-index.html', 'wb').write(template.replace('%body', body))
 | 
					    open('cli-index.html', 'wb').write(template.replace('%body', body))
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					def html(src='libprs500.qhp'):
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def create_html_interface(src='libprs500.qhp'):
 | 
					 | 
				
			||||||
    root = parse(src).getroot()
 | 
					    root = parse(src).getroot()
 | 
				
			||||||
    print  
 | 
					 | 
				
			||||||
    toc = root.find('filterSection').find('toc')
 | 
					    toc = root.find('filterSection').find('toc')
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    def is_leaf(sec):
 | 
					    def is_leaf(sec):
 | 
				
			||||||
@ -293,8 +290,7 @@ def all(opts):
 | 
				
			|||||||
    clean()
 | 
					    clean()
 | 
				
			||||||
    generate_cli_docs()
 | 
					    generate_cli_docs()
 | 
				
			||||||
    qhp()
 | 
					    qhp()
 | 
				
			||||||
    create_html_interface()
 | 
					    html()
 | 
				
			||||||
    compile_help()
 | 
					 | 
				
			||||||
    if opts.validate:
 | 
					    if opts.validate:
 | 
				
			||||||
        validate()
 | 
					        validate()
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@ -321,7 +317,8 @@ if __name__ == '__main__':
 | 
				
			|||||||
        if func is None:
 | 
					        if func is None:
 | 
				
			||||||
            print >>sys.stderr, 'Unknown target', sys.argv(1)
 | 
					            print >>sys.stderr, 'Unknown target', sys.argv(1)
 | 
				
			||||||
            sys.exit(1)
 | 
					            sys.exit(1)
 | 
				
			||||||
        sys.exit(func(*fargs))
 | 
					 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        parser.print_help()
 | 
					        parser.print_help()
 | 
				
			||||||
        sys.exit(1)
 | 
					        sys.exit(1)
 | 
				
			||||||
 | 
					    sys.exit(func(*fargs))
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user