Giter Site home page Giter Site logo

staticwebsync's People

Contributors

jjc1138 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ccounterman

staticwebsync's Issues

Unwrap long lines

They're current wrapped to 80 columns, which seems old-fashioned now.

Division by Zero exception

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
load_entry_point('staticwebsync==1.0.0', 'console_scripts', 'sws')()
File "
/.virtualenvs/sws/lib/python2.7/site-packages/staticwebsync/sws.py", line 103, in main
staticwebsync.setup(args)
File "/.virtualenvs/sws/lib/python2.7/site-packages/staticwebsync/init.py", line 273, in setup
upload(filename)
File "
/.virtualenvs/sws/lib/python2.7/site-packages/staticwebsync/init.py", line 269, in upload
num_cb=progress_callback_divisions)
File "/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/key.py", line 790, in set_contents_from_file
self.send_file(fp, headers, cb, num_cb, query_args)
File "
/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/key.py", line 583, in send_file
query_args=query_args)
File "/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/connection.py", line 429, in make_request
override_num_retries=override_num_retries)
File "
/.virtualenvs/sws/lib/python2.7/site-packages/boto/connection.py", line 796, in make_request
return self._mexe(http_request, sender, override_num_retries)
File "/.virtualenvs/sws/lib/python2.7/site-packages/boto/connection.py", line 717, in _mexe
request.body, request.headers)
File "
/.virtualenvs/sws/lib/python2.7/site-packages/boto/s3/key.py", line 509, in sender
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

Add tests

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.

Colorize console output

Different colors for:

  • messages about what is about to happen
  • messages saying that we checked a thing and it was fine (file not changed etc.)
  • messages saying we changed something (uploaded a file, changed a setting etc.)
  • error messages

Update docs

  • should the OS X instructions just say make a symlink rather than the wrapper script we're suggesting at the moment?
  • remove the bit about needing a prerelease version of boto
  • fix both bits about not being able to use a naked domain (and explain how to do it with Route 53)
  • format README with Markdown and just link to the license(s) instead of including the full text

Port to Python 3

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.

Support S3 Transfer Acceleration

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 to set a Route 53 alias for the site

An option called something like --set-route53-entry should:

  • look for a Route 53 zone matching the domain (look for the domain itself, and for one level up the hierarchy?)
  • add a Route 53 ALIAS entry for the CloudFront distribution or S3 website endpoint
  • issue a warning and leave alone if there is already a conflicting entry (i.e. different to what we would have created); have an --overwrite-route53-entry to override

Issues:

  • should it be enabled by default? (and therefore the option would be --no-route53); if it is enabled by default then it should continue with a log message if no zone is found

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.