Skip to content

Commit

Permalink
[docs] better formatting for settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Apr 16, 2023
1 parent b1a1b2a commit 18e2c9c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/generate-settings-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ do
command=$(echo ${setting_long} | cut -d . -f1)
fname="${GEF_DOCS_DIR}/${command}.md"
if [ ! -f ${fname} ]; then
echo -e "# Settings for command \`${command}\`\n\n" > $fname
echo -e "# Settings for command [\`${command}\`](/gef/commands/${command})\n\n" > $fname
echo " - ${command}: settings/${command}.md" >> ${GEF_MKDOC_YML}
fi
done < ${SETTINGS_FILE}

gdb -q \
-ex "gef config gef.disable_color 1" \
-ex "pi for k,v in gef.config.items(): open(f'${GEF_DOCS_DIR}/{k.split(\".\",1)[0]}.md', 'a+').write(f'''
## Setting \`{k}\`\n\n
Type: \`{v.type.__name__}\`\n
Default: \`{v.value}\`\n
Description:\n> {v.description}\n
## \`{k.split(\".\",1)[1]}\`\n\n
**Name** \`{k}\`\n
**Type** \`{v.type.__name__}\`\n
**Default**Value: \`{v.value}\`\n
**Description** {v.description}\n
''')" \
-ex quit > /dev/null

0 comments on commit 18e2c9c

Please sign in to comment.