Forge
Scrap
A scrap tool let you forge complex document from a single YAML definition.
Scrap
A scrap tool let you forge complex document from a single YAML definition.
Here is a sample YAML scrap definition file:
$schema: https://api.paxpar.tech/schemas/forge/pdf/struct/1
name: valise.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/secure/mes_valise_secure/valise_mission_ee/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.secure.mes_valise_secure.craftforms.base.craftform/0
nom: 'Lycée Polyvalent Les Catalins'
site: 'Montélimar'
chantier_numero: 3
periode_debut: '2025-03-10'
periode_fin: '2025-03-17'
representant_legal_nom: 'Goget Stéphane'
signatures:
- email: danieldnaiel@nenergieqdoc.fr
date: 2017-12-05
attachments:
- name: pochette_Mehdi.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/carn_habi/craftforms/template_carnet.odt
signatures:
- email: michel.jean@acme.fr
date: 2017-12-05
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.carn_habi.craftforms.base.craftform/0
entreprise:
adresse: " 24 Av. des Catalins, 26200 Montélimar"
email: sgoget@catalins.fr
nom: "Goget Stéphane"
nom_entreprise: "Lycée Polyvalent Les Catalins"
num_siret: '19260113600018'
telephone: '475007676'
titulaire:
date_naissance: '2005-05-28'
habi_csq: true
habi_csq_date_edition: '2024-10-13'
habi_csq_duree_valid: 48
habi_csq_nom: AISSANI
habi_csq_prenom: Mehdi
habi_fme: true
habi_fme_date_edition: '2024-09-11'
habi_fme_duree_valid: 36
habi_fme_nom: AISSANI
habi_fme_prenom: Mehdi
habi_h0b0: true
habi_h0b0_date_edition: '2024-09-05'
habi_h0b0_duree_valid: 36
habi_h0b0_nom: AISSANI
habi_h0b0_prenom: Mehdi
habi_medicale: true
habi_medicale_date_edition: '2024-09-01'
habi_medicale_duree_valid: 12
habi_medicale_nom: AISSANI
habi_medicale_prenom: Mehdi
habi_pp58: true
habi_pp58_date_edition: '2024-09-10'
habi_pp58_duree_valid: 24
habi_pp58_nom: AISSANI
habi_pp58_prenom: Mehdi
habi_rp1: true
habi_rp1_date_edition: '2024-11-03'
habi_rp1_duree_valid: 36
habi_rp1_nom: AISSANI
habi_rp1_prenom: Mehdi
habi_scn1: true
habi_scn1_date_edition: '2024-10-12'
habi_scn1_nom: AISSANI
habi_scn1_prenom: Mehdi
habi_snc1_duree_valid: 48
nom: AISSANI
num_carnet: 465789.0
prenom: Mehdi
attachments:
- name: cert_pp58.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/habi_pp58/craftforms/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.habi_pp58.craftforms.base.craftform/1
date_edition: '2024-09-10'
date_expiration: '2026-09-09'
duree_valid: 24
prenom: Mehdi
- name: cert_fme.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/habi_fme/craftforms/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.habi_fme.craftforms.base.craftform/1
date_edition: '2024-09-11'
date_expiration: '2027-09-10'
duree_valid: 36
nom: AISSANI
prenom: Mehdi
- name: cert_h0b0.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/habi_h0b0/craftforms/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.habi_h0b0.craftforms.base.craftform/1
date_edition: '2024-09-05'
date_expiration: '2027-09-04'
duree_valid: 36
nom: AISSANI
prenom: Mehdi
- name: cert_csq.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/habi_csq/craftforms/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.habi_csq.craftforms.base.craftform/1
date_edition: '2024-10-13'
date_expiration: '2028-10-12'
duree_valid: 48
nom: AISSANI
prenom: Mehdi
- name: cert_medical.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/habi_medicale/craftforms/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.habi_medicale.craftforms.base.craftform/1
date_edition: '2024-09-01'
date_expiration: '2025-08-31'
duree_valid: 12
nom: AISSANI
prenom: Mehdi
- name: cert_rp1.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/habi_rp1/craftforms/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.habi_rp1.craftforms.base.craftform/1
date_edition: '2024-11-03'
date_expiration: '2027-11-02'
duree_valid: 36
nom: AISSANI
prenom: Mehdi
- name: cert_scn1.pdf
schema_doc: https://schema.paxpar.tech/custom/nucleaire/carn_habi/forge
template: /app/ref/common/custom/nucleaire/habi_scn1/craftforms/template.odt
data:
$schema: https://paxpar.tech/schema/common.custom.nucleaire.habi_scn1.craftforms.base.craftform/1
date_edition: '2024-10-12'
date_expiration: '2028-10-11'
duree_valid: 48
nom: AISSANI
prenom: Mehdi
There is a scrap
command in the pp CLI tool available in the forge notebooks:
❯ pp scrap --help
/home/philippe/src/paxpar added to PYTHONPATH
.env found and loaded !
Usage: pp scrap [OPTIONS] COMMAND [ARGS]...
pp scrap related commands
╭─ Options ───────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────╮
│ analyse Analyse an existings scrap to show PDF sources, coverage, template usage, ... │
│ build Scrap a document from its definition │
│ init Create a new scram definition from a PDF file │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯