Skip to content

Commit 2094950

Browse files
Merge pull request ossf#109 from ossf/gen_toc
Add code to create a simple TOC
2 parents 3331f68 + 65f6b55 commit 2094950

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Used for local processing
22

3-
all: lint
3+
all: lint toc.md
44

55
lint:
66
markdownlint --config .github/linters/.markdown-lint.yml \
77
secure_software_development_fundamentals.md
8+
9+
toc.md: lint secure_software_development_fundamentals.md tocignore
10+
grep -E '^#{1,3} ' secure_software_development_fundamentals.md | \
11+
grep -E -v -f tocignore | sed 's/^# Part /Part /' > toc.md

tocignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
\#+ Secure Software Development Fundamentals
2+
\#+ Table of contents
3+
\#+ Quiz .*
4+
\#+ .* Final Exam
5+
\#+ Education Team Requirements

0 commit comments

Comments
 (0)