From 1456cee951852e7d70bea486482661d1ab82fe01 Mon Sep 17 00:00:00 2001 From: Eric Romano Date: Thu, 2 May 2013 14:14:51 -0400 Subject: [PATCH] cleaning up --- README.md | 8 +------- gitfiti.py | 23 +++++++++++++++++------ pixels-large.png | Bin 0 -> 858 bytes pixels.png | Bin 387 -> 484 bytes 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 pixels-large.png diff --git a/README.md b/README.md index 19b74c4245..17411b9fe0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ gitfiti _noun_ : carefully crafted graffiti in a github commit history calendar. - - -gitfiti art +gitfiti art `gitfiti.py` is a tool I wrote to decorate your github account's commit history calendar by (blatantly) abusing git. @@ -25,8 +23,4 @@ Fortunately if you regret your gitfiti in the morning, removing it is fairly eas - ... - Profit? - - - - ![alt text](http://f.cl.ly/items/0J463J0K1N020S1Q3E3l/er-small.png "tiny logo") diff --git a/gitfiti.py b/gitfiti.py index 019d09df6f..82cc9e41c7 100644 --- a/gitfiti.py +++ b/gitfiti.py @@ -19,6 +19,15 @@ [0,0,0,3,4,4,4,4,3,0,0,0]] oneup=[ +[0,4,4,4,4,4,4,4,0], +[4,3,2,2,1,2,2,3,4], +[4,2,2,1,1,1,2,2,4], +[4,3,4,4,4,4,4,3,4], +[4,4,1,4,1,4,1,4,4], +[0,4,1,1,1,1,1,4,0], +[0,0,4,4,4,4,4,0,0]] + +oneup2=[ [0,0,4,4,4,4,4,4,4,0,0], [0,4,2,2,1,1,1,2,2,4,0], [4,3,2,2,1,1,1,2,2,3,4], @@ -75,6 +84,7 @@ images={ 'kitty':kitty, 'oneup':oneup, +'oneup2':oneup2, 'hackerschool':hackerschool, 'octocat':octocat, 'octocat2':octocat2, @@ -102,6 +112,7 @@ def max_commits(input): def multiplier(max_commits): """calculates a multiplier to scale github colors to commit history""" m = max_commits/4.0 + if m == 0: return 1 m = math.ceil(m) m = int(m) return m @@ -112,7 +123,6 @@ def get_start_date(): date = datetime.datetime(d.year-1, d.month, d.day, 12) weekday = datetime.datetime.weekday(date) while weekday < 6: - print repr(date) date = date + datetime.timedelta(1) weekday = datetime.datetime.weekday(date) return date @@ -137,12 +147,14 @@ def commit(content, commitdate): def fake_it(image, start_date, username, repo, offset=0, multiplier=1): template = ('#!/bin/bash\n' 'REPO=%s\n' - 'git init $"REPO"\n' - 'cd $"REPO"\n' + 'git init $REPO\n' + 'cd $REPO\n' + 'touch README.md\n' + 'git add README.md\n' 'touch gitfiti\n' 'git add gitfiti\n' '%s\n' - 'git remote add origin git@github.com:%s/$"REPO".git\n' + 'git remote add origin git@github.com:%s/$REPO.git\n' 'git pull\n' 'git push -u origin master\n') strings = [] @@ -189,8 +201,7 @@ def main(): output = fake_it(image, get_start_date(), username, repo, offset, m) save(output, 'gitfiti.sh') - print 'gitfiti.sh saved. Create a new(!) repo at: https://github.com/new\ - run it from inside the repo you want to gitfiti' + print 'gitfiti.sh saved. Create a new(!) repo at: https://github.com/new and run it.' if __name__=='__main__': main() \ No newline at end of file diff --git a/pixels-large.png b/pixels-large.png new file mode 100644 index 0000000000000000000000000000000000000000..97a2b96fe1e21c2c03ab05f94e3a4df1a18443b3 GIT binary patch literal 858 zcmeAS@N?(olHy`uVBq!ia0y~yU`hhA-8k5QWd4^Q?->}F6+K-XLn>~)y}L0>Bv6Fy zLF7lyH_Tl^*|SYny0mOaNKI6qaZW8kQIkoNg?ppGvW?ye*4)~PIvqJvj~%m8bX5HM zgX^Pc-;)D7jepmEO-*|~Z|2?kn*ZkV9xk|R`sU)nu#CIwzuQ}1H{AC+);xHp|Jk!P z*9zxvwx55W^}FNs(!09x8yOf(SqvE%9C;WV1en2C;0OZ)2!n)yxZ&f>P}A4$(mCJb z?D*Ec7GJ&0-0HVgRKDE3JNG!&-ro6N;p^wK@9%N1wf_0p`s<$4r@Jrg`h0oyq@QW_ z`8PkGm}Yx_)pMiYm8&oPs7-0=xbuKV_J5%1fJuY1jU+~l{(M}0va;N- zf7ZPBp9;3W{aamb()s+w=goFo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