# HG changeset patch # User Jeff Hammel # Date 1375305902 25200 # Node ID 38dd72d72086c2bacd6428c5d591b7eeec784a58 # Parent 815eb5c796e98afa9027ecec8f94fd9edb4c9950 fix diff -r 815eb5c796e9 -r 38dd72d72086 .fluxbox/keys --- a/.fluxbox/keys Tue Jul 30 18:43:53 2013 -0700 +++ b/.fluxbox/keys Wed Jul 31 14:25:02 2013 -0700 @@ -76,6 +76,7 @@ Control Mod1 s :ExecCommand /home/jhammel/bin/smartopen "$(xclip -o)" # smartopen Control Mod1 t :ExecCommand gnome-terminal # terminal Control Mod1 x :ExecCommand xkill +Control Mod1 y :ExecCommand xclip -o | /home/jhammel/python/pypi.py | xclip -i # pypi package summary Control Mod1 0 :ExecCommand xclip -o | sed 's/^[-+]//' | xclip -i # strip leading +s Control Shift / :ExecCommand /home/jhammel/bin/keyshelp.sh # hotkeys help diff -r 815eb5c796e9 -r 38dd72d72086 python/setup_repo.py --- a/python/setup_repo.py Tue Jul 30 18:43:53 2013 -0700 +++ b/python/setup_repo.py Wed Jul 31 14:25:02 2013 -0700 @@ -23,6 +23,20 @@ call(['hg', 'add', '-R', directory]) call(['hg', 'commit', '-m', options.message, '-R', directory]) +def write_hgrc(directory, host, repo, name): + """write hgrc file""" + + HGRC="""[paths] +default = http://%(host)s/%(repo)s/%(name)s +default-push = ssh://%(host)s/%(repo)s/%(remote_path)s +""" + + path = os.path.join(directory, '.hg', 'hgrc') + # TODO: use ConfigParser + with file(os.path.join(directory, '.hg', 'hgrc'), 'w') as f: + print >> f, HGRC % { 'host': host, 'repo': repo, 'name': name} + + def setup_remote(local_repo, remote_url, push='ssh', remote_path=None): """ setup a remote repository for local_repo @@ -44,19 +58,6 @@ remote_dir = '%s/%s' % (path, name) call(['ssh', host, "mkdir -p %s && cd %s && hg init" % (remote_dir, remote_dir)]) -def write_hgrc(directory, host, repo, name): - """write hgrc file""" - - HGRC="""[paths] -default = http://%(host)s/%(repo)s/%(name)s -default-push = ssh://%(host)s/%(repo)s/%(name)s -""" - - path = os.path.join(directory, '.hg', 'hgrc') - # TODO: use ConfigParser - with file(os.path.join(directory, '.hg', 'hgrc'), 'w') as f: - print >> f, HGRC % { 'host': host, 'repo': repo, 'name': name} - def main(args=sys.argv[1:]): diff -r 815eb5c796e9 -r 38dd72d72086 python/url2txt.py --- a/python/url2txt.py Tue Jul 30 18:43:53 2013 -0700 +++ b/python/url2txt.py Wed Jul 31 14:25:02 2013 -0700 @@ -1,5 +1,7 @@ #!/usr/bin/env python +# TODO: add url2txt as pluggable thingy for smartopen + # xclip -o | sed 's/_//' | sed 's/.html//' def url2txt(url):