jjc1138 / staticwebsync Goto Github PK
View Code? Open in Web Editor NEWA command-line tool for automating the fiddly aspects of hosting your static web site on Amazon S3 or CloudFront
A command-line tool for automating the fiddly aspects of hosting your static web site on Amazon S3 or CloudFront
They're current wrapped to 80 columns, which seems old-fashioned now.
I can't think of any reason not to?
I get the following traceback on first run. On the second run it works well. Maybe
because it's doing > 0. ;)
Traceback (most recent call last):
File "/.virtualenvs/sws/bin/sws", line 8, in /.virtualenvs/sws/lib/python2.7/site-packages/staticwebsync/sws.py", line 103, in main
load_entry_point('staticwebsync==1.0.0', 'console_scripts', 'sws')()
File "
staticwebsync.setup(args)
File "/.virtualenvs/sws/lib/python2.7/site-packages/staticwebsync/init.py", line 273, in setup/.virtualenvs/sws/lib/python2.7/site-packages/staticwebsync/init.py", line 269, in upload
upload(filename)
File "
num_cb=progress_callback_divisions)
File "/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/key.py", line 790, in set_contents_from_file/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/key.py", line 583, in send_file
self.send_file(fp, headers, cb, num_cb, query_args)
File "
query_args=query_args)
File "/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/connection.py", line 429, in make_request/.virtualenvs/sws/lib/python2.7/site-packages/boto/connection.py", line 796, in make_request
override_num_retries=override_num_retries)
File "
return self._mexe(http_request, sender, override_num_retries)
File "/.virtualenvs/sws/lib/python2.7/site-packages/boto/connection.py", line 717, in _mexe/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/key.py", line 509, in sender
request.body, request.headers)
File "
cb(total_bytes, self.size)
File "~/.virtualenvs/sws/lib/python2.7/site-packages/staticwebsync/sws.py", line 21, in call
progress = float(done) / doing
ZeroDivisionError: float division by zero
It should be doable to set up some tests. Perhaps have the test scripts create and populate some test folders with some randomly generated data, and then sync them and check the results by making regular client requests to the relevant end point.
Different colors for:
A nice thing about doing this is that it would make the output slightly easier to interpret when it's colorized (issue #7).
This would probably require also moving to boto3, and even if it's not strictly required, this would be a good opportunity to do that anyway.
keep a list of the objects which we have uploaded/checked and early continue the deletion-checking loop if the obj is in that list
I don't think we can support this right now because of the requirement that the bucket name not have any dots in it. Or we could use non-dotted bucket names, but only when using CF and it all gets a bit complex.
An option called something like --set-route53-entry should:
Issues:
I'm reluctant to do anything more elaborate like setting up the zone itself, because we can't reasonably do a comprehensive job of migrating the user to Route 53 and it would be fraught with difficulties like breaking the user's email or other sites.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.