Skip to content

Commit

Permalink
Merge pull request #127 from olcf/ngin_documentation
Browse files Browse the repository at this point in the history
adding generate_commands helper script, it generates 90% of the Comma…
  • Loading branch information
Noah Ginsburg authored Oct 3, 2019
2 parents 772d5cd + c27495b commit 171dacd
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 30 deletions.
32 changes: 32 additions & 0 deletions docs/generate_commands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

commands="$(python ../pkpass.py -h | grep '{.*}' | head -1 | tr -d '[:space:]{}')"
IFS=","

cat << EOF > /tmp/test
Commands
========
The Commands can be listed out by passing the help flag to pkpass as seen below
EOF

{
echo ".. code-block:: bash
"
python ../pkpass.py -h | awk '{ print " "$0 }'
} >> /tmp/test

for com in $commands; do
{
echo "
${com^}"
awk "BEGIN{for(c=0;c<${#com};c++) printf \"-\"}"
echo "
Blurb
.. code-block:: bash
"
python ../pkpass.py "$com" -h | awk '{ print " "$0 }'
} >> /tmp/test
done
Loading

0 comments on commit 171dacd

Please sign in to comment.