Created
August 2, 2014 13:17
-
-
Save suhaotian/00d731b027fce46d3f42 to your computer and use it in GitHub Desktop.
snippet format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
snipfile=sys.argv[1] | |
content='' | |
for line in open(snipfile).readlines(): | |
if line[0] != '#' and line[0:7] != 'snippet': | |
line='\t'+line | |
content=content+line | |
open(snipfile,'w').write(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment