mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-24 14:54:37 +01:00
Better upload performance and UI for upload manual and to sourceforge
This commit is contained in:
parent
65bc2e13fe
commit
0842a7ba2d
2 changed files with 373 additions and 327 deletions
|
|
@ -198,9 +198,8 @@ def encode_upload_request(self, fields, file_path):
|
|||
|
||||
# Now add the file itself
|
||||
file_name = os.path.basename(file_path)
|
||||
f = open(file_path, 'rb')
|
||||
file_content = f.read()
|
||||
f.close()
|
||||
with open(file_path, 'rb') as f:
|
||||
file_content = f.read()
|
||||
|
||||
body.extend(
|
||||
['--' + BOUNDARY,
|
||||
|
|
@ -265,7 +264,7 @@ def upload_installers(self):
|
|||
if not os.path.exists(x): continue
|
||||
start = time.time()
|
||||
self.info('Uploading', x)
|
||||
check_call(['rsync', '-v', '-e', 'ssh -x', x,
|
||||
check_call(['rsync', '-z', '--progress', '-e', 'ssh -x', x,
|
||||
'%s,%s@frs.sourceforge.net:%s'%(self.USERNAME, self.PROJECT,
|
||||
self.rdir+'/')])
|
||||
print 'Uploaded in', int(time.time() - start), 'seconds'
|
||||
|
|
@ -376,7 +375,8 @@ def run(self, opts):
|
|||
for x in glob.glob(self.j(path, '*')):
|
||||
self.build_plugin_example(x)
|
||||
|
||||
check_call(' '.join(['scp', '-r', 'src/calibre/manual/.build/html/*',
|
||||
check_call(' '.join(['rsync', '-z', '-r', '--progress',
|
||||
'src/calibre/manual/.build/html/',
|
||||
'bugs:%s'%USER_MANUAL]), shell=True)
|
||||
# }}}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue