forked from OWASP/CheatSheetSeries
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start work on the generation of the offline site
- Loading branch information
Showing
7 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# Audit result files | ||
*.out | ||
*.out | ||
# Website generation stuff | ||
node_modules/ | ||
_site/ | ||
SUMMARY.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
![LogoOffical](https://github.com/OWASP/owasp-swag/raw/master/projects/cheat-sheet-series/owasp-1.png) | ||
|
||
The **OWASP Cheat Sheet Series** was created to provide a concise collection of high value information on specific application security topics. These cheat sheets were created by various application security professionals who have expertise in specific topics. | ||
|
||
We hope that this project provides you with excellent security guidance in an easy to read format. | ||
|
||
Project leaders: | ||
- [Jim Manico](https://www.owasp.org/index.php/User:Jmanico). | ||
- [Dominique Righetto](https://www.owasp.org/index.php/User:Dominique_RIGHETTO). | ||
|
||
Project links: | ||
- [Homepage](https://www.owasp.org/index.php/OWASP_Cheat_Sheet_Series). | ||
- [GitHub repository](https://github.com/OWASP/CheatSheetSeries). | ||
- [How to contribute?](https://github.com/OWASP/CheatSheetSeries#how-to-contribute) | ||
- [Logo](https://github.com/OWASP/owasp-swag/tree/master/projects/cheat-sheet-series). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"root": "./cheatsheets", | ||
"plugins": [ | ||
"anchors" | ||
], | ||
"structure": { | ||
"readme": "Preface.md" | ||
}, | ||
"title": "OWASP Cheat Sheet Series", | ||
"language": "en", | ||
"description": "Website with the collection of all the cheat sheets of the project." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Python3 script to generate the summary markdown page that is used | ||
by GitBook to generate the offline website. | ||
The summary markdown page is located in the "cheatsheets" folder | ||
and is named "SUMMARY.md". | ||
""" | ||
import os | ||
|
||
# Define templates | ||
cs_md_link_template = "* [%s](%s)" | ||
|
||
# Scan all CS files | ||
cheatsheets = [f.name for f in os.scandir("../cheatsheets") if f.is_file()] | ||
cheatsheets.sort() | ||
|
||
# Generate the summary file | ||
with open("../cheatsheets/SUMMARY.md", "w") as index_file: | ||
index_file.write("# Summary\n\n") | ||
index_file.write("### Cheatsheets\n\n") | ||
for cheatsheet in cheatsheets: | ||
if cheatsheet != "SUMMARY.md": | ||
cs_name = cheatsheet.replace("_"," ").replace(".md", "") | ||
index_file.write(cs_md_link_template % (cs_name, cheatsheet)) | ||
index_file.write("\n") | ||
print("Summary markdown page generated.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# Dependencies: | ||
# sudo apt install -y nodejs | ||
# sudo npm install gitbook-cli -g | ||
# Note: | ||
# PDF generation is not possible because the content is cutted in | ||
# some CS like for example the abuse case one | ||
WORK=_site | ||
echo "Generate a offline portable website with all the cheat sheets..." | ||
echo "Step 1/2: Generate the summary markdown page." | ||
python Generate_CheatSheets_Summary.py | ||
echo "Step 2/2: Generate the site." | ||
cd .. | ||
rm -rf $WORK 1>/dev/null 2>&1 | ||
cp Preface.md cheatsheets/. | ||
gitbook install | ||
gitbook build . $WORK --log=info | ||
rm cheatsheets/Preface.md | ||
rm cheatsheets/SUMMARY.md | ||
rm -rf node_modules | ||
echo "Generation finished to the folder: $WORK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters