Sha256: 1e775216cd2c7f25c9e74a54a4eb8171d1f9ee9150fa51d1d8d8e268d6142196

Contents?: true

Size: 976 Bytes

Versions: 1

Compression:

Stored size: 976 Bytes

Contents

#!/bin/sh

source remove_temp_directories.sh

echo "Create a MyPdfProject"
cd ~/hyla
hyla new --blank -d MyPdfProject --force
cd MyPdfProject

echo "Create one Asciidoc file from sample (book)"

hyla create -a book --t asciidoc -d .

echo "Generate HTML content using foundation stylesheet"

hyla generate --style foundation

echo "We change the rendering from adoc2html to html2pdf"

ruby -i.bak -pe 'sub(%r{rendering: adoc2html},"rendering: html2pdf")' _config.yaml

echo "Adapt source directory & destination directory"

ruby -i.bak -pe 'sub(%r{source: .},"source: ./generated_content")' _config.yaml
ruby -i.bak -pe 'sub(%r{destination: generated_content},"destination: ./generated_content/pdf")' _config.yaml

echo "Generate the PDF file for the image and book"

hyla generate -f asciidoc_book.html
#hyla generate -f asciidoc_image.html

echo "Result can be opened and viewed"

open generated_content/pdf/asciidoc_book.pdf
#open generated_content/pdf/asciidoc_image.pdf

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyla-1.0.3 documentation/scripts/generate_pdf_from_html.sh