Skip to content

Commit

Permalink
Merge pull request #1162 from Sonicadvance1/update_man_page_with_json…
Browse files Browse the repository at this point in the history
…_key

Update man page to show JSON key for config options
  • Loading branch information
Sonicadvance1 authored Jul 13, 2021
2 parents 6ff9b96 + bc09d73 commit 108081e
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions External/FEXCore/Scripts/config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,19 @@ def print_man_option(short, long, desc, default):
output_man.write("\\fBdefault:\\fR {0}\n".format(default))
output_man.write(".Pp\n\n")

def print_man_env_option(name, desc, default):
output_man.write("\\fBFEX_{0}\\fR\n".format(name))
def print_man_env_option(name, desc, default, no_json_key):
output_man.write("\\fBFEX_{0}\\fR\n".format(name.upper()))

# Print description
for line in desc:
output_man.write(".Pp\n")
output_man.write("{0}\n".format(line))

if (not no_json_key):
output_man.write(".Pp\n")
output_man.write("\\fBJSON key:\\fR '{0}'\n".format(name))
output_man.write(".Pp\n\n")

output_man.write(".Pp\n")
output_man.write("\\fBdefault:\\fR {0}\n".format(default))
output_man.write(".Pp\n\n")
Expand Down Expand Up @@ -154,9 +159,10 @@ def print_man_environment(options):
# Wrap the string argument in quotes
default = "'" + default + "'"
print_man_env_option(
op_key.upper(),
op_key,
op_vals["Desc"],
default
default,
False
)

print_man_environment_tail()
Expand All @@ -172,7 +178,7 @@ def print_man_environment_tail():
"By default FEX will look in {$HOME, $XDG_CONFIG_HOME}/.fex-emu/",
"This will override the full path",
],
"''")
"''", True)

print_man_env_option(
"FEX_APP_CONFIG",
Expand All @@ -183,7 +189,7 @@ def print_man_environment_tail():
"One must be careful with this option as it will override any applications that load with execve as well"
"If you need to support applications that execve then use FEX_APP_CONFIG_LOCATION instead"
],
"''")
"''", True)

print_man_env_option(
"FEX_APP_DATA_LOCATION",
Expand All @@ -193,7 +199,7 @@ def print_man_environment_tail():
"This will override the full path",
"This is the folder where FEX stores generated files like IR cache"
],
"''")
"''", True)

def print_man_header():
header ='''.Dd {0}
Expand Down

0 comments on commit 108081e

Please sign in to comment.