Add --curses and --tty options, rename --variant to --hdf_variant
This commit is contained in:
6
justfile
6
justfile
@@ -20,15 +20,15 @@
|
|||||||
|
|
||||||
[group("upload")]
|
[group("upload")]
|
||||||
@upload_v37 *FLAGS:
|
@upload_v37 *FLAGS:
|
||||||
uv run render.py hdf-37.rc -v nethack {{FLAGS}}
|
uv run render.py hdf-37.rc -hdf_variant nethack {{FLAGS}}
|
||||||
|
|
||||||
[group("upload")]
|
[group("upload")]
|
||||||
@upload_tnnt *FLAGS:
|
@upload_tnnt *FLAGS:
|
||||||
uv run render.py hdf-tnnt.rc -v tnnt {{FLAGS}}
|
uv run render.py hdf-tnnt.rc -hdf_variant tnnt {{FLAGS}}
|
||||||
|
|
||||||
[group("show")]
|
[group("show")]
|
||||||
@upload_crecelle *FLAGS:
|
@upload_crecelle *FLAGS:
|
||||||
uv run render.py hdf-crecelle.rc -v crecellehack {{FLAGS}}
|
uv run render.py hdf-crecelle.rc -hdf_variant crecellehack {{FLAGS}}
|
||||||
|
|
||||||
[group("upload")]
|
[group("upload")]
|
||||||
upload_all *FLAGS: (upload_v37 FLAGS) (upload_tnnt FLAGS) (upload_crecelle FLAGS)
|
upload_all *FLAGS: (upload_v37 FLAGS) (upload_tnnt FLAGS) (upload_crecelle FLAGS)
|
||||||
|
|||||||
11
render.py
11
render.py
@@ -51,11 +51,14 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("template")
|
parser.add_argument("template")
|
||||||
parser.add_argument("-v", "--variant", help="If specified, the variant to upload the rendered template to on hardfought.org")
|
parser.add_argument("--hdf_variant", help="If specified, the variant to upload the rendered template to on hardfought.org")
|
||||||
parser.add_argument("--nudist", "-n", action="store_true")
|
parser.add_argument("--nudist", "-n", action="store_true")
|
||||||
parser.add_argument("--pauper", "-p", action="store_true")
|
parser.add_argument("--pauper", "-p", action="store_true")
|
||||||
parser.add_argument("--nobones", action="store_true")
|
parser.add_argument("--nobones", action="store_true")
|
||||||
parser.add_argument("--nopet", action="store_true")
|
parser.add_argument("--nopet", action="store_true")
|
||||||
|
parser.add_argument("--hide-comments", action="store_false", dest="comments")
|
||||||
|
parser.add_argument("--curses", action="store_const", const="curses", dest="windowtype")
|
||||||
|
parser.add_argument("--tty", action="store_const", const="tty", dest="windowtype")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -66,8 +69,8 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
rcfile = render(args.template, render_params)
|
rcfile = render(args.template, render_params)
|
||||||
|
|
||||||
if args.variant:
|
if args.hdf_variant:
|
||||||
if (upload(rcfile, args.variant)):
|
if (upload(rcfile, args.hdf_variant)):
|
||||||
print(f"Uploaded template {args.template} to variant {args.variant}")
|
print(f"Uploaded template {args.template} to hardfought variant {args.hdf_variant}")
|
||||||
else:
|
else:
|
||||||
print(rcfile)
|
print(rcfile)
|
||||||
|
|||||||
Reference in New Issue
Block a user