Overview
The ASIR-ISO project includes several utility scripts in thebin/ directory that automate various documentation tasks, from PDF generation to image processing.
PDF Generation
md-to-pdf.sh
The main script for converting Markdown documentation to PDF format using Pandoc and XeLaTeX.This script requires the following dependencies:
- pandoc
- texlive-extra-utils
- texlive-xetex
- fonts-ubuntu
Features
- Converts theory documents (Teoria_*.md) to PDF
- Processes practice assignments (Tarea_*.md)
- Generates installation guides for various operating systems
- Supports 12 different teaching units (UD01-UD12)
- Custom LaTeX templates for different document types
Usage
Document Types Generated
Theory PDFs
Combines all
Teoria_*.md files into comprehensive unit theoriesPractice Tasks
Converts individual
Tarea_*.md files into numbered assignmentsInstallation Guides
Generates guides for Ubuntu, Xubuntu, Windows 10/2016/2019, and OpenMediaVault
Templates
- temas-tpl.latex - Theory documents template
- tareas-tpl.latex - Practice assignments template
- anexos-tpl.latex - Annexes template
Output
All generated PDFs are organized in thePDFS/ directory, structured by teaching unit:
Image Processing
imgs-dropshadow.sh
Adds professional drop shadow effects to images using ImageMagick.Usage
Parameters
- Border: 13px white border
- Shadow: 80% opacity, 3px blur, 2px offset
- Output: Overwrites original image
The script modifies images in-place. Make sure to backup originals if needed.
tool-img-md.sh
Generates Markdown image syntax from a directory of images.Usage
Example
Input
Output
- Converts underscores to spaces in alt text
- Removes file extensions from captions
- Prepends custom path prefix to image paths
listar-imagenes.sh
Creates Markdown image references with line breaks for documentation.Usage
Output Format
Documentation Quality
test-header.sh
Validates Markdown files for proper YAML front matter formatting.Features
Validation Checks
Validation Checks
- Verifies first line is
---(YAML front matter start) - Compares header against standardized
Header.ymltemplate - Provides color-coded output (green for OK, red for errors)
- Supports batch processing of directories
Usage
Output Example
Document Assembly
make-intros.sh
Compiles all unit introductions into a single overview document.Process
- Finds all
Teoria_00_Introduccion.mdfiles - Concatenates them in sorted order
- Cleans metadata (removes YAML front matter, page breaks)
- Converts title fields to headers
- Generates
00_Introducciones.pdf
Usage
Output
Synchronization
sync-dropbox.sh
Synchronizes generated PDFs to Dropbox for distribution.This script contains hardcoded paths specific to the original developer’s environment. You’ll need to modify the paths for your setup.
Usage
Functionality
- Uses
rsyncwith archive mode and delete option - Ensures Dropbox folder mirrors local PDFS directory
- Provides confirmation message on completion
Script Customization
All scripts use standard bash utilities and can be customized by modifying the variables at the top of each file:Example: md-to-pdf.sh variables