Commits

Thejesh GN  committed 536578a

added fabfile again

  • Participants
  • Parent commits d17aba7

Comments (0)

Files changed (2)

+from __future__ import with_statement
+from fabric.api import *
+from fabric.contrib.console import confirm
+from fabric.colors import green
+from fabric.contrib.files import sed
+
+def publish(file):
+    local('s3cmd put --acl-public '+file+' s3://text.thejeshgn.com/'+file)
+    print(green("Published! - check http://text.thejeshgn.com/"+file))
+ 
+def sign(file):
+    local('gpg --clearsign '+file)
+    local('rm '+file)
+    local('cp '+file+".asc "+file)
+    local('rm '+file+".asc ")
+ 
+def rename(file):
+    return
+    
+def verify(file):
+    local('gpg --verify '+file)
+
+def ls():
+    local('s3cmd ls s3://text.thejeshgn.com')
+ 
+def index():
+    intro_txt = '''
+Bunch of text files. You can find them at http://text.thejeshgn.com
+and also as a mercurial repository http://code.thejeshgn.com/text
+All of them are inline signed by my GPG keys. The mercurial reposiotry 
+commits are also signed.
+
+Thejesh GN <i@thejeshgn.com>
+GPG keys are at : http://text.thejeshgn.com/BFFC8DD3C06DD6B0.txt
+Fingerprint: C7D4 1911 9893 ADAF 27B0 FCAA BFFC 8DD3 C06D D6B0
+
+How to validate :
+1. Import my gpg keys
+    >wget -O- http://text.thejeshgn.com/BFFC8DD3C06DD6B0.txt | gpg --import
+        or
+    >gpg --recv-keys  0xBFFC8DD3C06DD6B0
+
+2. Check finger print
+    >gpg --fingerprint 0xBFFC8DD3C06DD6B0
+        it should return    
+    pub   4096R/C06DD6B0 2012-01-24
+    Key fingerprint = C7D4 1911 9893 ADAF 27B0  FCAA BFFC 8DD3 C06D D6B0
+3. Check the signature
+    >gpg --verify readme.txt 
+        or
+    >wget -O- http://text.thejeshgn.com/list.txt | gpg --verify
+        if everything is okay it should return
+
+    gpg: Signature made Sat 29 Sep 2012 06:12:36 PM IST using RSA key ID C06DD6B0
+    gpg: Good signature from Thejesh GN (Thej) <i@thejeshgn.com>
+
+=================== LIST OF AVAILABLE FILES ========================
+
+'''
+    local(' echo "'+intro_txt+'"  > index.txt ')
+    local('s3cmd ls s3://text.thejeshgn.com >> index.txt')
+    local("sed -i 's/s3:/http:/' index.txt")
+    sign('index.txt')
+    publish('index.txt')
 2012-09-03 17:16     40898   http://text.thejeshgn.com/BFFC8DD3C06DD6B0.txt
 2012-09-15 10:18      2351   http://text.thejeshgn.com/bsd-license.txt
 2012-09-01 15:01      2150   http://text.thejeshgn.com/cryptoparty_2012.txt
-2012-09-11 20:05       662   http://text.thejeshgn.com/fabfile.py
+2012-10-22 12:34      2017   http://text.thejeshgn.com/fabfile.py
 2012-07-16 12:13      2812   http://text.thejeshgn.com/gpg-policy.txt
-2012-09-29 20:35      2596   http://text.thejeshgn.com/index.txt
+2012-10-22 12:33      2466   http://text.thejeshgn.com/index.txt
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
-iQIcBAEBCgAGBQJQZ1xhAAoJEL/8jdPAbdawoTAP/1/WULlya60xrVUPveLkTelT
-HBfmdy8nl7YTwJOOqMYSxPAPExoYSKmxe9AVIDAX+DEKUpewtkD5Lmdo2gGdbZ+0
-KRHFn22Gqw8pXUNGBk77lQ9uT2rmyBgylVSxzJaQoir2/tL/vEHgDpCMmp6KSURn
-lDsGL1GZZZ6tZDdk1Ag820A5TMn1gIhQFcgof9ffXUaMzM5azaHy9MJ6dhCNJ67x
-O10cB+p+blJwbuVPm4GVbFmAeHIHbm9j0s5hAc+A4iWqnK6LBj1nBcHdqOUCVkBn
-4lFO6RC5Wp+iIMkLRwURsgPRY+V+B3sNuySL87QtxMe6/fFBvWysv0rFMiWRlL/u
-A3N89z+Ar1sEWstqFz8r3SRBCteISwQKdwrWB1lN1IJz2YgR8LicavTK0sHifh7d
-V2wIu/p/TXeJki75QdNat3g2MsAS9gfpd3zb0lTXY5MQN2rbPICjl4DC5fvQ2kWj
-l3Q4sMzLL2xgBDiYveoWlUmMtWmskojV3b6QcwMVMXOh3dqIv+j5CePDtTgqIRpm
-uPyYID6W9DkJAf42/sPsxCh0HnN/lGWvX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