npm.io
0.14.6 • Published 1 month ago

@tryghost/mg-curated-members-csv

Licence
MIT
Version
0.14.6
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
69

Curated Ghost CSV Converter

Converts the "Subscribers" CSV export from Curated to a CSV compatible with Ghost.

Install

To install the CLI, which is required for the Usage commands below:

npm install --global @tryghost/migrate

To use this package in your own project:

npm install @tryghost/mg-curated-members-csv --save

or

pnpm add @tryghost/mg-curated-members-csv

Usage

To run a Curated CSV migration, the required command is:

migrate curated-members --pathToFile /path/to/emails.csv

It's possible to pass more options, in order to achieve a better migration file for Ghost:

  • --pathToFile (required)
    • Path to the signups CSV file as generated by Curated
    • string - default: null
  • -V --verbose
    • Show verbose output
    • bool - default: false
  • -l --limit
    • Define the batch limit for import files
    • int - default: 5000
  • --freeLabel
    • Provide a label for Curated free subscribers
    • string - default: curated-free
  • --cache
    • Persist local cache after migration is complete (Only if --zip is true)
    • bool - default: true

A more complex migration command that accounts for Stripe data could look like this:

migrate curated-members emails.csv --freeLabel Newsletter --limit 1000

Develop

This is a mono repository, managed with Nx and pnpm workspaces.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run pnpm install to install top-level dependencies.
Run

To run a local development copy, cd into this directory, and use pnpm dev instead of migrate like so:

pnpm dev curated-members --pathToFile /path/to/emails.csv

Test

  • pnpm test runs the package tests
  • Linting and formatting are run from the repo root (pnpm lint, pnpm format)

Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license.