Skip to content

Commit d965999

Browse files
Travis CI build final PDF & attach to release (#5)
* Cleanup build stuff * Building and deploying with Travis CI * Added LICENSE * Info about releases * Make build executable * Download counter badge * Nicer leaflet file naming
1 parent bdaae0e commit d965999

File tree

7 files changed

+496
-3
lines changed

7 files changed

+496
-3
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.pdf
2+
*~
3+

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
sudo: required
2+
dist: trusty
3+
before_install:
4+
- sudo apt-get -qq update && sudo apt-get install inkscape pdftk
5+
script:
6+
- mkdir _build
7+
- ./build.sh ds-wizard_leaflet_$TRAVIS_TAG.pdf
8+
deploy:
9+
provider: releases
10+
api_key: $GH_TOKEN
11+
file:
12+
- _build/ds-wizard_leaflet_$TRAVIS_TAG.pdf
13+
skip_cleanup: true
14+
on:
15+
tags: true

LICENSE

Lines changed: 427 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
# dsw-leaflet
2+
3+
[![License: CC BY-SA 4.0](https://img.shields.io/github/license/DataStewardshipWizard/dsw-leaflet.svg)](LICENSE)
4+
[![Build Status](https://travis-ci.org/DataStewardshipWizard/dsw-leaflet.svg?branch=master)](https://travis-ci.org/DataStewardshipWizard/dsw-leaflet)
5+
[![GitHub release](https://img.shields.io/github/downloads/DataStewardshipWizard/dsw-leaflet/total.svg)](https://github.com/DataStewardshipWizard/dsw-leaflet/releases)
6+
27
Data Stewardship Wizard leaflet
8+
9+
## Usage
10+
11+
There are two SVG files with rollfold pages of the DS Wizard leaflet. It is automatically converted to PDF file for releases. So, you don't need to clone and build it on your own - just visit [releases].
12+
13+
## License
14+
15+
This project is licensed under the Creative Commons Public License [CC BY-SA 4.0] - see the [LICENSE] file for more details.
16+
17+
[CC BY-SA 4.0]: https://creativecommons.org/licenses/by-sa/4.0/deed.cs
18+
[LICENSE]: LICENSE
19+
[releases]: https://github.com/DataStewardshipWizard/dsw-leaflet/releases

build.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
# Suggested distro: Ubuntu/Debian
3+
# Dependencies: wget, inkscape, pdftk
4+
# Marek Suchanek @ 2018
5+
if [ -z "$1" ]; then
6+
echo "Specify the name of output file as argument"
7+
exit 1
8+
fi
9+
10+
FINAL=$1
11+
PROJECT_ROOT=$(pwd)
12+
13+
echo "------------------------------------------------"
14+
echo "Installing fonts"
15+
mkdir ~/.fonts 2> /dev/null
16+
cd ~/.fonts
17+
wget -q https://www.wfonts.com/download/data/2014/11/28/corbel/corbel.zip
18+
unzip -o corbel.zip
19+
wget -q https://www.wfonts.com/download/data/2014/05/29/impact/impact.zip
20+
unzip -o impact.zip
21+
22+
cd $PROJECT_ROOT
23+
24+
echo "------------------------------------------------"
25+
echo "Building $FINAL"
26+
mkdir -p _build/parts 2>/dev/null
27+
for SVG_FILE in $(ls *.svg);
28+
do
29+
PDF_FILE=$(echo $SVG_FILE | sed 's/\.svg$/\.pdf/')
30+
inkscape $SVG_FILE --export-pdf=_build/parts/$PDF_FILE
31+
done
32+
pdftk $(ls _build/parts/*.pdf) cat output _build/$FINAL
33+
34+
echo "------------------------------------------------"

dsw_rollfold.pdf

-429 KB
Binary file not shown.

makePDF.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)