View Full Version : sync 1.0
Esherido
August 16th, 2008, 11:26 AM
Well, I just finished my most recent project. A simple tool that allows you to synchronize your remote application with your local one. Fairly handy for quickly updating design changes or minute hot-fixes.
Read my post to find out more (http://esherido.com/post/sync-one) or download the source code (http://esherido.com/content/sync-source.zip).
Jeff Wheeler
August 16th, 2008, 11:59 AM
Don't alias to the pyc file; Python will use it if it's already been created regardless. Aliases are a bad solution for this anyways; use an executable symlink in /usr/local/bin/ or somewhere to the Python file, which should start with a line "#!/usr/bin/env python".
It's a good idea, but why use FTP? rsync would have been a much better solution for this.
Esherido
August 16th, 2008, 12:43 PM
^ Thanks for the tips about using aliases, but I just wanted a quick-and-dirty solution. :D The reason I used FTP was because pretty much ever server has it and it's very simple. I would much rather prefer to enter some simple credentials for FTP and be up and running than check if my server supports rsync, check if my local machine has rsync, do a bunch of configuration and jumping through loops to get it to work. Also, it's super-easy to specify what files to ignore without paging through documentation and man-pages to see how it's done.
Jeff Wheeler
August 16th, 2008, 07:25 PM
Pretty much every server has rsync also, and it too is very simple. It's also not hugely insecure and poorly designed (http://wooledge.org:8000/FtpMustDie) (often it uses SSH behind the scenes). Making sure you have rsync installed is no more difficult than making sure you have sync installed, and it's much easier to find and install if you don't have it already.
Excluding files is as easy as --exclude, or if you want one .ignore file like your setup --exclude-file=.ignore.
Aliases are bad, and aliases to a pyc file are very bad; don't ever do that. It's not acceptable, and aliasing to the py file does the same thing. Don't ever distribute pyc files. (They're in your zip, too, as is a random __MACOS directory).
Esherido
August 16th, 2008, 07:43 PM
(They're in your zip, too, as is a random __MACOS directory).Yeah, I didn't bother cleaning that up, I was in a hurry to get other things done besides writing a little blog post.
Pasquale
August 17th, 2008, 05:20 AM
you guys are such geeks
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.