Skip to content

Commit b5aa11a

Browse files
committed
add pdf rendering to travis
1 parent 6308534 commit b5aa11a

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ mkdocs build --clean
3232
sed -i "s/@@TIMESTAMP@@/$CURRENT_DATE/g" site/index.html
3333
)
3434

35+
# Make the pdf
36+
make pdf
37+
3538
# Commit and push the documentation to gh-pages
3639
(
3740
cd site

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ install:
66
- "pip install mkdocs"
77
- "pip install mkdocs-cinder"
88
- "pip install markdown-include"
9+
- "wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-trusty-amd64.deb"
10+
- "sudo dpkg -it wkhtml*.deb"
911
after_success:
1012
- if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then ./.deploy.sh ; fi
1113
env:

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ serve:
77
build:
88
mkdocs build --clean
99

10-
pdf_epub:
11-
mkdocs2pandoc > erc.pd
12-
pandoc --toc -f markdown+grid_tables+table_captions -o erc-specification.pdf erc.pd
13-
pandoc --toc -f markdown+grid_tables -t epub -o erc-specifiction.epub erc.pd
10+
VCS_REF := $(shell git rev-parse --short HEAD)
11+
CURRENT_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
12+
FILE_NAME_PDF := $(shell echo o2r-architecture-${VCS_REF}.pdf)
1413

15-
.PHONY: build serve pdf_epub default
14+
pdf:
15+
# update version in cover page, if not already done
16+
sed -i 's/@@VERSION@@/${VCS_REF}/g' site/index.html
17+
sed -i 's/@@TIMESTAMP@@/${CURRENT_DATE}/g' site/index.html
18+
# create PDF
19+
wkhtmltopdf --margin-top 20mm --no-background file://$(shell pwd)/site/index.html site/o2r-architecture.pdf

docs/arc42.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ div[role=main] img {
9595

9696
.rst-content .note .admonition-title {
9797
background: #004286;
98-
}
98+
}

0 commit comments

Comments
 (0)