def cap_main(quality=DEFAULT_QUALITY): mk_and_cd_tt() target = _get_now_jpg() scrot_cmd = SCROT_CMD % dict(quality=quality, target=target) sh(scrot_cmd) return 0
def install_janus(): if (HOME/'.vim'/'README.md').isfile(): cwd = os.getcwd() os.chdir(HOME/'.vim') sh('rake') else: bootstrap = HOME/'.janus-bootstrap.sh' if not bootstrap.isfile(): bootstrap.write_bytes( urlopen('https://raw.github.com/carlhuda/janus/master/bootstrap.sh').read() ) bootstrap.chmod(0o755) sh(bootstrap.abspath())
def install_binaries(): sh('cd {junkdrawer}/src && make && make install'.format(junkdrawer=JD))
def _install_link(frompath, topath): sh('rm -rf "%s"' % topath) sh('ln -s "{}" "{}"'.format(frompath, topath))
def peek_main(): sh('eog %s' % TODAY_DIR) return 0
def _mencode_from_manifest(manifest, output, fps=5): cmd = MENCODER_CMD % dict(manifest=manifest, fps=fps, output_file=output) out = sh(cmd, True) return out