Skip to content

## projio: Ship CSL files and update render paths ### 1

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