Compare commits

..

No commits in common. "45fc27f1a837dfb2536e8a7c50537fc6a8b4cfa4" and "a4c736e4e781261d31f9eb51977182806fa23c53" have entirely different histories.

2 changed files with 2 additions and 11 deletions

10
ppp.py
View File

@ -11,8 +11,6 @@ if argc < 3:
print_usage() print_usage()
sys.exit(1) sys.exit(1)
includes = sys.argv[2:]
# figure out src dir from root argument # figure out src dir from root argument
sep="/" sep="/"
src_dir = sep.join(sys.argv[2].split(sep)[:-1]) src_dir = sep.join(sys.argv[2].split(sep)[:-1])
@ -28,7 +26,7 @@ def preprocess_file(path):
with open(path) as f: with open(path) as f:
content = f.readlines() content = f.readlines()
content = [x.strip('\n') for x in content] content = [x.strip() for x in content]
lines=len(content) lines=len(content)
for l in content: for l in content:
@ -38,11 +36,7 @@ def preprocess_file(path):
include_path = l.split(" ")[1] include_path = l.split(" ")[1]
# prepend directory # prepend directory
#include_path = "/".join([src_dir, include_path]) include_path = "/".join([src_dir, include_path])
for inc in includes:
if os.path.basename(inc) == include_path:
include_path = inc
break
preprocess_file(include_path) preprocess_file(include_path)
continue continue

View File

@ -1,3 +0,0 @@
* [ ] strip strings
* [ ] template parameters
* [ ] inject position parameters into #0# #1# in template file