#!/usr/local/bin/python import sys,time step = sys.argv[1] if step == "init": me = sys.argv[0] outfile = open(sys.argv[2],'w') today = time.strftime("%a %d %b %Y",time.localtime(time.time())) outfile.write("//Gif data generated " + today + " by " + me + "\n\n") if step == "file": outfile = open(sys.argv[2],'a') # Read the whole gif file into one big string: x = open(sys.argv[4],'rb').read() icon = sys.argv[3] outfile.write("\nconst char " + icon + "Icon[] = {\n") i = 0 while i < (len(x)-1): outfile.write("0x%02x, " % ord(x[i])) i = i + 1 if (i%8 == 0): outfile.write("\n") outfile.write("0x%02x };\n\n" % ord(x[i])) outfile.flush() outfile.close()
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |