mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Skip PDF version of manual for Japanese
Getting a useable Japanese PDF out of Sphinx+LaTeX is a nightmare
This commit is contained in:
parent
5f8e533045
commit
46cc7dc6c2
@ -42,6 +42,8 @@ def build_manual(language, base):
|
|||||||
sb = partial(sphinx_build, language, base)
|
sb = partial(sphinx_build, language, base)
|
||||||
onlinedir = sb(t='online')
|
onlinedir = sb(t='online')
|
||||||
epubdir = sb('myepub', 'epub')
|
epubdir = sb('myepub', 'epub')
|
||||||
|
pdf_ok = language not in ('ja',)
|
||||||
|
if pdf_ok:
|
||||||
latexdir = sb('latex', 'latex')
|
latexdir = sb('latex', 'latex')
|
||||||
pwd = os.getcwd()
|
pwd = os.getcwd()
|
||||||
os.chdir(latexdir)
|
os.chdir(latexdir)
|
||||||
@ -61,10 +63,10 @@ def build_manual(language, base):
|
|||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
finally:
|
finally:
|
||||||
os.chdir(pwd)
|
os.chdir(pwd)
|
||||||
epub_dest = j(onlinedir, 'calibre.epub')
|
|
||||||
pdf_dest = j(onlinedir, 'calibre.pdf')
|
pdf_dest = j(onlinedir, 'calibre.pdf')
|
||||||
shutil.copyfile(j(epubdir, 'calibre.epub'), epub_dest)
|
|
||||||
shutil.copyfile(j(latexdir, 'calibre.pdf'), pdf_dest)
|
shutil.copyfile(j(latexdir, 'calibre.pdf'), pdf_dest)
|
||||||
|
epub_dest = j(onlinedir, 'calibre.epub')
|
||||||
|
shutil.copyfile(j(epubdir, 'calibre.epub'), epub_dest)
|
||||||
epub_to_azw3(epub_dest)
|
epub_to_azw3(epub_dest)
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ class Manual(Command):
|
|||||||
languages = opts.language or list(
|
languages = opts.language or list(
|
||||||
json.load(open(self.j(base, 'locale', 'completed.json'), 'rb'))
|
json.load(open(self.j(base, 'locale', 'completed.json'), 'rb'))
|
||||||
)
|
)
|
||||||
languages = ['en'] + list(set(languages) - {'en', 'ja'})
|
languages = ['en'] + list(set(languages) - {'en'})
|
||||||
os.environ['ALL_USER_MANUAL_LANGUAGES'] = ' '.join(languages)
|
os.environ['ALL_USER_MANUAL_LANGUAGES'] = ' '.join(languages)
|
||||||
for language in languages:
|
for language in languages:
|
||||||
jobs.append(create_job([
|
jobs.append(create_job([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user