From d2292a759d5718ea6cb82360d7e3026652020f18 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 24 Jun 2013 18:04:07 +0530 Subject: [PATCH 1/3] Upload installers to downloadbestsoftware.com as well --- setup/hosting.py | 26 ++++++++++++++++++++++++++ setup/upload.py | 6 ++++++ 2 files changed, 32 insertions(+) diff --git a/setup/hosting.py b/setup/hosting.py index 9853f181a4..76ab3992a0 100644 --- a/setup/hosting.py +++ b/setup/hosting.py @@ -402,6 +402,29 @@ def upload_to_servers(files, version): # {{{ print ('Uploaded in', int(time.time() - start), 'seconds\n\n') # }}} +def upload_to_dbs(files, version): # {{{ + print('Uploading to downloadbestsoftware.com') + server = 'www.downloadbestsoft-mirror1.com' + rdir = 'release/' + check_call(['ssh', 'kovid@%s' % server, 'rm -f release/*']) + for x in files: + start = time.time() + print ('Uploading', x) + for i in range(5): + try: + check_call(['rsync', '-h', '-z', '--progress', '-e', 'ssh -x', x, + 'kovid@%s:%s'%(server, rdir)]) + except KeyboardInterrupt: + raise SystemExit(1) + except: + print ('\nUpload failed, trying again in 30 seconds') + time.sleep(30) + else: + break + print ('Uploaded in', int(time.time() - start), 'seconds\n\n') + check_call(['ssh', 'kovid@%s' % server, '/home/kovid/uploadFiles']) +# }}} + # CLI {{{ def cli_parser(): epilog='Copyright Kovid Goyal 2012' @@ -434,6 +457,7 @@ def cli_parser(): epilog=epilog) cron = subparsers.add_parser('cron', help='Call script from cron') subparsers.add_parser('calibre', help='Upload to calibre file servers') + subparsers.add_parser('dbs', help='Upload to downloadbestsoftware.com') a = gc.add_argument @@ -498,6 +522,8 @@ def main(args=None): login_to_google(args.username, args.password) elif args.service == 'calibre': upload_to_servers(ofiles, args.version) + elif args.service == 'dbs': + upload_to_dbs(ofiles, args.version) if __name__ == '__main__': main() diff --git a/setup/upload.py b/setup/upload.py index 784c0cf9f8..8a4e467dd0 100644 --- a/setup/upload.py +++ b/setup/upload.py @@ -114,6 +114,9 @@ def sf_cmdline(ver, sdata): def calibre_cmdline(ver): return [__appname__, ver, 'fmap', 'calibre'] +def dbs_cmdline(ver): + return [__appname__, ver, 'fmap', 'dbs'] + def run_remote_upload(args): print 'Running remotely:', ' '.join(args) subprocess.check_call(['ssh', '-x', '%s@%s'%(STAGING_USER, STAGING_HOST), @@ -140,6 +143,7 @@ class UploadInstallers(Command): # {{{ self.upload_to_staging(tdir, backup, files) self.upload_to_sourceforge() self.upload_to_calibre() + self.upload_to_dbs() # self.upload_to_google(opts.replace) finally: shutil.rmtree(tdir, ignore_errors=True) @@ -184,6 +188,8 @@ class UploadInstallers(Command): # {{{ def upload_to_calibre(self): run_remote_upload(calibre_cmdline(__version__)) + def upload_to_dbs(self): + run_remote_upload(dbs_cmdline(__version__)) # }}} class UploadUserManual(Command): # {{{ From 7089c66a986ec8741216449d76d6fd79e4afdc9d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 24 Jun 2013 18:45:05 +0530 Subject: [PATCH 2/3] LRF Output: Fix " entities in attribute values causing problems --- src/calibre/ebooks/lrf/html/convert_from.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/lrf/html/convert_from.py b/src/calibre/ebooks/lrf/html/convert_from.py index c755cabd92..2b9a3617dc 100644 --- a/src/calibre/ebooks/lrf/html/convert_from.py +++ b/src/calibre/ebooks/lrf/html/convert_from.py @@ -104,7 +104,7 @@ class HTMLConverter(object): # Replace entities (re.compile(ur'&(\S+?);'), partial(entity_to_unicode, - exceptions=['lt', 'gt', 'amp'])), + exceptions=['lt', 'gt', 'amp', 'quot'])), # Remove comments from within style tags as they can mess up BeatifulSoup (re.compile(r'()', re.IGNORECASE|re.DOTALL), strip_style_comments), From 5b07091d5939c0f25e3122d66817ed86f22968e1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 25 Jun 2013 09:12:04 +0530 Subject: [PATCH 3/3] Make the manual self contained --- manual/resources/simple_donate_button.gif | Bin 0 -> 2132 bytes manual/templates/layout.html | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 manual/resources/simple_donate_button.gif diff --git a/manual/resources/simple_donate_button.gif b/manual/resources/simple_donate_button.gif new file mode 100644 index 0000000000000000000000000000000000000000..42dd2c3c88f13d0a8eebeecfff7088effdcf8566 GIT binary patch literal 2132 zcmb`G`#;kQ1AxD~glRIYNRqj2<~D{D)!c7WG$hAm8*`@_38`j7t~K}N3}Zx5jU^@J z)?#LbbO@cdP;YhW{m_+9y}s``|HJ!yo}ZuJ9xoqH#{)D5pbPu}fOCvP4utbgc4vK$ zq_`hs`5Z|nIc9~EqmoYer-qSP5gyD)zgS98LP$_@*l`BsWMXJkCe1TD+T%i^+i99# zR*YX(bTGv;Cd4N;%rA!GnGot5Pj+D)_qh;3$)z5nMpLM?kaLW%vx$+}xv8g4(a)sP zax)mG&m^*PlQPm7x!DQXrA+I(Y!ksb)5=Wq+8n&#f;l_RiJRnHa_Z2f47*a+!OGKi zwP%T(WY^+UuTqv*L1s#6PEy_}7B?fk^laKd4OGHY8>rrK?IOB8e@|DLp12IvU9Q_( zg_cz5J*?l;lxHqr6R#E+wHISM%M3*Y=GThx;&KB?rNKZA=HV60a2+5O0P-g2kN_oZ z*bC-C!7>_BIAq(t!BU>o^He6W1p72$K7n>4VL*K~d7( z7S`j=W24uDWj6yyL{X#HPs(pZD!M6?lCYWHpg-<~EZz@!c01z5ov_(^;Y;_!RtCd{ zMf9<2(ekdC@f*o=14(1ISfIicoc4P=68u3L{7DwFJR0^%9{FwZ_{P)Y>yx3so>9I{ zo&5Pc9Gs7MIZS&kjsEup(Ao<`!W@4QjW)#SeaiYT5)Zy z%N=aWog7LIIhMO0F7!B3|MdQO0#MlkrV)DHVn1zb6)k-D27@+IxWgzX4_DFh=%TiICT6@_G-Q?Wy-3fe zr&U&kqg)S{^%ysl>mMk5?mn)7o0r^VreZMqI0>n!MZPH9xxf1u!_9;EE9v!8Sz1U8*lGxF@r!iSDh&A`=! zA1TpyowwHS_>&#GUk|3jNa8%7NXRWAOUd})v z%!i#}<*NLF9OpYHoRiAQ>C_CjpvYO`GWl z^MV|;V?v;F0MlbUgv#^STc}4Lw?8>6@X|l?Zf$70wm0*!vej(z_%2;4h7AR9Boc~< zWU~Ra@H{CD2@qgvNvmnzQdVxDjr3wDPf0h&CbM8r-O< z5u_$u!yT{`tbg4ZBMkJ?Pv391U+NUI=8jg$O}ZC*_YhlY4h02_ z2}*X37~o_U2~Hh?o84|k6?O2nrvhy}aE2NMMI0E83b*YVMjnVKsXY!T#0JpRGD&d5 zWj4%iei&stz|}M+L2$g+$gMzcDDo3PbQ)+z)XNQ2>Iiw;bRcShLf5qqgl#&r1`u=y z2|dZ=+D=g++xae+K6M^YK--f`G$S2iu9xWA{e&%MnuVbeEc=5t-zs<(CwLLR#73x7O_VN>Hn zX6O>H$lXotqRjjgZHe_yKfW=XwdGkEx75EvwmXjbJYm&qT`7KL>b1&zlG*>IVJ-iS zUcM{J`W>cm!(lSc`J3=)PRr=_bQPRF6d#bcOcN?wzSC3cpDM7mYgSLexgrv$@(Pm;G$y93r-%lC)Bga!y^>S_ literal 0 HcmV?d00001 diff --git a/manual/templates/layout.html b/manual/templates/layout.html index b8389b0ac9..188e829469 100644 --- a/manual/templates/layout.html +++ b/manual/templates/layout.html @@ -62,7 +62,7 @@
- +