- Created new profile files for various programming languages (embedded, Go, Java, web, C++, C#, etc.) in both English and Swedish. - Added localization support with YAML files for English and Swedish, including meta information, sections, labels, and sidebar content. - Developed a template for rendering the CV with a structured layout, including sections for profile, experience, education, and skills. - Implemented build scripts for compiling Typst files into PDF format for both PowerShell and shell environments. Co-authored-by: Copilot <copilot@github.com>
24 lines
882 B
PowerShell
24 lines
882 B
PowerShell
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
|
|
$typstPath = (Get-Command typst -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty Source)
|
|
|
|
if (-not $typstPath) {
|
|
$fallback = Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages\Typst.Typst_*" -Recurse -Filter typst.exe -ErrorAction SilentlyContinue |
|
|
Select-Object -First 1 -ExpandProperty FullName
|
|
$typstPath = $fallback
|
|
}
|
|
|
|
if (-not $typstPath) {
|
|
throw "Typst CLI hittades inte. Installera Typst och kör sedan skriptet igen."
|
|
}
|
|
|
|
$files = Get-ChildItem (Join-Path $repoRoot "publishing") -Recurse -Filter *.typ | Sort-Object FullName
|
|
|
|
foreach ($file in $files) {
|
|
$output = [System.IO.Path]::ChangeExtension($file.FullName, ".pdf")
|
|
Write-Host "Compiling $($file.FullName)"
|
|
& $typstPath compile --root $repoRoot $file.FullName $output
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|
|
} |