@tryghost/mg-substack-members-csv v0.4.29
Substack Ghost CSV Converter
Converts the "Total Email List" and "Subscribers" CSV exports from Substack to a CSV compatible with Ghost.
Install
To install the CLI, which is required for the Usage commands below:
npm install --global @tryghost/migrateTo use this package in your own project:
npm install @tryghost/mg-substack-members-csv --save
or
yarn add @tryghost/mg-substack-members-csv
Usage
To run a Substack CSV migration, the required command is:
migrate substack-members --pathToFile /path/to/emails.csvTo convert paid subscriptions, add --subs with a second file path:
migrate substack-members --pathToFile /path/to/emails.csv --subs /path/to/members.csvIt'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 Substack ("Total Email List").
- string - default:
null
-V--verbose- Show verbose output
- bool - default:
false
-s--subs- Path to the subscribers CSV file (paid, comp, gift) as generated by Substack ("Subscribers")
- string - default:
null
-l--limit- Define the batch limit for import files
- int - default:
5000
--comp- Provide two values in the format
YY|YYYYMMDD:none|free. YY is the threshold in years orYYYYMMDDas the exact date after which Substackcompmembers should receive a complimentary plan depending on the expiry date.none|freethe option how to import members before this threshold, e. g.5:free - string - default:
0:free - Choices:
YY:none,YY:free,YYYYMMDD:none,YYYYMMDD:free
- Provide two values in the format
--compLabel- Provide a label for Substack
compsubscribers - string - default:
substack-comp
- Provide a label for Substack
--gift- Provide two values in the format
YY|YYYYMMDD:none|free. YY is the threshold in years orYYYYMMDDas the exact date after which Substackgiftmembers should receive a complimentary plan depending on the expiry date.none|freethe option how to import members before this threshold, e. g.5:free - string - default:
0:free - Choices:
YY:none,YY:free,YYYYMMDD:none,YYYYMMDD:free
- Provide two values in the format
--giftLabel- Provide a label for Substack
giftsubscribers - string - default:
substack-gift
- Provide a label for Substack
--freeLabel- Provide a label for Substack
freesubscribers - string - default:
substack-free
- Provide a label for Substack
--paidLabel- Provide a label for Substack
paidsubscribers - string - default:
substack-paid
- Provide a label for Substack
--cache- Persist local cache after migration is complete (Only if
--zipistrue) - bool - default:
true
- Persist local cache after migration is complete (Only if
A more complex migration command that accounts for Stripe data could look like this:
migrate substack-members --pathToFile /path/to/emails.csv --subs /path/to/members.csv --giftLabel Gifted --freeLabel Free --paidLabel Supporter --compLabel 'Try It Out'Develop
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
1. git clone this repo & cd into it as usual
2. Run yarn to install top-level dependencies.
Run
To run a local development copy, cd into this directory, and use yarn dev instead of migrate like so:
yarn dev substack-members --pathToFile /path/to/emails.csvTest
yarn lintrun just eslintyarn testrun lint and tests
Copyright & License
Copyright (c) 2013-2023 Ghost Foundation - Released under the MIT license.
9 months ago
9 months ago
10 months ago
10 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago