mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
This commit is contained in:
parent
19a9d901ef
commit
862f75bf2c
@ -7,7 +7,7 @@ url: http://libprs500.kovidgoyal.net
|
||||
# The list of modules to document. Modules can be named using
|
||||
# dotted names, module filenames, or package directory names.
|
||||
# This option may be repeated.
|
||||
modules: src/libprs500/*.py, struct
|
||||
modules: libprs500.devices, libprs500.ebooks.lrf.web.profiles
|
||||
|
||||
output: pdf
|
||||
target: docs/pdf
|
||||
|
@ -7,7 +7,7 @@ url: http://libprs500.kovidgoyal.net
|
||||
# The list of modules to document. Modules can be named using
|
||||
# dotted names, module filenames, or package directory names.
|
||||
# This option may be repeated.
|
||||
modules: src/libprs500/*.py, struct
|
||||
modules: libprs500.devices, libprs500.ebooks.lrf.web.profiles
|
||||
|
||||
# Write html output to the directory "docs"
|
||||
output: html
|
||||
|
@ -7,7 +7,7 @@
|
||||
<meta name="author" content="Kovid Goyal" />
|
||||
<meta name="copyright" content="© 2008 Kovid Goyal" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title></title>
|
||||
<title>Frequently Asked Questions</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles/common.css" />
|
||||
<style type="text/css">
|
||||
h2 {
|
||||
|
@ -179,7 +179,7 @@ def qhp():
|
||||
open('libprs500.qhp', 'wb').write(tostring(root, encoding='UTF-8'))
|
||||
compile_help()
|
||||
|
||||
def generate_cli_docs():
|
||||
def cli_docs():
|
||||
documented_cmds = []
|
||||
undocumented_cmds = []
|
||||
|
||||
@ -201,7 +201,8 @@ def generate_cli_docs():
|
||||
|
||||
for cmd, parser in documented_cmds:
|
||||
output = open('cli-%s.html'%cmd, 'wb')
|
||||
template = open('templates/basic.html', 'rb').read()
|
||||
template = open('templates/basic.html', 'rb').read().decode('utf-8')
|
||||
template = re.sub('<title>\s*</title>', '<title>%s</title>'%cmd, template)
|
||||
usage = [sanitize_text(i) for i in parser.usage.replace('%prog', cmd).splitlines(True) if i]
|
||||
usage[0] = '<pre class="runcmd">%s</pre>'%usage[0]
|
||||
usage[1:] = [i.replace(cmd, '<span class="cmd">%s</span>'%cmd) for i in usage[1:]]
|
||||
@ -250,6 +251,9 @@ def generate_cli_docs():
|
||||
body += '<h2 class="sectionHeading">Documented commands</h2>\n'+dc_html
|
||||
body += '<h2 class="sectionHeading">Undocumented commands</h2>\n'+uc_html
|
||||
body += '<p>You can see usage for undocumented commands by executing them without arguments in a terminal</p>'
|
||||
|
||||
template = open('templates/basic.html', 'rb').read().decode('utf-8')
|
||||
template = re.sub('<title>\s*</title>', '<title>%s</title>'%'Command Line Interface', template)
|
||||
open('cli-index.html', 'wb').write(template.replace('%body', body))
|
||||
|
||||
|
||||
@ -288,7 +292,7 @@ def html(src='libprs500.qhp'):
|
||||
|
||||
def all(opts):
|
||||
clean()
|
||||
generate_cli_docs()
|
||||
cli_docs()
|
||||
qhp()
|
||||
html()
|
||||
if opts.validate:
|
||||
|
@ -55,6 +55,7 @@ def build_installer(installer, vm, timeout=25):
|
||||
minutes += 1
|
||||
print minutes,
|
||||
sys.stdout.flush()
|
||||
print
|
||||
if not os.path.exists(installer):
|
||||
raise Exception('Failed to build windows installer')
|
||||
finally:
|
||||
@ -115,7 +116,10 @@ def upload_user_manual():
|
||||
try:
|
||||
check_call('python make.py --validate')
|
||||
check_call('ssh castalia rm -rf %s/\\*'%USER_MANUAL)
|
||||
check_call('scp -r *.html styles images castalia:%s/'%USER_MANUAL)
|
||||
check_call('ssh castalia mkdir %(um)s/styles %(um)s/images'%dict(um=USER_MANUAL))
|
||||
check_call('scp *.html castalia:%s/'%USER_MANUAL)
|
||||
check_call('scp styles/* castalia:%s/styles/'%USER_MANUAL)
|
||||
check_call('scp images/* castalia:%s/images/'%USER_MANUAL)
|
||||
finally:
|
||||
os.chdir(cwd)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user