Skip to content

Commit

Permalink
Updated the build system to include document creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Seamus Tuohy committed Aug 27, 2014
1 parent 3fcf055 commit 89158e8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

## Handbook

Currently SAFETAG can only be built by dirctly calling the command line tools. This should be fixed soon.
Use the existing makefile system to build reports from the core index's in the main directory. These commands will place the full markdown and pdf's in the ./audit/build directory.

To create a PDF from an index.md or index.adids.md file use the following command.

```
modules/markdown-pp/markdown-pp.py content/index.md audit/folder/full.md
To make the SAFETAG ADIDS Curriculum.
```bash
make adids
```

To create a PDF from a markdown file you need to add pandoc to your path and then run pandoc on the file.

You can type the following commands.

To make the SAFETAG guidebook
```bash
make guide
```
PATH=$PATH:~/.cabal/bin/
pandoc --table-of-contents --toc-depth=1 audit/folder/full.md -o audit/folder/full.pdf

To make an empty sample report.
```bash
make report
```
29 changes: 29 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,32 @@ ifeq ($(TEX_INST),)
$(error "ERROR: For PDF output, you’ll need LaTeX. We recommend installing TeX Live via your package manager. (On Debian/Ubuntu, apt-get install texlive.).")
endif


# =============== Report Generation =================

# Setting SHELL and adding cabal to PATH so that we can just make pandoc work on debian without mucking with the ~/.bash_profile
SHELL:=/bin/bash
PATH:=$(PATH):~/.cabal/bin/

adids:
echo $(PATH)
-mkdir -p audit/build
modules/markdown-pp/markdown-pp.py index.adids.md audit/build/ADIDS.md
pandoc --table-of-contents --toc-depth=1 audit/build/ADIDS.md -o audit/build/ADIDS.pdf

report:
-mkdir -p audit/build
modules/markdown-pp/markdown-pp.py index.report.md audit/build/report.md
pandoc --table-of-contents --toc-depth=1 audit/build/report.md -o audit/build/report.pdf

guide:
-mkdir -p audit/build
modules/markdown-pp/markdown-pp.py index.guide.md audit/build/guide.md
pandoc --table-of-contents --toc-depth=1 audit/build/guide.md -o audit/build/guide.pdf

all_docs: adids guide report


# =============== For Future Integration of a smaller latex install =================

modules/install-tl-unx.tar.gz:
Expand All @@ -78,3 +104,6 @@ modules/texlive: | modules/install-tl-unx.tar.gz

texpackages:
tlmgr install titlesec



0 comments on commit 89158e8

Please sign in to comment.