Separate placeholder for project and program names
This commit is contained in:
parent
37ff1782bb
commit
84b7493a4a
|
@ -1,7 +1,7 @@
|
||||||
#include <raylib.h>
|
#include <raylib.h>
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
InitWindow(__WINDOW_WIDTH, __WINDOW_HEIGHT, "__PROGNAME");
|
InitWindow(__WINDOW_WIDTH, __WINDOW_HEIGHT, "__PROJECT_NAME");
|
||||||
|
|
||||||
while (!WindowShouldClose()) {
|
while (!WindowShouldClose()) {
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
|
|
3
new.py
3
new.py
|
@ -79,7 +79,8 @@ for base, dirs, files in template.path.walk():
|
||||||
with in_path.open("r") as fp_in:
|
with in_path.open("r") as fp_in:
|
||||||
with out_path.open("w") as fp_out:
|
with out_path.open("w") as fp_out:
|
||||||
for line in fp_in:
|
for line in fp_in:
|
||||||
line = line.replace("__PROGNAME", project_name)
|
line = line.replace("__PROGNAME", project_name.split("/")[-1])
|
||||||
|
line = line.replace("__PROJECT", project_name)
|
||||||
for param in template.parameters:
|
for param in template.parameters:
|
||||||
line = line.replace(f"__{param}", parameters[param])
|
line = line.replace(f"__{param}", parameters[param])
|
||||||
fp_out.write(line)
|
fp_out.write(line)
|
||||||
|
|
Loading…
Reference in New Issue