Skip to content

projio: Ship CSL files and update render paths

Goal

(promoted from note)

Context

(see source note)

Prompt

Fix the issue described below (source: docs/log/issue/issue-arash-20260402-220217-451167.md). Understand the problem, then implement the proposed fix.


projio: Ship CSL files and update render paths

1. Ship CSL files as package data

  • Add src/projio/data/csl/apa.csl (and a few common styles: ieee, chicago-author-date, vancouver)
  • Download canonical versions from the CSL repository
  • Add to package_data in pyproject.toml / setup.cfg

2. Update projio sync to copy CSL files

In src/projio/sync.py, add a step (similar to include.lua copy): - Copy CSL files from package data to .projio/render/csl/ - Only copy if not already present or if package version is newer

3. Update render.py for new paths

In src/projio/render.py: - Add bib_sources field to RenderConfig (list of paths, default: [".projio/biblio/merged.bib"]) - Change default bibliography to .projio/render/compiled.bib - Change default csl to .projio/render/csl/apa.csl - Update generate_pandoc_defaults() to use new paths - Move pandoc-defaults.yaml output from bib/pandoc-defaults.yaml to .projio/render/pandoc-defaults.yaml

4. Update DEFAULT_RENDER_YML template

bibliography: .projio/render/compiled.bib
csl: .projio/render/csl/apa.csl
bib_sources:
  - .projio/biblio/merged.bib
  - .projio/pipeio/modkey.bib

5. Update init.py

  • Makefile template: PANDOC_BIB should reference .projio/render/compiled.bib
  • pandoc-defaults.yaml path update

Acceptance Criteria

  • [ ]

Result

(pending)

Batch Result

  • status: done
  • batch queue_id: 9ef168fb767a
  • session: 5770b78c-f4c8-4794-9f73-aedd6692dafa
  • batch duration: 1363.6s