citation-formatterlisted
Install: claude install-skill jy1529098645-gif/CiteCat
# Citation Formatter
Format one or many references into six common styles. This is a deterministic
Python script — no model, no network — so the output is stable and instant.
## Paper fields
Each paper is a small dict. Only `title` is really required; everything else is
optional and the formatters degrade gracefully (missing author → "Anonymous" or
omitted per style convention; missing year → "n.d." where the style needs it).
```python
{
"authors": "Smith, J., Doe, A.", # free-form; several shapes are parsed (see below)
"title": "Title of the work",
"year": 2024,
"source": "Journal / venue name",
"doi": "10.1234/abc", # or a full https://doi.org/... URL
"url": "https://..." # used when no DOI
}
```
**Author string shapes** the parser handles:
- `"Smith, J., Doe, A."` (family-first with initials)
- `"Smith, J. and Doe, A."`
- `"John Smith, Alice Doe"` (given-first, full names)
- `"Smith J; Doe A; Lee B"` (semicolon-separated)
## Usage
```bash
# One paper, one style
python scripts/format_citation.py --style apa \
--authors "Smith, J., Doe, A." --title "Deep learning for X" \
--year 2024 --source "Nature" --doi 10.1234/abc
# All six styles at once
python scripts/format_citation.py --all \
--authors "John Smith" --title "A study" --year 2023 --source "JMLR"
# A batch: pass a JSON file of papers and a style
python scripts/format_citation.py --style bibtex --json papers.json
```
Styles: `apa`, `mla`, `chicago`, `ieee`,