mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
27b57c73b3
commit
3f57f71c5a
@ -106,14 +106,18 @@ class Manual(Command):
|
|||||||
self.info('Building manual for %d languages' % len(jobs))
|
self.info('Building manual for %d languages' % len(jobs))
|
||||||
if not parallel_build(jobs, self.info):
|
if not parallel_build(jobs, self.info):
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
os.chdir(self.j(tdir, 'en', 'html'))
|
cwd = os.getcwdu()
|
||||||
for x in os.listdir(tdir):
|
try:
|
||||||
if x != 'en':
|
os.chdir(self.j(tdir, 'en', 'html'))
|
||||||
shutil.copytree(self.j(tdir, x, 'html'), x)
|
for x in os.listdir(tdir):
|
||||||
self.replace_with_symlinks(x)
|
if x != 'en':
|
||||||
else:
|
shutil.copytree(self.j(tdir, x, 'html'), x)
|
||||||
os.symlink('..', 'en')
|
self.replace_with_symlinks(x)
|
||||||
self.info('Built manual for %d languages in %s minutes' % (len(jobs), int((time.time() - st)/60.)))
|
else:
|
||||||
|
os.symlink('..', 'en')
|
||||||
|
self.info('Built manual for %d languages in %s minutes' % (len(jobs), int((time.time() - st)/60.)))
|
||||||
|
finally:
|
||||||
|
os.chdir(cwd)
|
||||||
|
|
||||||
def replace_with_symlinks(self, lang_dir):
|
def replace_with_symlinks(self, lang_dir):
|
||||||
' Replace all identical files with symlinks to save disk space/upload bandwidth '
|
' Replace all identical files with symlinks to save disk space/upload bandwidth '
|
||||||
|
@ -250,9 +250,9 @@ class UploadDemo(Command): # {{{
|
|||||||
'''--mono-family "/usr/share/fonts/corefonts, Andale Mono" '''
|
'''--mono-family "/usr/share/fonts/corefonts, Andale Mono" '''
|
||||||
''''''%self.j(self.SRC, HTML2LRF), shell=True)
|
''''''%self.j(self.SRC, HTML2LRF), shell=True)
|
||||||
|
|
||||||
|
lrf = self.j(self.SRC, 'calibre', 'ebooks', 'lrf', 'html', 'demo')
|
||||||
check_call(
|
check_call(
|
||||||
'cd src/calibre/ebooks/lrf/html/demo/ && '
|
'cd %s && zip -j /tmp/html-demo.zip * /tmp/html2lrf.lrf' % lrf, shell=True)
|
||||||
'zip -j /tmp/html-demo.zip * /tmp/html2lrf.lrf', shell=True)
|
|
||||||
|
|
||||||
check_call('scp /tmp/html-demo.zip divok:%s/'%(DOWNLOADS,), shell=True)
|
check_call('scp /tmp/html-demo.zip divok:%s/'%(DOWNLOADS,), shell=True)
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user