I don't have the time to do it at the moment, but I'll work on it ASAP :) In particular:
On Wed, Jan 15, 2014 at 3:50 AM, Yan Zhu <[email protected]> wrote: > I'd suggest checking out Python's subprocess module; you can use > subprocess.call or subprocess.Popen to make simple shell commands > (like 'git diff') from within a Python script. As an extra > convenience, you might also want to automatically download the Alexa > Top 1M csv file from the canonical source so that people don't have to > look up the URL. The urllib module or just opening a wget subprocess > would work. > > I'll check out both of them! I thought about doing so, but because it was my first attempt, I wanted to keep it as simple as possible :) > For unzipping, python has a built-in zip module too. > Will do! > Also, you should probably close files after you open them once you're > done. :) > Whoops, didn't think about that (lol) I'll fix it > > PS: Do you use git? It makes code review like this much easier, as > well as tracking changes. We use it pretty extensively in HTTPS > Everywhere, so now would be a good time to learn! > > I do, actually, but because it was just a simple file and I was reeeally tired I didn't want to set everything up :P I forked HTTPS Everywhere on GitHub, added my "merger.py" to the utils/ folder and renamed it to "alexa-ruleset-checker.py" You can find everything here: https://github.com/flyingstar16/https-everywhere It's _not_ working, meaning that it's the same script with a different name and location, but as I said I'll work on it as soon as I get the time :) Cheers, Claudio
