Created
June 18, 2011 03:01
-
-
Save josephwegner/1032760 to your computer and use it in GitHub Desktop.
Quickly and Easily create scaffolding for whatever language you want
This file contains 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
/****************** | |
Name: | |
Project: | |
Purpose: | |
******************* /* | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
} |
This file contains 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
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains 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
/*************** | |
Name: | |
Project: | |
Purpose: | |
**************** */ | |
/********************* | |
*Build Exports Object* | |
**********************/ |
This file contains 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
<?php | |
/***************** | |
Name: | |
Project: | |
Purpose: | |
****************** */ | |
?> | |
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains 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 | |
""" | |
Name: Joe Wegner | |
Project: easyScaffolding | |
Purpose: Easily create scaffolding for a multitude | |
of programming languages. Users can easily edit | |
and add scaffolds for their needs | |
""" | |
""" | |
How to Use: (From Command Line) | |
scaffolding.py <language> <file_name> | |
<language> => The language you would like to generate scaffolding | |
for. This language must have a matching scaffolding file, | |
but errors will be handled gracefully. | |
<file_name> => Pretty straight forward. This can be a path, or | |
just a simple file name. | |
""" | |
import sys | |
import os | |
import shutil | |
if(len(sys.argv) < 2): | |
print "You did not enter the target language!" | |
sys.exit() | |
if(len(sys.argv) < 3): | |
print "You did not enter a file name!" | |
sys.exit() | |
language = sys.argv[1] | |
filename = sys.argv[2] | |
src = os.getenv("HOME") + "/.scaffolding/" + language + ".scaff" | |
if(not os.path.exists(src)): | |
print "You don't have a scaffolding file for that language!" | |
sys.exit() | |
try: | |
shutil.copy(src, filename) | |
except (IOError), why: | |
print why | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment