{"_id":"@alexwende/contacts-to-calendar","name":"@alexwende/contacts-to-calendar","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alexwende/contacts-to-calendar","version":"1.0.0","description":"Export birthdays and other events from Google Contacts to a calendar (.ics) file.","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":"./dist/index.js","./package.json":"./package.json"},"bin":{"contacts-to-calendar":"dist/cli.js"},"scripts":{"clean":"rm -rf dist","build":"tsc","prepublishOnly":"npm run clean && npm run build"},"keywords":["Google Contacts","Google Calendar","CSV","ICS"],"author":{"name":"Alexander Wende"},"license":"MIT","type":"module","devDependencies":{"@types/node":"^26.1.0","typescript":"^6.0.3"},"dependencies":{"csv-parser":"^3.2.1","ics":"^3.12.0"},"publishConfig":{"access":"public"},"gitHead":"f41893af88db5ebb51dbbb09ac35ddceb33bc21f","_id":"@alexwende/contacts-to-calendar@1.0.0","_nodeVersion":"24.16.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-Do93jeKDEdCu7KnzsIIqBxRLEmkTs30NdxgkRuA5JSp89k3D7Y3zqQ1jO7iOERdeNQq2LhP9EoSlE59/SWWiHQ==","shasum":"4caa59146ffab76dc5dc2806c1c6a1e0a02a369a","tarball":"https://registry.npmjs.org/@alexwende/contacts-to-calendar/-/contacts-to-calendar-1.0.0.tgz","fileCount":28,"unpackedSize":27842,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCr0rIMkACjSfOM/YL1njw8c1CXyUey8WA7N3l0rvamTQIgEwryi3ep2bAp602vpmujePkc4ZNQ2VWXZPjsQ1Pnugc="}]},"_npmUser":{"name":"alexwende","email":"alexmakescode@gmail.com"},"directories":{},"maintainers":[{"name":"alexwende","email":"alexmakescode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/contacts-to-calendar_1.0.0_1784234784412_0.8673650561932873"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-16T20:46:24.238Z","1.0.0":"2026-07-16T20:46:24.579Z","modified":"2026-07-16T20:46:24.770Z"},"maintainers":[{"name":"alexwende","email":"alexmakescode@gmail.com"}],"description":"Export birthdays and other events from Google Contacts to a calendar (.ics) file.","keywords":["Google Contacts","Google Calendar","CSV","ICS"],"author":{"name":"Alexander Wende"},"license":"MIT","readme":"# contacts-to-calendar\n\nConvert a **Google Contacts CSV export** into an **`.ics` calendar file** of\nrecurring birthdays and anniversaries you can import into any calendar app\n(Google Calendar, Apple Calendar, Outlook, …).\n\n> Especially useful when you live in Germany, where Google Calendar no longer automatically imports birthdays from Google Contacts.\n\n> Your data remains private: the conversion happens entirely on your machine, and no data is sent to any server.\n\n## What it does\n\nReads a Google Contacts CSV and, for every contact, extracts:\n\n- the **Birthday** column, and\n- any **custom events** (`Event N - Label` / `Event N - Value` columns — e.g.\n  _Anniversary_, _Wedding Anniversary_, _Engagement_, _In Memory of_).\n\nEach entry becomes an **all-day, yearly-recurring** calendar event titled\n`<Contact Name>'s <Label>` (e.g. `John Doe's Birthday`).\n\n### Date handling\n\n- **Dates with a year** (`YYYY-MM-DD`) keep that year as the anchor, so the\n  event first appears in the past on its original date and repeats every year\n  after. Scrolling back through your calendar shows birthdays alongside other\n  past events.\n- **Year-less dates** (Google's `--MM-DD` form) are anchored to the year\n  **2000**.\n- Unparseable dates are skipped.\n\nContact names are assembled from the `First Name` / `Middle Name` / `Last Name`\ncolumns, falling back to `Organization Name`, then `Unknown`.\n\n## Requirements\n\n- Node.js and npm.\n\n## Usage\n\nExport your contacts from [Google Contacts](https://contacts.google.com/) as a\n**Google CSV**, then run the CLI with the CSV path:\n\n```bash\nnpx @alexwende/contacts-to-calendar contacts.csv\n```\n\nThe output is written next to the input with a `.ics` extension (e.g.\n`contacts.csv` → `contacts.ics`) and can be imported directly into your\ncalendar app.\n\n### From a local clone\n\n```bash\nnpm install\nnpm run build          # compiles src/ → dist/\nnode dist/cli.js contacts.csv\n```\n\n### As a library\n\nInstall the package and call the wrapper, which streams a CSV file and writes\nthe `.ics` output:\n\n```ts\nimport { contactsToCalendar } from \"@alexwende/contacts-to-calendar\";\n\n// (input CSV path, output ICS path)\ncontactsToCalendar(\"contacts.csv\", \"contacts.ics\");\n```\n\nThe individual pipeline stages are exported too, so you can compose them\nyourself (e.g. to parse in-memory records or produce the `.ics` string without\ntouching the filesystem):\n\n```ts\nimport {\n  eventsFromContact,          // CSV record  → contact events\n  calendarEventsFromContactEvents, // contact events → ics event attributes\n  calendarFromEvents,         // ics event attributes → .ics string\n} from \"@alexwende/contacts-to-calendar\";\n```\n\n## Project structure\n\n- [src/contacts.ts](src/contacts.ts) — parses a Google Contacts CSV record into\n  contact events (name + label + date).\n- [src/calendar.ts](src/calendar.ts) — date normalization and conversion of\n  contact events into iCalendar events and `.ics` output.\n- [src/contacts-to-calendar.ts](src/contacts-to-calendar.ts) — file-path\n  wrapper that streams the CSV in and writes the `.ics` out.\n- [src/cli.ts](src/cli.ts) — command-line entry point.\n- [src/index.ts](src/index.ts) — re-exports the modules above as the package's\n  public API.\n\n## Dependencies\n\n- [`csv-parser`](https://www.npmjs.com/package/csv-parser) — streams and parses\n  the contacts CSV.\n- [`ics`](https://www.npmjs.com/package/ics) — builds the iCalendar (`.ics`)\n  output.\n","readmeFilename":"README.md","_rev":"1-6e7215d3e39679ef7737ba2be51a48f6"}