0.6.16 • Published 5 days ago

@ts-ghost/ghost-blog-buster v0.6.16

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

License

Screen Shot

About The Project

Ghost Blog Buster is an interactive CLI allowing you to interact with your Ghost Blog directly via the Ghost Content API. From the cli you will be able to:

  • 🌪️ Choose between Content API or Admin API (for members or blog post content behind subscribption)
  • 📚 Export specific or all blog Posts in Markdown format to the folder of your choice.
  • ⚙️ Display or export to JSON your Tags, Tiers, Authors, Members (Admin API only)
  • 📶 Connect / Disconnect from the Blog

Compatible Ghost versions.

This tool was developped and tested mostly for Ghost versions 5.x.

  • Ghost 5^

Built With

Basic usage

Use directly with npx

npx @ts-ghost/ghost-blog-buster

Or install globally

npm install -g @ts-ghost/ghost-blog-buster

Then, in a new SHELL session, launch with

ghost-blog-buster

Advanced usage

If you want to bypass the interactive prompts, you can use the CLI with pipeable commands.

Export content with export <resource>

For example if we already configured the URL and the Content API key, we can export all the posts to the ./posts folder with the following command:

ghost-blog-buster export posts --output ./posts

Options available

  • --host or -h: The URL of the blog (if not provided, it will check your config file that is filled by the interactive prompt)
  • --key or -k: The Content API key (if not provided, it will check your config file that is filled by the interactive prompt)
  • --output or -o: The destination folder. If no output is provided, content will go to stdout.

Full example:

ghost-blog-buster export posts --host https://astro-starter.digitalpress.blog --key e9b414c5d95a5436a647ff04ab --output ./posts

Available export

Display help

ghost-blog-buster --help

Export content from Admin API with export-admin <resource>

This export use the Admin API and require you to provide the Admin API key. An Admin API key is different from the Content API key. You can either use a Staff access token, visible at the bottom of a Ghost User profile or you can find it in your Ghost Admin panel, in the Integrations section.

This is useful if your Blog Posts contain a free preview, paid content and you want to export everything.

ghost-blog-buster export-admin posts --output ./posts

Options available

  • --host or -h: The URL of the blog (if not provided, it will check your config file that is filled by the interactive prompt)
  • --key or -k: The Content API key (if not provided, it will check your config file that is filled by the interactive prompt)
  • --output or -o: The destination folder. If no output is provided, content will go to stdout.

Full example:

ghost-blog-buster export-admin posts --host https://astro-starter.digitalpress.blog --key 1efedd9db174adee2d23d982:4b74dca0219bad629852191af326a45037346c2231240e0f7aec1f9371cc14e8 --output ./posts

Available export-admin <resource> resources:

  • posts
  • pages
  • members

Example piping commands

You can use > to pipe the content into a file or something else.

ghost-blog-buster export authors --host https://astro-starter.digitalpress.blog --key e9b414c5d95a5436a647ff04ab > authors.json

Roadmap

  • Interact with more content
  • Customize the frontmatter output
  • Usage without interactive prompts, pipeable cmds

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.
  • Please also read through the Code Of Conduct before posting your first idea as well.

License

Distributed under the MIT License. See LICENSE for more information.

Authors

Acknowledgements

  • Ghost is the best platform for blogging 💖.
  • Clack to build beautiful prompts.
0.6.16

5 days ago

0.6.14

6 months ago

0.6.15

5 months ago

0.6.9

10 months ago

0.6.10

9 months ago

0.6.12

7 months ago

0.6.11

9 months ago

0.6.13

7 months ago

0.6.7

12 months ago

0.6.6

12 months ago

0.6.8

12 months ago

0.6.3

12 months ago

0.6.2

12 months ago

0.6.5

12 months ago

0.6.4

12 months ago

0.6.1

1 year ago

0.5.0

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.1.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.4.4

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago