Commit a3cd9180 authored by Adam Štěpánek's avatar Adam Štěpánek
Browse files

Create a pdf

parent e9195257
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
!*.ts
!*.blend
!*.py
!*.yml

# configs are a bit of a special case, yes
!/config/*
+8 −1
Original line number Diff line number Diff line
= HASH: HASH Ain't Simple Hash
:manversion: v0.1.0
:doctype: manpage
:mantitle: HASH
:manvolname: PV259 Generative Design Programming
:tip-caption: TL;DR
:caution-caption: Change
:date: 2021-02-14

A hash function maps arbitrary data to a fixed-size value. Usually, that value is a mere number. However, HASH is no usual hash function. No, HASH spins up a whole new operating system and then bends and fuses together scripts -- both of my own and of my fellow students -- and spits out a brand new image.

@@ -89,7 +96,7 @@ If you can, use the `./run.ps1` script. You have several options:

=== Execution on Linux

You have my full confidence. Good luck!
Use the `run.sh` script. For everything else, you have my full confidence. Good luck!

== Code Snippet

pdf/build.ps1

0 → 100644
+6 −0
Original line number Diff line number Diff line
asciidoctor-pdf `
	-a pdf-theme=./theme.yml `
	-a pdf-fontsdir="C:\dev\fonts;GEM_FONTS_DIR" `
	-a source-highlighter=rouge `
	-a rouge-style=monokai `
	-o hash.pdf ../README.ad

pdf/theme-base.yml

0 → 100644
+59 −0
Original line number Diff line number Diff line
my:
  vulkan: ac162c
  small: 10
  normal: 12
  large: 14
  desk: 26201c #3a322b 0d1926
  paper: faf2eb
font-catalog:
  Lato:
    normal: Lato-Medium.ttf
    italic: Lato-MediumItalic.ttf
    bold: Lato-Heavy.ttf
    bold_italic: Lato-HeavyItalic.ttf
  Cascadia:
    normal: CascadiaMono-Regular.ttf
    italic: CascadiaMono-Regular.ttf
    bold: CascadiaMono-Bold.ttf
    bold_italic: CascadiaMono-Bold.ttf
  Roboto:
    normal: RobotoMono-Regular.ttf
    italic: RobotoMono-Italic.ttf
    bold: RobotoMono-Bold.ttf
    bold_italic: RobotoMono-BoldItalic.ttf
base:
  font-family: Roboto
  font-color: $my-paper
  font-size: $my-normal
  line-height: 1.2
  align: justify
literal:
  font-color: $my-vulkan
  border-width: 1
  border-color: 000000
  background-color: $my-desk
admonition:
  font-size: $my-small
  background-color: $my-paper
  padding: 5
  font-color: $my-desk
  column-rule-color: $my-desk
  column-rule-width: 1
  label:
    font-color: $my-desk
code:
  background-color: $my-desk
  font-color: ffffff
sidebar:
  background-color: $my-paper
  font-color: $my-desk
  font-size: $my-small
  title:
    font-color: $my-vulkan
    font-style: bold
    text-transform: uppercase
role:
  author:
    font-style: italic
  subtitle:
    font-size: $my-normal

pdf/theme.yml

0 → 100644
+40 −0
Original line number Diff line number Diff line
extends: ./theme-base.yml
page:
  size: A4
  background-color: $my-desk
  margin: [1.5cm, 1.5cm, 2cm, 1.5cm]
  # set double-sided margin to absurd values so that I know I screwed up
  margin-inner: 10cm
  margin-outer: 10cm
header:
  vertical-align: bottom
  line-height: 1
  height: 2cm
footer:
  vertical-align: top
  line-height: 1
  height: 2cm
  left-content: "{manversion}"
  center-content: "{date}"
  right-content: "HASH"
  verso-right:
    text-transform: uppercase
    content: $footer-right-content
  recto-right:
    text-transform: uppercase
    content: $footer-right-content
  verso-left-content: $footer-left-content
  recto-left-content: $footer-left-content
  verso-center-content: $footer-center-content
  recto-center-content: $footer-center-content
heading:
  h1-font-size: $my-large
  font-color: $my-vulkan
  h2-font-size: $my-normal
  h3-font-size: $my-normal
lead:
  font-size: $my-normal
link:
  font-color: $my-vulkan
literal:
  border-width: 0