0.17.7 • Published 5 days ago

@tryghost/mg-medium-export v0.17.7

Weekly downloads
6
License
MIT
Repository
github
Last release
5 days ago

Migrate Medium Export

Migrate content from Medium using the supplied zip file, and generate a zip file you can import into a Ghost installation.

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-medium-export --save

or

yarn add @tryghost/mg-medium-export

Usage

To run a Medium migration, the required command is:

migrate medium --pathToZip /path/to/my-export.zip

Note: The zip path can be to a singular zip file or a folder of zip files

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

  • --pathToZip (required)
    • Path to a zip file
    • string - default: null
  • -V --verbose
    • bool - default: false
    • Show verbose output
  • --zip
    • bool - default: true
    • Create a zip file
  • -s --scrape
    • Configure scraping tasks
    • string - default: all
    • Choices: all, img, web, media, files, none
  • --sizeLimit
    • number - default: false
    • Media files larger than this size (defined in MB i.e. 5) will be flagged as oversize
  • -e --email
    • string - default: false
    • Provide an email domain for users e.g. example.com
  • --addTag
    • string - default: null
    • Provide a tag name which should be added to every post in this migration (Wrap in single quotes if tag name has spaces 'Like This')
  • --addPlatformTag
    • Add #medium tag to migrated content
    • bool - default: true
  • --mediumAsCanonical
    • bool - default: false
    • Use medium article as canonical URL
  • --removeResponses
    • bool - default: true
    • Remove response posts such as comments from the output
  • --fallBackHTMLCard
    • bool - default: true
    • Fall back to convert to HTMLCard, if standard Mobiledoc convert fails
  • --cache
    • Persist local cache after migration is complete (Only if --zip is true)
    • bool - default: true

A more complex migration command could look like this:

migrate medium --pathToZip /path/to/my-export.zip --email example.com

This will process all posts from the zip file, and all authors will have an email address ending in 'example.com'

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 medium --pathToZip /path/to/my-export.zip

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright & License

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

0.17.7

5 days ago

0.17.6

21 days ago

0.17.5

2 months ago

0.17.4

4 months ago

0.17.3

4 months ago

0.17.2

4 months ago

0.17.1

4 months ago

0.17.0

5 months ago

0.16.3

5 months ago

0.15.4

9 months ago

0.15.2

10 months ago

0.15.3

9 months ago

0.16.0

7 months ago

0.16.1

7 months ago

0.16.2

7 months ago

0.15.1

11 months ago

0.14.12

1 year ago

0.14.11

1 year ago

0.15.0

1 year ago

0.14.10

1 year ago

0.14.5

1 year ago

0.14.6

1 year ago

0.14.7

1 year ago

0.14.8

1 year ago

0.14.9

1 year ago

0.14.2

1 year ago

0.14.3

1 year ago

0.14.4

1 year ago

0.14.1

1 year ago

0.14.0

1 year ago

0.13.6

1 year ago

0.13.7

1 year ago

0.13.4

1 year ago

0.13.5

1 year ago

0.13.0

2 years ago

0.13.1

2 years ago

0.13.2

2 years ago

0.13.3

1 year ago

0.12.0

2 years ago

0.12.1

2 years ago

0.12.2

2 years ago

0.12.3

2 years ago

0.12.4

2 years ago

0.11.10

2 years ago

0.11.11

2 years ago

0.11.12

2 years ago

0.11.13

2 years ago

0.11.9

2 years ago

0.11.8

2 years ago

0.11.5

2 years ago

0.11.6

2 years ago

0.11.3

2 years ago

0.11.2

3 years ago

0.11.1

3 years ago

0.11.0

3 years ago

0.10.2

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.9.11

3 years ago

0.9.10

3 years ago

0.9.9

3 years ago

0.9.8

3 years ago

0.9.7

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.9.4

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.7

4 years ago

0.8.6

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

6 years ago

0.1.0

6 years ago