mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Bugfixes for cheat sheet generation.
This commit is contained in:
parent
38a4c12032
commit
cb36b5d94f
3 changed files with 55 additions and 50 deletions
5
.github/workflows/docsgen.yml
vendored
5
.github/workflows/docsgen.yml
vendored
|
@ -41,6 +41,11 @@ jobs:
|
|||
cd $GITHUB_WORKSPACE
|
||||
./scripts/genindex.sh
|
||||
|
||||
- name: Generate Cheat Sheet
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
./scripts/gencheat.sh
|
||||
|
||||
- name: Generating Docs
|
||||
env:
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
|
|
|
@ -16,6 +16,7 @@ function columnize
|
|||
cols=4
|
||||
TMPFILE=$(mktemp -t $(basename $0).XXXXXX) || exit 1
|
||||
cat >>$TMPFILE
|
||||
if [[ $(wc -l $TMPFILE | awk '{print $1}') -gt 1 ]] ; then
|
||||
totcnt=$(wc -l $TMPFILE | awk '{print $1}')
|
||||
maxrows=$((($totcnt+$cols-1)/$cols))
|
||||
maxcols=$cols
|
||||
|
@ -60,6 +61,7 @@ function columnize
|
|||
echo "| ${lines[$n]} |"
|
||||
n=$(($n+1))
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function mkconstindex
|
||||
|
@ -84,14 +86,12 @@ CHEAT_FILES=$(grep '^include' std.scad | sed 's/^.*<\([a-zA-Z0-9.]*\)>/\1/'|grep
|
|||
echo
|
||||
echo '( [Alphabetic Index](Index) )'
|
||||
echo
|
||||
(
|
||||
grep -H '// Constant: ' $CHEAT_FILES | mkconstindex
|
||||
grep -H '^[A-Z$][A-Z0-9_]* *=.*//' $CHEAT_FILES | mkconstindex2
|
||||
) | sort -u | columnize 'Constants'
|
||||
for f in $CHEAT_FILES ; do
|
||||
(
|
||||
(
|
||||
grep -H 'Constant: ' $f | mkconstindex
|
||||
grep -H '^[A-Z$][A-Z0-9_]* *=.*//' $f | mkconstindex2
|
||||
) | sort -u
|
||||
egrep -H 'Function: |Function&Module: |Module: ' $f | mkotherindex
|
||||
) | columnize $f
|
||||
egrep -H '// Function: |// Function&Module: |// Module: ' $f | mkotherindex | sort -u | columnize $f
|
||||
echo
|
||||
done
|
||||
) > BOSL2.wiki/CheatSheet.md
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,417];
|
||||
BOSL_VERSION = [2,0,418];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
|
Loading…
Reference in a new issue