diff --git a/epi.typ b/epi.typ new file mode 100644 index 0000000..69542ec --- /dev/null +++ b/epi.typ @@ -0,0 +1,10 @@ +#import "lib/libepi.typ" + +#let fiches = ( + libepi.card(name: "Défonçeuse", instructions: "", protection_items: []), + libepi.card(name: "Perceuse à colonne", instructions: "", protection_items: []), +) + +#show: doc => [ + #libepi.generate_cards(fiches) +] diff --git a/lib/libepi.typ b/lib/libepi.typ new file mode 100644 index 0000000..8b8bb54 --- /dev/null +++ b/lib/libepi.typ @@ -0,0 +1,38 @@ +#let dummy(truc) = [truc] + +// Builds a card from arguments +#let card(name: none, protection_items: [], referent: "Pas de referent", +instructions: none, note: none) = { + ( + name: name, + protection_items: protection_items, + referent: referent, + instructions: instructions, + note: note + ) +} + +// Define bindings for al protection equipment items +#let Hearing = "OBLIGATION/OBLIGATION-casque-antibruit.pdf" +#let Helmet = "OBLIGATION/OBLIGATION-casque.pdf" +#let Glasses = "OBLIGATION/OBLIGATION-lunettes.pdf" +#let Shield = "OBLIGATION/OBLIGATION-visiere.pdf" +#let Gloves = "OBLIGATION/OBLIGATION-gants.pdf" +#let Mask = "OBLIGATION/OBLIGATION-protection-voies-respiratoires.pdf" + +#let generate_single_card(card) = { + text(size: 14pt)[#card.name] +} + +#let generate_cards(cards) = { + let total_cards = cards.len() + let index = 0 + for card in cards { + generate_single_card(card) + index += 1 + if index != total_cards { + // Newpage + pagebreak() + } + } +} diff --git a/notices/défonçeuse.toml b/notices/défonçeuse.toml new file mode 100644 index 0000000..e69de29