This little program generates a PDF with labels for Christmas letters.
- First you need NodeJS.
npm install -g pnpm
pnpm install
- In Google Contacts go to your Christmas List label. (You can call the label anything you want.)
- In the top right corner click the Export button (looks like an outbox).
- Select Google CSV.
- Click Export.
- Move the file to the root directory of this project.
- Run
node src/christmaslabels.mjs
. - Open labels.pdf and print it.
--skip n
: Still prints all labels but on page 1 it doesn’t print in the first n
label positions (left-to-right, top-to-bottom). Useful for when you have a left over sheet of labels from a previous printing.
node src/christmaslabels.mjs --skip 12
- In Google Contacts, open the contact you want to add.
- Add the Christmas List label to the contact.
- Edit the contact.
- Add a custom field with type "Christmas". The value is the first line of the label. E.g., "The Morearty Family". If you forget to add this field, the program will give you an error when you try to generate labels.
- If the contact has multiple addresses, add type 'Mail' or 'Home' to the one you want to use. Mail takes precedence over Home.